Passed
Push — main ( 11438a...0b6967 )
by Dylan
02:15
created
src/factory/ObjectFactory.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
     public static function create(Connector $connector, string $model, array $data = []): ?Model
22 22
     {
23 23
         $model = strtolower($model);
24
-        if (!array_key_exists($model, ClassMap::MODELS)) return null;
24
+        if (!array_key_exists($model, ClassMap::MODELS)) {
25
+            return null;
26
+        }
25 27
 
26 28
         $cls = ClassMap::MODELS[$model];
27 29
         return new $cls($connector, $data);
@@ -35,7 +37,9 @@  discard block
 block discarded – undo
35 37
     public static function make(Connector $connector, array $data): ?ObjectResource
36 38
     {
37 39
         $model = $data['model'] ?? '';
38
-        if (!$model) return new ObjectResource($connector, $data);
40
+        if (!$model) {
41
+            return new ObjectResource($connector, $data);
42
+        }
39 43
         return self::create($connector, $model, $data);
40 44
     }
41 45
 }
Please login to merge, or discard this patch.
src/factory/ServiceFactory.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@
 block discarded – undo
19 19
     public static function inst(Connector $connector, string $service): ?ApiService
20 20
     {
21 21
         $service = strtolower($service);
22
-        if (!array_key_exists($service, ClassMap::SERVICES)) return null;
22
+        if (!array_key_exists($service, ClassMap::SERVICES)) {
23
+            return null;
24
+        }
23 25
 
24 26
         $cls = ClassMap::SERVICES[$service];
25 27
         return new $cls($connector);
Please login to merge, or discard this patch.
src/services/ApiService.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,9 @@
 block discarded – undo
98 98
     {
99 99
         $curl = $this->getClient()->curl_api($url, 'DELETE', $params);
100 100
 
101
-        if ($curl->isValid()) return true;
101
+        if ($curl->isValid()) {
102
+            return true;
103
+        }
102 104
 
103 105
         throw new ApiException($curl->getError());
104 106
     }
Please login to merge, or discard this patch.
src/models/Address.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,9 @@
 block discarded – undo
59 59
      */
60 60
     public function Customer(): ?Customer
61 61
     {
62
-        if (!$this->CustomerID) return null;
62
+        if (!$this->CustomerID) {
63
+            return null;
64
+        }
63 65
 
64 66
         /** @var Customer|null $customer */
65 67
         $customer = $this->getClient()->customers->fetch($this->CustomerID);
Please login to merge, or discard this patch.