Passed
Push — main ( dd7998...bae415 )
by Dylan
03:01
created
src/services/ObjectFactory.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,9 @@
 block discarded – undo
25 25
     public static function create(Connector $connector, string $model, array $data = []): ?Model
26 26
     {
27 27
         $model = strtolower($model);
28
-        if (!array_key_exists($model, self::CLASS_MAP)) return null;
28
+        if (!array_key_exists($model, self::CLASS_MAP)) {
29
+            return null;
30
+        }
29 31
 
30 32
         $cls = self::CLASS_MAP[$model];
31 33
         return new $cls($connector, $data);
Please login to merge, or discard this patch.
src/App.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
 
84 84
         if (!$response->isValid() || !$json || !array_key_exists('access_token', $json)) {
85 85
             return $json['access_token'];
86
-        } else {
86
+        }else {
87 87
             return '';
88 88
         }
89 89
     }
Please login to merge, or discard this patch.
src/Connector.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,6 +109,6 @@
 block discarded – undo
109 109
      */
110 110
     protected function auth_url(string $path): string
111 111
     {
112
-        return $this->_auth_domain . '/' . ltrim($path, '/');
112
+        return $this->_auth_domain.'/'.ltrim($path, '/');
113 113
     }
114 114
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@
 block discarded – undo
43 43
     public function __get(string $service): Model
44 44
     {
45 45
         $obj = ObjectFactory::create($this, $service);
46
-        if (!$obj) throw new BadMethodException("Service for `{$service}` does not exist");
46
+        if (!$obj) {
47
+            throw new BadMethodException("Service for `{$service}` does not exist");
48
+        }
47 49
 
48 50
         return $obj;
49 51
     }
Please login to merge, or discard this patch.
src/resource/ListResource.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function getIterator(): Generator
130 130
     {
131
-        return (function () {
131
+        return (function() {
132 132
             $i = 0;
133 133
             $x = 0;
134 134
             $m = $this->count();
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     $t = $this->getItems(ceil($i / self::PAGE_LENGTH));
140 140
                 }
141 141
 
142
-                yield $i => $t[self::PAGE_LENGTH - $x];
142
+                yield $i => $t[self::PAGE_LENGTH-$x];
143 143
 
144 144
                 $x -= 1;
145 145
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,9 @@
 block discarded – undo
67 67
 
68 68
             foreach ($data['items'] as $item) {
69 69
                 $obj = ObjectFactory::make($this->getClient(), $item);
70
-                if (!$obj) continue;
70
+                if (!$obj) {
71
+                    continue;
72
+                }
71 73
 
72 74
                 $this->_items[$page][] = $obj;
73 75
             }
Please login to merge, or discard this patch.
src/resource/ObjectResource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  */
13 13
 class ObjectResource extends ApiResource {
14 14
 
15
-    private $_object_data   = [];
15
+    private $_object_data = [];
16 16
 
17 17
     public function __construct(Connector $connector, array $_object_data = [])
18 18
     {
Please login to merge, or discard this patch.
src/models/Address.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     public function all(): ListResource
14 14
     {
15
-        return new ListResource($this->getClient(), );
15
+        return new ListResource($this->getClient(),);
16 16
     }
17 17
 
18 18
 }
Please login to merge, or discard this patch.