Skip to content

Commit

Permalink
address PHP8.x warnings about return type
Browse files Browse the repository at this point in the history
this requires PHP 7.1 for the void return type, but only for running the
test suite.
  • Loading branch information
dannyvankooten committed Dec 8, 2022
1 parent ac028a7 commit 20674b8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/AltoRouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit 20674b8

Please sign in to comment.