@@ -39,8 +39,7 @@ |
||
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 | } |
@@ -58,8 +58,7 @@ discard block |
||
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 |
||
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}" |
@@ -49,8 +49,7 @@ discard block |
||
49 | 49 | public function __construct ($caller, array $data = []) { |
50 | 50 | if ($caller instanceof self) { |
51 | 51 | $this->api = $caller->api; |
52 | - } |
|
53 | - else { |
|
52 | + } else { |
|
54 | 53 | $this->api = $caller; |
55 | 54 | } |
56 | 55 | $this->_setData($data); |
@@ -242,8 +241,7 @@ discard block |
||
242 | 241 | $value = array_map(function($each) use ($class) { |
243 | 242 | return $this->_hydrate($class[0], $each); |
244 | 243 | }, $value); |
245 | - } |
|
246 | - elseif (isset($value)) { |
|
244 | + } elseif (isset($value)) { |
|
247 | 245 | $value = $this->_hydrate($class, $value); |
248 | 246 | } |
249 | 247 | } |
@@ -92,8 +92,7 @@ |
||
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))); |
@@ -484,8 +484,7 @@ |
||
484 | 484 | 'sync' => $token, |
485 | 485 | 'opt_expand' => 'this' |
486 | 486 | ])); |
487 | - } |
|
488 | - catch (AsanaError $error) { |
|
487 | + } catch (AsanaError $error) { |
|
489 | 488 | if ($error->getCode() === 412) { |
490 | 489 | $remote = json_decode($error->getMessage(), true, JSON_BIGINT_AS_STRING | JSON_THROW_ON_ERROR); |
491 | 490 | if (!isset($token)) { |