Passed
Push — master ( f968a7...f474ea )
by y
07:21
created
src/Base/AbstractEntity.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@  discard block
 block discarded – undo
84 84
     protected function _removeWithPost (string $rmPath, array $data, string $field, $diff) {
85 85
         if ($this->hasGid()) {
86 86
             return $this->_setWithPost($rmPath, $data, $field);
87
-        }
88
-        elseif (is_array($diff)) {
87
+        } elseif (is_array($diff)) {
89 88
             return $this->_set($field, array_values(array_diff($this->data[$field] ?? [], $diff)));
90 89
         }
91 90
         return $this->_set($field, array_values(array_filter($this->data[$field] ?? [], $diff)));
@@ -173,11 +172,9 @@  discard block
 block discarded – undo
173 172
         if (isset($field)) {
174 173
             $remote = $this->api->get($this, [], ['fields' => static::OPT_FIELDS[$field] ?? $field]);
175 174
             $this->_setMapped($field, $remote[$field] ?? null);
176
-        }
177
-        elseif ($remote = $this->api->get($this, [], ['expand' => 'this'])) {
175
+        } elseif ($remote = $this->api->get($this, [], ['expand' => 'this'])) {
178 176
             $this->_setData($remote);
179
-        }
180
-        else { // deleted upstream.
177
+        } else { // deleted upstream.
181 178
             $this->api->getPool()->remove($this->getPoolKeys());
182 179
             throw new RuntimeException("{$this} was deleted upstream.");
183 180
         }
Please login to merge, or discard this patch.