From 1eb426de38517522200d4dfc839db5e8a4e5bdd6 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Mon, 22 Jan 2024 18:45:51 +0100 Subject: [PATCH] Declare interfaces for traits --- composer.json | 4 ++-- src/InterfaceTraits/ArrayAccess.php | 4 +++- src/InterfaceTraits/Countable.php | 4 +++- src/InterfaceTraits/Iterator.php | 4 +++- src/InterfaceTraits/IteratorAggregate.php | 4 +++- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 8dc637e..fec3721 100644 --- a/composer.json +++ b/composer.json @@ -35,9 +35,9 @@ "php": "^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^1.10.56", "phpstan/phpstan-strict-rules": "^1.5", - "friendsofphp/php-cs-fixer": "^3.45" + "friendsofphp/php-cs-fixer": "^3.48" }, "autoload": { "psr-4": { diff --git a/src/InterfaceTraits/ArrayAccess.php b/src/InterfaceTraits/ArrayAccess.php index 9d2a13a..4dc26f0 100644 --- a/src/InterfaceTraits/ArrayAccess.php +++ b/src/InterfaceTraits/ArrayAccess.php @@ -27,8 +27,10 @@ namespace OCC\Basics\InterfaceTraits; * * @author Sebastian Meyer * @package opencultureconsulting/basics + * + * @phpstan-require-implements \ArrayAccess */ -trait ArrayAccess /* implements \ArrayAccess */ +trait ArrayAccess { /** * Holds the array-accessible data. diff --git a/src/InterfaceTraits/Countable.php b/src/InterfaceTraits/Countable.php index 84dd143..ce7e2c3 100644 --- a/src/InterfaceTraits/Countable.php +++ b/src/InterfaceTraits/Countable.php @@ -27,8 +27,10 @@ namespace OCC\Basics\InterfaceTraits; * * @author Sebastian Meyer * @package opencultureconsulting/basics + * + * @phpstan-require-implements \Countable */ -trait Countable /* implements \Countable */ +trait Countable { /** * Holds the countable data. diff --git a/src/InterfaceTraits/Iterator.php b/src/InterfaceTraits/Iterator.php index 9faf5b9..20519bd 100644 --- a/src/InterfaceTraits/Iterator.php +++ b/src/InterfaceTraits/Iterator.php @@ -27,8 +27,10 @@ namespace OCC\Basics\InterfaceTraits; * * @author Sebastian Meyer * @package opencultureconsulting/basics + * + * @phpstan-require-implements \Iterator */ -trait Iterator /* implements \Iterator */ +trait Iterator { /** * Holds the iterable data. diff --git a/src/InterfaceTraits/IteratorAggregate.php b/src/InterfaceTraits/IteratorAggregate.php index 256c0bd..8064ba4 100644 --- a/src/InterfaceTraits/IteratorAggregate.php +++ b/src/InterfaceTraits/IteratorAggregate.php @@ -29,8 +29,10 @@ use ArrayIterator; * * @author Sebastian Meyer * @package opencultureconsulting/basics + * + * @phpstan-require-implements \IteratorAggregate */ -trait IteratorAggregate /* implements \IteratorAggregate */ +trait IteratorAggregate { /** * Holds the iterable data.