Completed
Pull Request — master (#67)
by Thibaud
03:52
created
src/PhraseanetSDK/Orders/OrderRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@  discard block
 block discarded – undo
20 20
     public function getOrder($orderId)
21 21
     {
22 22
         // 't' param is used for cache busting
23
-        $parameters = [ 't' => time() ];
23
+        $parameters = ['t' => time()];
24 24
 
25
-        $response = $this->query('GET', 'v2/orders/' . $orderId, $parameters);
25
+        $response = $this->query('GET', 'v2/orders/'.$orderId, $parameters);
26 26
 
27 27
         if ($response->isEmpty()) {
28 28
             throw new RuntimeException('Response content is empty');
29 29
         }
30 30
 
31
-        if (! $response->hasProperty('data')) {
31
+        if (!$response->hasProperty('data')) {
32 32
             throw new RuntimeException('Missing \'data\' property in response');
33 33
         }
34 34
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $parameters = [
42 42
             'page' => max($pageIndex, 0),
43 43
             'per_page' => max($pageSize, 1),
44
-            'includes' => [ 'elements' ],
44
+            'includes' => ['elements'],
45 45
             't' => time()
46 46
         ];
47 47
 
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
             throw new RuntimeException('Response content is empty');
52 52
         }
53 53
 
54
-        if (! $response->hasProperty('data')) {
54
+        if (!$response->hasProperty('data')) {
55 55
             throw new RuntimeException('Missing \'data\' property in response');
56 56
         }
57 57
 
58
-        if (! $response->hasProperty('meta')) {
58
+        if (!$response->hasProperty('meta')) {
59 59
             throw new RuntimeException('Missing \'meta\' property in response');
60 60
         }
61 61
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             'records' => $recordsIds
72 72
         ];
73 73
 
74
-        $response = $this->query('POST', 'v2/orders/', [], [ 'data' => $parameters ], [
74
+        $response = $this->query('POST', 'v2/orders/', [], ['data' => $parameters], [
75 75
             'Accept' => 'application/json',
76 76
             'Content-Type' => 'application/json'
77 77
         ]);
Please login to merge, or discard this patch.