Rename SPL datastructure API trait

This commit is contained in:
Sebastian Meyer 2024-04-03 22:30:20 +02:00 committed by Sebastian Meyer
parent 051bb6a355
commit 3fddb3981e
4 changed files with 11 additions and 11 deletions

View File

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace OCC\Basics\DataStructures; namespace OCC\Basics\DataStructures;
use OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait; use OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait;
use SplDoublyLinkedList; use SplDoublyLinkedList;
/** /**
@ -43,6 +43,6 @@ use SplDoublyLinkedList;
*/ */
class StrictList extends SplDoublyLinkedList class StrictList extends SplDoublyLinkedList
{ {
/** @use StrictSplDatastructureTrait<AllowedType> */ /** @use StrictSplDoublyLinkedListTrait<AllowedType> */
use StrictSplDatastructureTrait; use StrictSplDoublyLinkedListTrait;
} }

View File

@ -24,7 +24,7 @@ declare(strict_types=1);
namespace OCC\Basics\DataStructures; namespace OCC\Basics\DataStructures;
use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException; use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException;
use OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait; use OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait;
use SplQueue; use SplQueue;
/** /**
@ -44,8 +44,8 @@ use SplQueue;
*/ */
class StrictQueue extends SplQueue class StrictQueue extends SplQueue
{ {
/** @use StrictSplDatastructureTrait<AllowedType> */ /** @use StrictSplDoublyLinkedListTrait<AllowedType> */
use StrictSplDatastructureTrait; use StrictSplDoublyLinkedListTrait;
/** /**
* Add an item to the queue. * Add an item to the queue.

View File

@ -24,7 +24,7 @@ declare(strict_types=1);
namespace OCC\Basics\DataStructures; namespace OCC\Basics\DataStructures;
use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException; use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException;
use OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait; use OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait;
use RuntimeException; use RuntimeException;
use SplStack; use SplStack;
@ -45,8 +45,8 @@ use SplStack;
*/ */
class StrictStack extends SplStack class StrictStack extends SplStack
{ {
/** @use StrictSplDatastructureTrait<AllowedType> */ /** @use StrictSplDoublyLinkedListTrait<AllowedType> */
use StrictSplDatastructureTrait; use StrictSplDoublyLinkedListTrait;
/** /**
* Add an item to the stack. * Add an item to the stack.
@ -69,7 +69,7 @@ class StrictStack extends SplStack
* *
* @return AllowedType The unstacked item * @return AllowedType The unstacked item
* *
* @throws RuntimeException if the list is empty * @throws RuntimeException if the stack is empty
* *
* @api * @api
*/ */

View File

@ -49,7 +49,7 @@ use function unserialize;
* @template AllowedType of mixed * @template AllowedType of mixed
* @phpstan-require-extends SplDoublyLinkedList * @phpstan-require-extends SplDoublyLinkedList
*/ */
trait StrictSplDatastructureTrait trait StrictSplDoublyLinkedListTrait
{ {
use TypeChecker { use TypeChecker {
setAllowedTypes as protected; setAllowedTypes as protected;