Skip to content

Commit 7ae5ad0

Browse files
committed
Fix error Cannot use ::class with dynamic class name
1 parent 9b35fe9 commit 7ae5ad0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Response/Paginated/PaginateResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ function nextPage(): bool {
150150
/** @var Request $request **/
151151

152152
/** @var R **/
153-
$response = $this->client->call("GET", $next, null, $this->response::class, $this->errors);
153+
$response = $this->client->call("GET", $next, null, get_class($this->response), $this->errors);
154154
// Inserting to the cache if user enabled
155155
if($this->cacheEnabled){
156156
$this->cache[] = $response;

tests/Integration/BaseTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ class BaseTestCase extends TestCase {
2222
/** @var Sigfox **/
2323
protected $client;
2424

25-
protected array $history = [];
25+
protected array $history;
2626

2727
protected function setUp(): void
2828
{
29+
$this->history = [];
2930
$mock = new MockHandler();
3031
$history = Middleware::history($this->history);
3132
$handlerStack = HandlerStack::create($mock);

0 commit comments

Comments
 (0)