Rename SPL datastructure API trait
This commit is contained in:
parent
051bb6a355
commit
3fddb3981e
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace OCC\Basics\DataStructures;
|
||||
|
||||
use OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait;
|
||||
use OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait;
|
||||
use SplDoublyLinkedList;
|
||||
|
||||
/**
|
||||
|
@ -43,6 +43,6 @@ use SplDoublyLinkedList;
|
|||
*/
|
||||
class StrictList extends SplDoublyLinkedList
|
||||
{
|
||||
/** @use StrictSplDatastructureTrait<AllowedType> */
|
||||
use StrictSplDatastructureTrait;
|
||||
/** @use StrictSplDoublyLinkedListTrait<AllowedType> */
|
||||
use StrictSplDoublyLinkedListTrait;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||
namespace OCC\Basics\DataStructures;
|
||||
|
||||
use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException;
|
||||
use OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait;
|
||||
use OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait;
|
||||
use SplQueue;
|
||||
|
||||
/**
|
||||
|
@ -44,8 +44,8 @@ use SplQueue;
|
|||
*/
|
||||
class StrictQueue extends SplQueue
|
||||
{
|
||||
/** @use StrictSplDatastructureTrait<AllowedType> */
|
||||
use StrictSplDatastructureTrait;
|
||||
/** @use StrictSplDoublyLinkedListTrait<AllowedType> */
|
||||
use StrictSplDoublyLinkedListTrait;
|
||||
|
||||
/**
|
||||
* Add an item to the queue.
|
||||
|
|
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||
namespace OCC\Basics\DataStructures;
|
||||
|
||||
use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException;
|
||||
use OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait;
|
||||
use OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait;
|
||||
use RuntimeException;
|
||||
use SplStack;
|
||||
|
||||
|
@ -45,8 +45,8 @@ use SplStack;
|
|||
*/
|
||||
class StrictStack extends SplStack
|
||||
{
|
||||
/** @use StrictSplDatastructureTrait<AllowedType> */
|
||||
use StrictSplDatastructureTrait;
|
||||
/** @use StrictSplDoublyLinkedListTrait<AllowedType> */
|
||||
use StrictSplDoublyLinkedListTrait;
|
||||
|
||||
/**
|
||||
* Add an item to the stack.
|
||||
|
@ -69,7 +69,7 @@ class StrictStack extends SplStack
|
|||
*
|
||||
* @return AllowedType The unstacked item
|
||||
*
|
||||
* @throws RuntimeException if the list is empty
|
||||
* @throws RuntimeException if the stack is empty
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
|
|
|
@ -49,7 +49,7 @@ use function unserialize;
|
|||
* @template AllowedType of mixed
|
||||
* @phpstan-require-extends SplDoublyLinkedList
|
||||
*/
|
||||
trait StrictSplDatastructureTrait
|
||||
trait StrictSplDoublyLinkedListTrait
|
||||
{
|
||||
use TypeChecker {
|
||||
setAllowedTypes as protected;
|
Loading…
Reference in New Issue