Passed
Branch master (718b20)
by y
07:49
created
src/Color.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
39 39
         try {
40 40
             $colors = (new ReflectionClass(self::class))->getConstants();
41 41
             return $colors[array_rand($colors)];
42
-        }
43
-        catch (Exception $exception) {
42
+        } catch (Exception $exception) {
44 43
             return 'none'; // unreachable
45 44
         }
46 45
     }
Please login to merge, or discard this patch.
src/Event/Change.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@
 block discarded – undo
33 33
     protected function _setMapped (string $field, $value): void {
34 34
         if (!is_array($value)) {
35 35
             $this->data[$field] = $value;
36
-        }
37
-        else {
36
+        } else {
38 37
             parent::_setMapped($field, $value);
39 38
         }
40 39
     }
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
@@ -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   +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.