Declare interfaces for traits

This commit is contained in:
Sebastian Meyer 2024-01-22 18:45:51 +01:00
parent b20a8df00c
commit 1eb426de38
5 changed files with 14 additions and 6 deletions

View File

@ -35,9 +35,9 @@
"php": "^8.0" "php": "^8.0"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "^1.10", "phpstan/phpstan": "^1.10.56",
"phpstan/phpstan-strict-rules": "^1.5", "phpstan/phpstan-strict-rules": "^1.5",
"friendsofphp/php-cs-fixer": "^3.45" "friendsofphp/php-cs-fixer": "^3.48"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

View File

@ -27,8 +27,10 @@ namespace OCC\Basics\InterfaceTraits;
* *
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com> * @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package opencultureconsulting/basics * @package opencultureconsulting/basics
*
* @phpstan-require-implements \ArrayAccess
*/ */
trait ArrayAccess /* implements \ArrayAccess */ trait ArrayAccess
{ {
/** /**
* Holds the array-accessible data. * Holds the array-accessible data.

View File

@ -27,8 +27,10 @@ namespace OCC\Basics\InterfaceTraits;
* *
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com> * @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package opencultureconsulting/basics * @package opencultureconsulting/basics
*
* @phpstan-require-implements \Countable
*/ */
trait Countable /* implements \Countable */ trait Countable
{ {
/** /**
* Holds the countable data. * Holds the countable data.

View File

@ -27,8 +27,10 @@ namespace OCC\Basics\InterfaceTraits;
* *
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com> * @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package opencultureconsulting/basics * @package opencultureconsulting/basics
*
* @phpstan-require-implements \Iterator
*/ */
trait Iterator /* implements \Iterator */ trait Iterator
{ {
/** /**
* Holds the iterable data. * Holds the iterable data.

View File

@ -29,8 +29,10 @@ use ArrayIterator;
* *
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com> * @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package opencultureconsulting/basics * @package opencultureconsulting/basics
*
* @phpstan-require-implements \IteratorAggregate
*/ */
trait IteratorAggregate /* implements \IteratorAggregate */ trait IteratorAggregate
{ {
/** /**
* Holds the iterable data. * Holds the iterable data.