diff options
Diffstat (limited to 'vendor/ramsey/collection/src/QueueInterface.php')
-rw-r--r-- | vendor/ramsey/collection/src/QueueInterface.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/vendor/ramsey/collection/src/QueueInterface.php b/vendor/ramsey/collection/src/QueueInterface.php index f29ce43ab..8c7383df8 100644 --- a/vendor/ramsey/collection/src/QueueInterface.php +++ b/vendor/ramsey/collection/src/QueueInterface.php @@ -15,7 +15,6 @@ declare(strict_types=1); namespace Ramsey\Collection; use Ramsey\Collection\Exception\NoSuchElementException; -use RuntimeException; /** * A queue is a collection in which the entities in the collection are kept in @@ -124,12 +123,13 @@ interface QueueInterface extends ArrayInterface * * @return bool `true` if this queue changed as a result of the call. * - * @throws RuntimeException if a queue refuses to add a particular element + * @throws \RuntimeException if a queue refuses to add a particular element * for any reason other than that it already contains the element. * Implementations should use a more-specific exception that extends * `\RuntimeException`. */ - public function add(mixed $element): bool; + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function add($element): bool; /** * Retrieves, but does not remove, the head of this queue. @@ -143,7 +143,7 @@ interface QueueInterface extends ArrayInterface * * @throws NoSuchElementException if this queue is empty. */ - public function element(): mixed; + public function element(); /** * Inserts the specified element into this queue if it is possible to do so @@ -159,7 +159,8 @@ interface QueueInterface extends ArrayInterface * * @return bool `true` if the element was added to this queue, else `false`. */ - public function offer(mixed $element): bool; + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function offer($element): bool; /** * Retrieves, but does not remove, the head of this queue, or returns `null` @@ -167,9 +168,9 @@ interface QueueInterface extends ArrayInterface * * @see self::element() * - * @return T | null the head of this queue, or `null` if this queue is empty. + * @return T|null the head of this queue, or `null` if this queue is empty. */ - public function peek(): mixed; + public function peek(); /** * Retrieves and removes the head of this queue, or returns `null` @@ -177,9 +178,9 @@ interface QueueInterface extends ArrayInterface * * @see self::remove() * - * @return T | null the head of this queue, or `null` if this queue is empty. + * @return T|null the head of this queue, or `null` if this queue is empty. */ - public function poll(): mixed; + public function poll(); /** * Retrieves and removes the head of this queue. @@ -193,7 +194,7 @@ interface QueueInterface extends ArrayInterface * * @throws NoSuchElementException if this queue is empty. */ - public function remove(): mixed; + public function remove(); /** * Returns the type associated with this queue. |