Skip to content

Commit 2b248ae

Browse files
committed
Slight to get code coverage to 100% in Collection
1 parent d32d5af commit 2b248ae

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/Collection.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,10 @@ public function next()
156156
$indexResponse = $this->client->index($this->resource, $this->filters);
157157

158158
$httpCode = $indexResponse->getHttpCode();
159-
Util::ensure(
160-
200,
161-
$httpCode,
162-
Exception::class,
163-
["Did not receive 200 from API. Instead received {$httpCode}", $indexResponse]
164-
);
159+
$expectedHttpCode = 200;
160+
$exceptionArgs = ["Did not receive 200 from API. Instead received {$httpCode}", $indexResponse];
161+
162+
Util::ensure($expectedHttpCode, $httpCode, Exception::class, $exceptionArgs);
165163

166164
$response = $indexResponse->getResponse();
167165
$this->limit = $response['pagination']['limit'];

0 commit comments

Comments
 (0)