mirror of
https://github.com/dannyvankooten/AltoRouter.git
synced 2025-08-05 16:07:32 +02:00
address PHP8.x warnings about return type
this requires PHP 7.1 for the void return type, but only for running the test suite.
This commit is contained in:
@@ -25,23 +25,26 @@ class SimpleTraversable implements Iterator
|
||||
['POST', '/bar', 'bar_action', 'second_route']
|
||||
];
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
return $this->_data[$this->_position];
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
return $this->_position;
|
||||
}
|
||||
public function next()
|
||||
public function next() : void
|
||||
{
|
||||
++$this->_position;
|
||||
}
|
||||
public function rewind()
|
||||
public function rewind() : void
|
||||
{
|
||||
$this->_position = 0;
|
||||
}
|
||||
public function valid()
|
||||
public function valid() : bool
|
||||
{
|
||||
return isset($this->_data[$this->_position]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user