Skip to content

Commit

Permalink
PHP 8.1 is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 29, 2021
1 parent f1513a4 commit 182f7f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"php": ">=5.4.0"
},
"require-dev": {
"nette/tester": "~1.7.0"
"nette/tester": "^1.7 || ^2.0"
},
"suggest": {
"ext-curl": "Allows you to use Http\\CurlClient"
Expand Down
7 changes: 6 additions & 1 deletion src/Github/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function limit($limit)
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
{
$this->request = $this->firstRequest;
Expand All @@ -68,6 +69,7 @@ public function rewind()
/**
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
{
return $this->request !== NULL && ($this->limit === NULL || $this->counter < $this->limit);
Expand All @@ -77,6 +79,7 @@ public function valid()
/**
* @return Http\Response
*/
#[\ReturnTypeWillChange]
public function current()
{
$this->load();
Expand All @@ -87,6 +90,7 @@ public function current()
/**
* @return int
*/
#[\ReturnTypeWillChange]
public function key()
{
return static::parsePage($this->request->getUrl());
Expand All @@ -96,11 +100,12 @@ public function key()
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
$this->load();

if ($url = static::parseLink($this->response->getHeader('Link'), 'next')) {
if ($url = static::parseLink((string) $this->response->getHeader('Link'), 'next')) {
$this->request = new Http\Request(
$this->request->getMethod(),
$url,
Expand Down

0 comments on commit 182f7f0

Please sign in to comment.