Completed
Push — main ( 761c95...87ee99 )
by Dylan
02:32 queued 02:32
created
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.
examples/Auth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
         $challenge = self::get_app()->getAPIChallenge();
91 91
 
92 92
         // Redirect to the auth URL
93
-        header("Location: " . self::get_app()->getAuthURL($process, $error, $challenge));
93
+        header("Location: ".self::get_app()->getAuthURL($process, $error, $challenge));
94 94
         flush();
95 95
         die();
96 96
     }
Please login to merge, or discard this patch.
src/Connector.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Lifeboat;
4 4
 
5
-require_once __DIR__ . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'functions.php';
5
+require_once __DIR__.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'functions.php';
6 6
 
7 7
 use Lifeboat\Exceptions\BadMethodException;
8 8
 use Lifeboat\Exceptions\OAuthException;
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function curl_api(string $url, string $method = 'GET', array $data = [], array $headers = []): CurlResponse
143 143
     {
144 144
         $uri = URL::is_absolute_url($url) ? $url
145
-            : 'https://' . rtrim($this->getHost(), '/') . '/' . ltrim($url, '/');
145
+            : 'https://'.rtrim($this->getHost(), '/').'/'.ltrim($url, '/');
146 146
 
147 147
         $curl = new Curl($uri, $data, $headers);
148 148
 
@@ -178,6 +178,6 @@  discard block
 block discarded – undo
178 178
      */
179 179
     protected function auth_url(string $path): string
180 180
     {
181
-        return rtrim($this->_auth_domain, '/') . '/' . ltrim($path, '/');
181
+        return rtrim($this->_auth_domain, '/').'/'.ltrim($path, '/');
182 182
     }
183 183
 }
Please login to merge, or discard this patch.