Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use template type in SplDoublyLinkedList methods #1643

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions SPL/SPL_c1.php
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializa
/**
* Add/insert a new value at the specified index
* @param mixed $index The index where the new value is to be inserted.
* @param mixed $value The new value for the index.
* @param TValue $value The new value for the index.
* @return void
* @link https://php.net/spldoublylinkedlist.add
* @since 5.5
Expand All @@ -1077,23 +1077,23 @@ public function add(
/**
* Pops a node from the end of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.pop.php
* @return mixed The value of the popped node.
* @return TValue The value of the popped node.
*/
#[TentativeType]
public function pop(): mixed {}

/**
* Shifts a node from the beginning of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.shift.php
* @return mixed The value of the shifted node.
* @return TValue The value of the shifted node.
*/
#[TentativeType]
public function shift(): mixed {}

/**
* Pushes an element at the end of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.push.php
* @param mixed $value <p>
* @param TValue $value <p>
* The value to push.
* </p>
* @return void
Expand All @@ -1104,7 +1104,7 @@ public function push(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')]
/**
* Prepends the doubly linked list with an element
* @link https://php.net/manual/en/spldoublylinkedlist.unshift.php
* @param mixed $value <p>
* @param TValue $value <p>
* The value to unshift.
* </p>
* @return void
Expand All @@ -1115,15 +1115,15 @@ public function unshift(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: ''
/**
* Peeks at the node from the end of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.top.php
* @return mixed The value of the last node.
* @return TValue The value of the last node.
*/
#[TentativeType]
public function top(): mixed {}

/**
* Peeks at the node from the beginning of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.bottom.php
* @return mixed The value of the first node.
* @return TValue The value of the first node.
*/
#[TentativeType]
public function bottom(): mixed {}
Expand Down Expand Up @@ -1182,7 +1182,7 @@ public function offsetExists($index): bool {}
* @param mixed $index <p>
* The index with the value.
* </p>
* @return mixed The value at the specified <i>index</i>.
* @return TValue The value at the specified <i>index</i>.
*/
#[TentativeType]
public function offsetGet($index): mixed {}
Expand All @@ -1193,7 +1193,7 @@ public function offsetGet($index): mixed {}
* @param mixed $index <p>
* The index being set.
* </p>
* @param mixed $value <p>
* @param TValue $value <p>
* The new value for the <i>index</i>.
* </p>
* @return void
Expand Down Expand Up @@ -1223,7 +1223,7 @@ public function rewind(): void {}
/**
* Return current array entry
* @link https://php.net/manual/en/spldoublylinkedlist.current.php
* @return mixed The current node value.
* @return TValue The current node value.
*/
#[TentativeType]
public function current(): mixed {}
Expand Down