aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-02-15 18:29:24 +0000
committerMario <mario@mariovavti.com>2021-02-15 18:29:24 +0000
commit02401ea9fd5d53f590305c0f9834685cda58723d (patch)
treee60e292f8ae389c3a353dafda37003b4c15a45d5 /vendor/ramsey/collection/src/DoubleEndedQueueInterface.php
parent18c8f1b903e90ca3632520b90d21ec3770bf6e0b (diff)
downloadvolse-hubzilla-02401ea9fd5d53f590305c0f9834685cda58723d.tar.gz
volse-hubzilla-02401ea9fd5d53f590305c0f9834685cda58723d.tar.bz2
volse-hubzilla-02401ea9fd5d53f590305c0f9834685cda58723d.zip
composer update ramsey/collection
Diffstat (limited to 'vendor/ramsey/collection/src/DoubleEndedQueueInterface.php')
-rw-r--r--vendor/ramsey/collection/src/DoubleEndedQueueInterface.php31
1 files changed, 19 insertions, 12 deletions
diff --git a/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php b/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php
index 6b23cf553..67aae5e2e 100644
--- a/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php
+++ b/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php
@@ -158,6 +158,9 @@ use Ramsey\Collection\Exception\NoSuchElementException;
* ability to insert nulls. This is so because `null` is used as a special
* return value by various methods to indicated that the double-ended queue is
* empty.
+ *
+ * @template T
+ * @template-extends QueueInterface<T>
*/
interface DoubleEndedQueueInterface extends QueueInterface
{
@@ -168,7 +171,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* When using a capacity-restricted double-ended queue, it is generally
* preferable to use the `offerFirst()` method.
*
- * @param mixed $element The element to add to the front of this queue.
+ * @param T $element The element to add to the front of this queue.
*
* @return bool `true` if this queue changed as a result of the call.
*
@@ -177,6 +180,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* Implementations should use a more-specific exception that extends
* `\RuntimeException`.
*/
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
public function addFirst($element): bool;
/**
@@ -188,7 +192,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
*
* This method is equivalent to `add()`.
*
- * @param mixed $element The element to add to the end of this queue.
+ * @param T $element The element to add to the end of this queue.
*
* @return bool `true` if this queue changed as a result of the call.
*
@@ -197,6 +201,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* Implementations should use a more-specific exception that extends
* `\RuntimeException`.
*/
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
public function addLast($element): bool;
/**
@@ -207,10 +212,11 @@ interface DoubleEndedQueueInterface extends QueueInterface
* preferable to `addFirst()`, which can fail to insert an element only by
* throwing an exception.
*
- * @param mixed $element The element to add to the front of this queue.
+ * @param T $element The element to add to the front of this queue.
*
* @return bool `true` if the element was added to this queue, else `false`.
*/
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
public function offerFirst($element): bool;
/**
@@ -221,10 +227,11 @@ interface DoubleEndedQueueInterface extends QueueInterface
* preferable to `addLast()` which can fail to insert an element only by
* throwing an exception.
*
- * @param mixed $element The element to add to the end of this queue.
+ * @param T $element The element to add to the end of this queue.
*
* @return bool `true` if the element was added to this queue, else `false`.
*/
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
public function offerLast($element): bool;
/**
@@ -233,7 +240,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* This method differs from `pollFirst()` only in that it throws an
* exception if this queue is empty.
*
- * @return mixed the first element in this queue.
+ * @return T the first element in this queue.
*
* @throws NoSuchElementException if this queue is empty.
*/
@@ -245,7 +252,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* This method differs from `pollLast()` only in that it throws an exception
* if this queue is empty.
*
- * @return mixed the last element in this queue.
+ * @return T the last element in this queue.
*
* @throws NoSuchElementException if this queue is empty.
*/
@@ -255,7 +262,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* Retrieves and removes the head of this queue, or returns `null` if this
* queue is empty.
*
- * @return mixed|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();
@@ -263,7 +270,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* Retrieves and removes the tail of this queue, or returns `null` if this
* queue is empty.
*
- * @return mixed|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();
@@ -273,7 +280,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* This method differs from `peekFirst()` only in that it throws an
* exception if this queue is empty.
*
- * @return mixed the head of this queue.
+ * @return T the head of this queue.
*
* @throws NoSuchElementException if this queue is empty.
*/
@@ -285,7 +292,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* This method differs from `peekLast()` only in that it throws an exception
* if this queue is empty.
*
- * @return mixed the tail of this queue.
+ * @return T the tail of this queue.
*
* @throws NoSuchElementException if this queue is empty.
*/
@@ -295,7 +302,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* Retrieves, but does not remove, the head of this queue, or returns `null`
* if this queue is empty.
*
- * @return mixed|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();
@@ -303,7 +310,7 @@ interface DoubleEndedQueueInterface extends QueueInterface
* Retrieves, but does not remove, the tail of this queue, or returns `null`
* if this queue is empty.
*
- * @return mixed|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();
}