@@ -21,17 +21,17 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | // 't' param is used for cache busting |
| 23 | 23 | $parameters = [ |
| 24 | - 'includes' => [ 'elements' ], |
|
| 24 | + 'includes' => ['elements'], |
|
| 25 | 25 | 't' => time() |
| 26 | 26 | ]; |
| 27 | 27 | |
| 28 | - $response = $this->query('GET', 'v2/orders/' . $orderId, $parameters); |
|
| 28 | + $response = $this->query('GET', 'v2/orders/'.$orderId, $parameters); |
|
| 29 | 29 | |
| 30 | 30 | if ($response->isEmpty()) { |
| 31 | 31 | throw new RuntimeException('Response content is empty'); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - if (! $response->hasProperty('data')) { |
|
| 34 | + if (!$response->hasProperty('data')) { |
|
| 35 | 35 | throw new RuntimeException('Missing \'data\' property in response'); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $parameters = [ |
| 45 | 45 | 'page' => max($pageIndex, 0), |
| 46 | 46 | 'per_page' => max($pageSize, 1), |
| 47 | - 'includes' => [ 'elements' ], |
|
| 47 | + 'includes' => ['elements'], |
|
| 48 | 48 | 't' => time() |
| 49 | 49 | ]; |
| 50 | 50 | |
@@ -54,11 +54,11 @@ discard block |
||
| 54 | 54 | throw new RuntimeException('Response content is empty'); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - if (! $response->hasProperty('data')) { |
|
| 57 | + if (!$response->hasProperty('data')) { |
|
| 58 | 58 | throw new RuntimeException('Missing \'data\' property in response'); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if (! $response->hasProperty('meta')) { |
|
| 61 | + if (!$response->hasProperty('meta')) { |
|
| 62 | 62 | throw new RuntimeException('Missing \'meta\' property in response'); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | 'records' => $recordsIds |
| 75 | 75 | ]; |
| 76 | 76 | |
| 77 | - $response = $this->query('POST', 'v2/orders/', [], [ 'data' => $parameters ], [ |
|
| 77 | + $response = $this->query('POST', 'v2/orders/', [], ['data' => $parameters], [ |
|
| 78 | 78 | 'Accept' => 'application/json', |
| 79 | 79 | 'Content-Type' => 'application/json' |
| 80 | 80 | ]); |