diff options
Diffstat (limited to 'vendor/ramsey/collection/src/DoubleEndedQueueInterface.php')
-rw-r--r-- | vendor/ramsey/collection/src/DoubleEndedQueueInterface.php | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php b/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php index d7df53469..15cc0e97b 100644 --- a/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php +++ b/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php @@ -15,6 +15,7 @@ declare(strict_types=1); namespace Ramsey\Collection; use Ramsey\Collection\Exception\NoSuchElementException; +use RuntimeException; /** * A linear collection that supports element insertion and removal at both ends. @@ -175,13 +176,12 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @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`. */ - // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint - public function addFirst($element): bool; + public function addFirst(mixed $element): bool; /** * Inserts the specified element at the end of this queue if it is possible @@ -196,13 +196,12 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @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`. */ - // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint - public function addLast($element): bool; + public function addLast(mixed $element): bool; /** * Inserts the specified element at the front of this queue if it is @@ -216,8 +215,7 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @return bool `true` if the element was added to this queue, else `false`. */ - // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint - public function offerFirst($element): bool; + public function offerFirst(mixed $element): bool; /** * Inserts the specified element at the end of this queue if it is possible @@ -231,8 +229,7 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @return bool `true` if the element was added to this queue, else `false`. */ - // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint - public function offerLast($element): bool; + public function offerLast(mixed $element): bool; /** * Retrieves and removes the head of this queue. @@ -244,7 +241,7 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @throws NoSuchElementException if this queue is empty. */ - public function removeFirst(); + public function removeFirst(): mixed; /** * Retrieves and removes the tail of this queue. @@ -256,23 +253,23 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @throws NoSuchElementException if this queue is empty. */ - public function removeLast(); + public function removeLast(): mixed; /** * Retrieves and removes the head of this queue, or returns `null` if this * queue is empty. * - * @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 pollFirst(); + public function pollFirst(): mixed; /** * Retrieves and removes the tail of this queue, or returns `null` if this * queue is empty. * - * @return T|null the tail of this queue, or `null` if this queue is empty. + * @return T | null the tail of this queue, or `null` if this queue is empty. */ - public function pollLast(); + public function pollLast(): mixed; /** * Retrieves, but does not remove, the head of this queue. @@ -284,7 +281,7 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @throws NoSuchElementException if this queue is empty. */ - public function firstElement(); + public function firstElement(): mixed; /** * Retrieves, but does not remove, the tail of this queue. @@ -296,21 +293,21 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @throws NoSuchElementException if this queue is empty. */ - public function lastElement(); + public function lastElement(): mixed; /** * Retrieves, but does not remove, the head of this queue, or returns `null` * if this queue is empty. * - * @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 peekFirst(); + public function peekFirst(): mixed; /** * Retrieves, but does not remove, the tail of this queue, or returns `null` * if this queue is empty. * - * @return T|null the tail of this queue, or `null` if this queue is empty. + * @return T | null the tail of this queue, or `null` if this queue is empty. */ - public function peekLast(); + public function peekLast(): mixed; } |