Skip to content

Commit c3e2df0

Browse files
aerogusGuillaume Seznec
andauthored
Add annotations to remove deprecated warning message on php8.1 (#152)
Co-authored-by: Guillaume Seznec <gseznec@ina.fr>
1 parent 9967c84 commit c3e2df0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/cli/arguments/Lexer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function __construct(array $items) {
3333
*
3434
* @return string
3535
*/
36+
#[\ReturnTypeWillChange]
3637
public function current() {
3738
return $this->_item;
3839
}
@@ -49,6 +50,7 @@ public function peek() {
4950
/**
5051
* Move the cursor forward 1 element if it is valid.
5152
*/
53+
#[\ReturnTypeWillChange]
5254
public function next() {
5355
if ($this->valid()) {
5456
$this->_shift();
@@ -60,6 +62,7 @@ public function next() {
6062
*
6163
* @return int
6264
*/
65+
#[\ReturnTypeWillChange]
6366
public function key() {
6467
return $this->_index;
6568
}
@@ -68,6 +71,7 @@ public function key() {
6871
* Move forward 1 element and, if the method hasn't been called before, reset
6972
* the cursor's position to 0.
7073
*/
74+
#[\ReturnTypeWillChange]
7175
public function rewind() {
7276
$this->_shift();
7377
if ($this->_first) {
@@ -81,6 +85,7 @@ public function rewind() {
8185
*
8286
* @return bool
8387
*/
88+
#[\ReturnTypeWillChange]
8489
public function valid() {
8590
return ($this->_index < $this->_length);
8691
}

0 commit comments

Comments
 (0)