Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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