diff --git a/.gitignore b/.gitignore index a072370..6f0931b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /vendor .phpunit.result.cache /.idea +*.diff +*.cache diff --git a/src/Model/Endpoint.php b/src/Model/Endpoint.php index 94841c5..ca7fc2c 100644 --- a/src/Model/Endpoint.php +++ b/src/Model/Endpoint.php @@ -39,6 +39,7 @@ * @package Muffin\Webservice\Model * @template TSubject of object * @implements \Cake\Event\EventDispatcherInterface + * @psalm-consistent-constructor */ class Endpoint implements RepositoryInterface, EventListenerInterface, EventDispatcherInterface { @@ -151,7 +152,7 @@ class Endpoint implements RepositoryInterface, EventListenerInterface, EventDisp * @param array $config List of options for this endpoint * @throws \Exception */ - final public function __construct(array $config = []) + public function __construct(array $config = []) { if (!empty($config['alias'])) { $this->setAlias($config['alias']); diff --git a/src/Model/Resource.php b/src/Model/Resource.php index 1c11b9c..cc2fec5 100644 --- a/src/Model/Resource.php +++ b/src/Model/Resource.php @@ -7,6 +7,9 @@ use Cake\Datasource\EntityTrait; use Cake\Datasource\InvalidPropertyInterface; +/** + * @psalm-consistent-constructor + */ class Resource implements EntityInterface, InvalidPropertyInterface { use EntityTrait; @@ -30,7 +33,7 @@ class Resource implements EntityInterface, InvalidPropertyInterface * @param array $properties hash of properties to set in this resource * @param array $options list of options to use when creating this resource */ - final public function __construct(array $properties = [], array $options = []) + public function __construct(array $properties = [], array $options = []) { $options += [ 'useSetters' => true,