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