Skip to content

Commit

Permalink
Add annotations to remove deprecated warning message on php8.1 (#152)
Browse files Browse the repository at this point in the history
Co-authored-by: Guillaume Seznec <[email protected]>
  • Loading branch information
aerogus and Guillaume Seznec authored Nov 3, 2022
1 parent 9967c84 commit c3e2df0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/cli/arguments/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function __construct(array $items) {
*
* @return string
*/
#[\ReturnTypeWillChange]
public function current() {
return $this->_item;
}
Expand All @@ -49,6 +50,7 @@ public function peek() {
/**
* Move the cursor forward 1 element if it is valid.
*/
#[\ReturnTypeWillChange]
public function next() {
if ($this->valid()) {
$this->_shift();
Expand All @@ -60,6 +62,7 @@ public function next() {
*
* @return int
*/
#[\ReturnTypeWillChange]
public function key() {
return $this->_index;
}
Expand All @@ -68,6 +71,7 @@ public function key() {
* Move forward 1 element and, if the method hasn't been called before, reset
* the cursor's position to 0.
*/
#[\ReturnTypeWillChange]
public function rewind() {
$this->_shift();
if ($this->_first) {
Expand All @@ -81,6 +85,7 @@ public function rewind() {
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid() {
return ($this->_index < $this->_length);
}
Expand Down

0 comments on commit c3e2df0

Please sign in to comment.