From 3fddb3981e0ecbbbf3366a2e4990a24e4fc1b045 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Wed, 3 Apr 2024 22:30:20 +0200 Subject: [PATCH] Rename SPL datastructure API trait --- src/DataStructures/StrictList.php | 6 +++--- src/DataStructures/StrictQueue.php | 6 +++--- src/DataStructures/StrictStack.php | 8 ++++---- ...uctureTrait.php => StrictSplDoublyLinkedListTrait.php} | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) rename src/DataStructures/Traits/{StrictSplDatastructureTrait.php => StrictSplDoublyLinkedListTrait.php} (99%) diff --git a/src/DataStructures/StrictList.php b/src/DataStructures/StrictList.php index be8f407..737b92f 100644 --- a/src/DataStructures/StrictList.php +++ b/src/DataStructures/StrictList.php @@ -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 */ - use StrictSplDatastructureTrait; + /** @use StrictSplDoublyLinkedListTrait */ + use StrictSplDoublyLinkedListTrait; } diff --git a/src/DataStructures/StrictQueue.php b/src/DataStructures/StrictQueue.php index 266fa7c..7ef4ec9 100644 --- a/src/DataStructures/StrictQueue.php +++ b/src/DataStructures/StrictQueue.php @@ -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 */ - use StrictSplDatastructureTrait; + /** @use StrictSplDoublyLinkedListTrait */ + use StrictSplDoublyLinkedListTrait; /** * Add an item to the queue. diff --git a/src/DataStructures/StrictStack.php b/src/DataStructures/StrictStack.php index 8ec5cda..6c82907 100644 --- a/src/DataStructures/StrictStack.php +++ b/src/DataStructures/StrictStack.php @@ -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 */ - use StrictSplDatastructureTrait; + /** @use StrictSplDoublyLinkedListTrait */ + 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 */ diff --git a/src/DataStructures/Traits/StrictSplDatastructureTrait.php b/src/DataStructures/Traits/StrictSplDoublyLinkedListTrait.php similarity index 99% rename from src/DataStructures/Traits/StrictSplDatastructureTrait.php rename to src/DataStructures/Traits/StrictSplDoublyLinkedListTrait.php index 6eb421f..73f34d1 100644 --- a/src/DataStructures/Traits/StrictSplDatastructureTrait.php +++ b/src/DataStructures/Traits/StrictSplDoublyLinkedListTrait.php @@ -49,7 +49,7 @@ use function unserialize; * @template AllowedType of mixed * @phpstan-require-extends SplDoublyLinkedList */ -trait StrictSplDatastructureTrait +trait StrictSplDoublyLinkedListTrait { use TypeChecker { setAllowedTypes as protected;