1
0
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:
Danny van Kooten
2022-12-08 11:11:32 +01:00
parent ac028a7f3f
commit 20674b8953

View File

@@ -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]);
}