Passed
Push — main ( 705e3e...c2f80a )
by Dylan
02:21
created
src/utils/Utils.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         $randomString = '';
18 18
 
19 19
         for ($i = 0; $i < $length; $i++) {
20
-            $randomString .= $characters[rand(0, $charactersLength - 1)];
20
+            $randomString .= $characters[rand(0, $charactersLength-1)];
21 21
         }
22 22
 
23 23
         return $randomString;
@@ -29,6 +29,6 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public static function pack(string $str): string
31 31
     {
32
-        return rtrim(strtr(base64_encode(pack('H*',  hash('sha256', $str))), '+/', '-_'), '=');
32
+        return rtrim(strtr(base64_encode(pack('H*', hash('sha256', $str))), '+/', '-_'), '=');
33 33
     }
34 34
 }
Please login to merge, or discard this patch.
src/utils/Curl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         }
189 189
 
190 190
         if ($this->_enable_cache && $this->getMethod() === 'GET') {
191
-            $cache_key = urlencode($request_uri) . implode(',', $send_headers);
191
+            $cache_key = urlencode($request_uri).implode(',', $send_headers);
192 192
             if (array_key_exists($cache_key, self::$_cache)) {
193 193
                 return self::$_cache[$cache_key];
194 194
             }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         curl_setopt($ch, CURLOPT_AUTOREFERER, true);
209 209
 
210 210
         if (!empty($send_headers))  curl_setopt($ch, CURLOPT_HTTPHEADER, $send_headers);
211
-        if (!is_null($post_data))   {
211
+        if (!is_null($post_data)) {
212 212
             curl_setopt($ch, CURLOPT_POST, 1);
213 213
             curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
214 214
         }
Please login to merge, or discard this patch.
src/Connector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public function curl_api(string $url, string $method = 'GET', array $data = [], array $headers = []): CurlResponse
108 108
     {
109 109
         $url = URL::is_absolute_url($url) ? $url
110
-            : 'https://' . rtrim($this->_host, '/') . '/' . ltrim($url, '/');
110
+            : 'https://'.rtrim($this->_host, '/').'/'.ltrim($url, '/');
111 111
 
112 112
         $curl = new Curl($url, $data, $headers);
113 113
 
@@ -126,6 +126,6 @@  discard block
 block discarded – undo
126 126
      */
127 127
     protected function auth_url(string $path): string
128 128
     {
129
-        return $this->_auth_domain . '/' . ltrim($path, '/');
129
+        return $this->_auth_domain.'/'.ltrim($path, '/');
130 130
     }
131 131
 }
Please login to merge, or discard this patch.
src/services/Customers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function fetch(int $id): ?Customer
24 24
     {
25 25
         /** @var Customer|null $fetch */
26
-        $fetch = $this->_get('api/customers/customer' . $id);
26
+        $fetch = $this->_get('api/customers/customer'.$id);
27 27
         return $fetch;
28 28
     }
29 29
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function update(int $id, array $data): ?Customer
51 51
     {
52 52
         /** @var Customer|null $post */
53
-        $post = $this->_post('api/customers/customer/' . $id, $data);
53
+        $post = $this->_post('api/customers/customer/'.$id, $data);
54 54
         return $post;
55 55
     }
56 56
 
Please login to merge, or discard this patch.
src/services/Addresses.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function fetch(int $id): ?Address
24 24
     {
25 25
         /** @var Address|null $address */
26
-        $address = $this->_get('api/addresses/address' . $id);
26
+        $address = $this->_get('api/addresses/address'.$id);
27 27
         return $address;
28 28
     }
29 29
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function update(int $id, array $data): ?Address
51 51
     {
52 52
         /** @var Address|null $address */
53
-        $address = $this->_post('api/addresses/address/' . $id, $data);
53
+        $address = $this->_post('api/addresses/address/'.$id, $data);
54 54
         return $address;
55 55
     }
56 56
 
Please login to merge, or discard this patch.
src/services/Orders.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function fetch(int $id): ?Order
44 44
     {
45 45
         /** @var Order|null $fetch */
46
-        $fetch = $this->_get('api/orders/order' . $id);
46
+        $fetch = $this->_get('api/orders/order'.$id);
47 47
         return $fetch;
48 48
     }
49 49
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public function update(int $id, array $data): ?Order
71 71
     {
72 72
         /** @var Order|null $post */
73
-        $post = $this->_post('api/orders/order/' . $id, $data);
73
+        $post = $this->_post('api/orders/order/'.$id, $data);
74 74
         return $post;
75 75
     }
76 76
 
Please login to merge, or discard this patch.
src/resource/SimpleList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         $t = $this->getItems();
63 63
         $c = $this->count();
64 64
 
65
-        return (function () use ($t, $c) {
65
+        return (function() use ($t, $c) {
66 66
             $i = 0;
67 67
 
68 68
             while ($i < $c) {
Please login to merge, or discard this patch.
src/services/CustomPages.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function fetch(int $id): ?CustomPage
38 38
     {
39 39
         /** @var CustomPage|null $fetch */
40
-        $fetch = $this->_get('api/pages/page' . $id);
40
+        $fetch = $this->_get('api/pages/page'.$id);
41 41
         return $fetch;
42 42
     }
43 43
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function update(int $id, array $data): ?CustomPage
65 65
     {
66 66
         /** @var CustomPage|null $post */
67
-        $post = $this->_post('api/pages/page/' . $id, $data);
67
+        $post = $this->_post('api/pages/page/'.$id, $data);
68 68
         return $post;
69 69
     }
70 70
 
Please login to merge, or discard this patch.
src/services/Collections.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function fetch(int $id): ?Collection
23 23
     {
24 24
         /** @var Collection|null $fetch */
25
-        $fetch = $this->_get('api/collections/collection' . $id);
25
+        $fetch = $this->_get('api/collections/collection'.$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): ?Collection
50 50
     {
51 51
         /** @var Collection|null $post */
52
-        $post = $this->_post('api/collections/collection/' . $id, $data);
52
+        $post = $this->_post('api/collections/collection/'.$id, $data);
53 53
         return $post;
54 54
     }
55 55
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function delete(int $id): bool
63 63
     {
64
-        return $this->_delete('api/collections/collection/' . $id);
64
+        return $this->_delete('api/collections/collection/'.$id);
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.