Completed
Push — main ( 38cdcf...02b4a5 )
by Dylan
02:25 queued 02:25
created
src/services/Locations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function fetch(int $id): ?Location
23 23
     {
24 24
         /** @var Location|null $fetch */
25
-        $fetch = $this->_get('api/locations/location/' . $id);
25
+        $fetch = $this->_get('api/locations/location/'.$id);
26 26
         return $fetch;
27 27
     }
28 28
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function update(int $id, array $data): ?Location
50 50
     {
51 51
         /** @var Location|null $post */
52
-        $post = $this->_post('api/locations/location/' . $id, $data);
52
+        $post = $this->_post('api/locations/location/'.$id, $data);
53 53
         return $post;
54 54
     }
55 55
 
Please login to merge, or discard this patch.
src/services/DeliveryZones.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function fetch(int $id): ?DeliveryZone
23 23
     {
24 24
         /** @var DeliveryZone|null $fetch */
25
-        $fetch = $this->_get('api/delivery-zones/zone/' . $id);
25
+        $fetch = $this->_get('api/delivery-zones/zone/'.$id);
26 26
         return $fetch;
27 27
     }
28 28
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function update(int $id, array $data): ?DeliveryZone
50 50
     {
51 51
         /** @var DeliveryZone|null $post */
52
-        $post = $this->_post('api/delivery-zones/zone/' . $id, $data);
52
+        $post = $this->_post('api/delivery-zones/zone/'.$id, $data);
53 53
         return $post;
54 54
     }
55 55
 
Please login to merge, or discard this patch.
src/services/ApiService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         if ($curl->isValid()) {
78 78
             if ($curl->isJSON()) {
79 79
                 return ObjectFactory::make($this->getClient(), $curl->getJSON());
80
-            } else {
80
+            }else {
81 81
                 return true;
82 82
             }
83 83
         }
Please login to merge, or discard this patch.
src/services/Products.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function fetch(int $id): ?Product
40 40
     {
41 41
         /** @var Product|null $fetch */
42
-        $fetch = $this->_get('api/products/product/' . $id);
42
+        $fetch = $this->_get('api/products/product/'.$id);
43 43
         return $fetch;
44 44
     }
45 45
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     public function update(int $id, array $data): ?Product
67 67
     {
68 68
         /** @var Product|null $post */
69
-        $post = $this->_post('api/products/product/' . $id, $data);
69
+        $post = $this->_post('api/products/product/'.$id, $data);
70 70
         return $post;
71 71
     }
72 72
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function delete(int $id): bool
80 80
     {
81
-        return $this->_delete('api/products/product/' . $id);
81
+        return $this->_delete('api/products/product/'.$id);
82 82
     }
83 83
 
84 84
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function setStockLevel(int $id, int $quantity, Location $location): bool
93 93
     {
94
-        return (bool) $this->_post('api/products/inventory/'. $id . '/quantity', [
94
+        return (bool) $this->_post('api/products/inventory/'.$id.'/quantity', [
95 95
             'location'  => $location->ID,
96 96
             'quantity'  => $quantity
97 97
         ]);
Please login to merge, or discard this patch.
src/App.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
  */
15 15
 class App extends Connector {
16 16
 
17
-    const CODE_URL      = '/oauth/code';
17
+    const CODE_URL = '/oauth/code';
18 18
 
19 19
     const ACCESS_TOKEN_PARAM    = 'lb_app_access_token';
20 20
     const API_CHALLENGE_PARAM   = 'lb_app_api_challenge';
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function __construct(string $app_id, string $app_secret, string $auth_domain = self::AUTH_DOMAIN)
32 32
     {
33 33
         if (!$app_id || !$app_secret) {
34
-            throw new InvalidArgumentException(static::class . "expects an app_id and app_secret");
34
+            throw new InvalidArgumentException(static::class."expects an app_id and app_secret");
35 35
         }
36 36
 
37 37
         $this->setAppID($app_id);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         if (!$response->isValid() || !$json || !array_key_exists('access_token', $json)) {
165 165
             if (array_key_exists('error', $json)) throw new OAuthException($json['error']);
166 166
             return '';
167
-        } else {
167
+        }else {
168 168
             $this->setAccessToken($json['access_token']);
169 169
 
170 170
             if (array_key_exists('store_data', $json) &&
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
         if (!$response->isValid() || !$json || !array_key_exists('access_token', $json)) {
215 215
             throw new OAuthException($response->getError());
216
-        } else {
216
+        }else {
217 217
             $this->setAccessToken($json['access_token']);
218 218
         }
219 219
 
Please login to merge, or discard this patch.