Passed
Push — master ( 0658f3...f968a7 )
by y
02:18
created
src/Api.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -509,8 +509,7 @@
 block discarded – undo
509 509
                 'sync' => $token,
510 510
                 'opt_expand' => 'this'
511 511
             ]));
512
-        }
513
-        catch (AsanaError $error) {
512
+        } catch (AsanaError $error) {
514 513
             if ($error->getCode() === 412) {
515 514
                 $remote = $this->_jsonDecode($error->getMessage());
516 515
                 if (!isset($token)) {
Please login to merge, or discard this patch.
src/Api/FileCache.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
58 58
             $this->_log("CACHE DELINK {$key}");
59 59
             unlink($ref);
60 60
             unlink($path);
61
-        }
62
-        elseif (is_file($path)) {
61
+        } elseif (is_file($path)) {
63 62
             $this->_log("CACHE DELETE {$key}");
64 63
             unlink($path);
65 64
         }
@@ -117,8 +116,7 @@  discard block
 block discarded – undo
117 116
                 ["CACHE SET {$key}", "CACHE BURN {$key}"][$value instanceof ImmutableInterface],
118 117
                 "CACHE UPDATE {$key}"
119 118
             ][is_file($path)]);
120
-        }
121
-        else {
119
+        } else {
122 120
             $this->_log([
123 121
                 "CACHE LINK {$key} => {$value}",
124 122
                 "CACHE RENEW LINK {$key} => {$value}"
Please login to merge, or discard this patch.
src/Base/Data.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
     public function __construct ($caller, array $data = []) {
61 61
         if ($caller instanceof self) {
62 62
             $this->api = $caller->api;
63
-        }
64
-        else {
63
+        } else {
65 64
             $this->api = $caller;
66 65
         }
67 66
         $this->_setData($data);
@@ -263,8 +262,7 @@  discard block
 block discarded – undo
263 262
 
264 263
         if ($isList) {
265 264
             $this->data[$field] = array_map($hydrate, $value);
266
-        }
267
-        else {
265
+        } else {
268 266
             $this->data[$field] = $hydrate($value);
269 267
         }
270 268
     }
Please login to merge, or discard this patch.
src/Base/AbstractEntity.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -92,8 +92,7 @@  discard block
 block discarded – undo
92 92
     protected function _removeWithPost (string $rmPath, array $data, string $field, $diff) {
93 93
         if ($this->hasGid()) {
94 94
             return $this->_setWithPost($rmPath, $data, $field);
95
-        }
96
-        elseif (is_array($diff)) {
95
+        } elseif (is_array($diff)) {
97 96
             return $this->_set($field, array_values(array_diff($this->data[$field] ?? [], $diff)));
98 97
         }
99 98
         return $this->_set($field, array_values(array_filter($this->data[$field] ?? [], $diff)));
@@ -109,11 +108,9 @@  discard block
 block discarded – undo
109 108
     protected function _save (string $dir = null) {
110 109
         if (isset($dir)) { // create()
111 110
             $remote = $this->api->post($dir, $this->getDiff(), ['expand' => 'this']);
112
-        }
113
-        elseif ($this->isDiff()) { // update()
111
+        } elseif ($this->isDiff()) { // update()
114 112
             $remote = $this->api->put($this, $this->getDiff(), ['expand' => 'this']);
115
-        }
116
-        else { // update() but no change
113
+        } else { // update() but no change
117 114
             return $this;
118 115
         }
119 116
         /** @var array $remote */
@@ -204,11 +201,9 @@  discard block
 block discarded – undo
204 201
         if (isset($field)) {
205 202
             $remote = $this->api->get($this, [], ['fields' => static::OPT_FIELDS[$field] ?? $field]);
206 203
             $this->_setMapped($field, $remote[$field] ?? null);
207
-        }
208
-        elseif ($remote = $this->api->get($this, [], ['expand' => 'this'])) {
204
+        } elseif ($remote = $this->api->get($this, [], ['expand' => 'this'])) {
209 205
             $this->_setData($remote);
210
-        }
211
-        else { // deleted upstream.
206
+        } else { // deleted upstream.
212 207
             $this->api->getPool()->remove($this->getPoolKeys());
213 208
             throw new RuntimeException("{$this} was deleted upstream.");
214 209
         }
Please login to merge, or discard this patch.