diff --git a/composer.json b/composer.json index 46182d7..853f4c2 100644 --- a/composer.json +++ b/composer.json @@ -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" diff --git a/src/Github/Paginator.php b/src/Github/Paginator.php index 8829d5f..7405b53 100644 --- a/src/Github/Paginator.php +++ b/src/Github/Paginator.php @@ -57,6 +57,7 @@ public function limit($limit) /** * @return void */ + #[\ReturnTypeWillChange] public function rewind() { $this->request = $this->firstRequest; @@ -68,6 +69,7 @@ public function rewind() /** * @return bool */ + #[\ReturnTypeWillChange] public function valid() { return $this->request !== NULL && ($this->limit === NULL || $this->counter < $this->limit); @@ -77,6 +79,7 @@ public function valid() /** * @return Http\Response */ + #[\ReturnTypeWillChange] public function current() { $this->load(); @@ -87,6 +90,7 @@ public function current() /** * @return int */ + #[\ReturnTypeWillChange] public function key() { return static::parsePage($this->request->getUrl()); @@ -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,