Skip to content

Commit

Permalink
Updated Connection and Endpoint to not have final constructors, added…
Browse files Browse the repository at this point in the history
… psalm constraint. Added cache files and diff file for phpcs to gitignore.
  • Loading branch information
Justin Ruiter committed Apr 17, 2024
1 parent c957a7c commit 3c72226
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/vendor
.phpunit.result.cache
/.idea
*.diff
*.cache
3 changes: 2 additions & 1 deletion src/Model/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* @package Muffin\Webservice\Model
* @template TSubject of object
* @implements \Cake\Event\EventDispatcherInterface<TSubject>
* @psalm-consistent-constructor
*/
class Endpoint implements RepositoryInterface, EventListenerInterface, EventDispatcherInterface
{
Expand Down Expand Up @@ -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']);
Expand Down
5 changes: 4 additions & 1 deletion src/Model/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use Cake\Datasource\EntityTrait;
use Cake\Datasource\InvalidPropertyInterface;

/**
* @psalm-consistent-constructor
*/
class Resource implements EntityInterface, InvalidPropertyInterface
{
use EntityTrait;
Expand All @@ -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,
Expand Down

0 comments on commit 3c72226

Please sign in to comment.