@@ -162,10 +162,10 @@ |
||
162 | 162 | ?array $body = null) |
163 | 163 | { |
164 | 164 | $url = sprintf('%s/%s%s%s', |
165 | - $this->apiEndpoint, |
|
166 | - self::API_VERSION, |
|
167 | - $this->composePath($path), |
|
168 | - $this->composerQuery($query)); |
|
165 | + $this->apiEndpoint, |
|
166 | + self::API_VERSION, |
|
167 | + $this->composePath($path), |
|
168 | + $this->composerQuery($query)); |
|
169 | 169 | |
170 | 170 | return $this->performHttpCallToFullUrl($httpMethod, $url, $this->composeRequestBody($body)); |
171 | 171 | } |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | { |
280 | 280 | if ($first) |
281 | 281 | { |
282 | - $uri .= '?'; |
|
282 | + $uri .= '?'; |
|
283 | 283 | $first = false; |
284 | 284 | } |
285 | 285 | else |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | */ |
328 | 328 | private function parseResponseBody(ResponseInterface $response): ?array |
329 | 329 | { |
330 | - $body = (string)$response->getBody(); |
|
330 | + $body = (string) $response->getBody(); |
|
331 | 331 | if (empty($body)) |
332 | 332 | { |
333 | 333 | if ($response->getStatusCode()===self::HTTP_NO_CONTENT) |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | throw new ClubCollectApiException("Unable to decode ClubCollect response: '{$body}'."); |
345 | 345 | } |
346 | 346 | |
347 | - if ($response->getStatusCode()>=400) |
|
347 | + if ($response->getStatusCode() >= 400) |
|
348 | 348 | { |
349 | 349 | throw ClubCollectApiException::createFromResponse($response); |
350 | 350 | } |
@@ -102,7 +102,7 @@ |
||
102 | 102 | { |
103 | 103 | $list[] = $this->getResourceObject($import); |
104 | 104 | } |
105 | - } while ($page<($to ?? $result['page']['total_pages'])); |
|
105 | + } while ($page < ($to ?? $result['page']['total_pages'])); |
|
106 | 106 | |
107 | 107 | return $list; |
108 | 108 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | { |
25 | 25 | /** @var Company $resource */ |
26 | 26 | $resource = parent::restRead(['companies', $this->client->getCompanyId()], |
27 | - ['api_key' => $this->client->getApiKey()]); |
|
27 | + ['api_key' => $this->client->getApiKey()]); |
|
28 | 28 | if (!is_a($resource, Company::class)) |
29 | 29 | { |
30 | 30 | throw new ClubCollectApiException('Expected a Company object, got a %s', get_class($resource)); |
@@ -29,8 +29,8 @@ |
||
29 | 29 | { |
30 | 30 | /** @var Import $resource */ |
31 | 31 | $resource = parent::restCreate(['imports'], |
32 | - ['api_key' => $this->client->getApiKey()], |
|
33 | - ['title' => $title, |
|
32 | + ['api_key' => $this->client->getApiKey()], |
|
33 | + ['title' => $title, |
|
34 | 34 | 'company_id' => $this->client->getCompanyId(), |
35 | 35 | 'expected_invoices_count' => $expectedInvoiceCount]); |
36 | 36 | if (!is_a($resource, Import::class)) |