Passed
Branch master (876b6d)
by y
02:04
created
src/Base/AbstractEntity.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
             $type = static::getType();
42 42
             if (!$this->hasId()) {
43 43
                 $remote = $this->api->post($this->getDir(), [$type => $this->getPatch()]);
44
-            }
45
-            else {
44
+            } else {
46 45
                 assert($this->canUpdate);
47 46
                 $remote = $this->api->put($this, [$type => $this->getPatch()]);
48 47
             }
Please login to merge, or discard this patch.
src/Base/Data.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,8 +128,7 @@
 block discarded – undo
128 128
     public function __construct ($caller, array $data = []) {
129 129
         if ($caller instanceof Api) {
130 130
             $this->api = $caller;
131
-        }
132
-        elseif ($caller instanceof Data) {
131
+        } elseif ($caller instanceof Data) {
133 132
             $this->api = $caller->api;
134 133
         }
135 134
         $this->import($data);
Please login to merge, or discard this patch.
src/Metafield.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,11 +59,9 @@
 block discarded – undo
59 59
     protected function getDir (): string {
60 60
         if ($this->owner instanceof Shop) {
61 61
             return 'metafields';
62
-        }
63
-        elseif ($this->owner instanceof AbstractCollection) {
62
+        } elseif ($this->owner instanceof AbstractCollection) {
64 63
             return "collections/{$this->owner->getId()}/metafields";
65
-        }
66
-        elseif ($this->owner instanceof Variant) {
64
+        } elseif ($this->owner instanceof Variant) {
67 65
             return "{$this->owner->getDir()}/{$this->owner->getId()}/metafields";
68 66
         }
69 67
         return "{$this->owner}/metafields";
Please login to merge, or discard this patch.
src/InventoryLevel.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
50 50
         if ($this->isDiff()) {
51 51
             if ($this->getUpdatedAt()) {
52 52
                 $remote = $this->api->post('inventory_levels/adjust', $this->getData());
53
-            }
54
-            else {
53
+            } else {
55 54
                 $remote = $this->api->post('inventory_levels/connect', $this->getData());
56 55
             }
57 56
             $this->import($remote['inventory_level']);
Please login to merge, or discard this patch.
src/Api.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,7 @@
 block discarded – undo
98 98
             $payload = json_encode($args[1], JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR);
99 99
             curl_setopt($ch, CURLOPT_POST, true);
100 100
             curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
101
-        }
102
-        else {
101
+        } else {
103 102
             $query = $args[1] ?? [];
104 103
             $payload = null;
105 104
         }
Please login to merge, or discard this patch.
src/CustomCollection.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@
 block discarded – undo
66 66
             if ($this->hasId()) {
67 67
                 $collects = Collect::search($this->api, ['collection_id' => $this->getId()]);
68 68
                 $this->collects = new DataSet(iterator_to_array($collects));
69
-            }
70
-            else {
69
+            } else {
71 70
                 $this->collects = new DataSet();
72 71
             }
73 72
         }
Please login to merge, or discard this patch.