@@ -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 | } |
@@ -160,8 +160,7 @@ |
||
| 160 | 160 | $this->caller->__set($this->data['gid'], true); |
| 161 | 161 | if ($type === CustomField::TYPE_ENUM) { |
| 162 | 162 | $this->data['enum_value']['gid'] = $this->_toEnumOptionGid($value); |
| 163 | - } |
|
| 164 | - else { |
|
| 163 | + } else { |
|
| 165 | 164 | $this->data["{$type}_value"] = $value; |
| 166 | 165 | } |
| 167 | 166 | } |
@@ -36,8 +36,7 @@ |
||
| 36 | 36 | private function _removeWithPost (string $rmPath, array $data, string $field, $diff) { |
| 37 | 37 | if ($this->hasGid()) { |
| 38 | 38 | return $this->_setWithPost($rmPath, $data, $field); |
| 39 | - } |
|
| 40 | - elseif (is_array($diff)) { |
|
| 39 | + } elseif (is_array($diff)) { |
|
| 41 | 40 | return $this->_set($field, array_values(array_diff($this->data[$field] ?? [], $diff))); |
| 42 | 41 | } |
| 43 | 42 | return $this->_set($field, array_values(array_filter($this->data[$field] ?? [], $diff))); |
@@ -32,8 +32,7 @@ |
||
| 32 | 32 | 'sync' => $token, |
| 33 | 33 | 'opt_expand' => 'this' |
| 34 | 34 | ])); |
| 35 | - } |
|
| 36 | - catch (AsanaError $error) { |
|
| 35 | + } catch (AsanaError $error) { |
|
| 37 | 36 | if ($error->is(412)) { |
| 38 | 37 | $remote = $error->asResponse(); |
| 39 | 38 | if (!isset($token)) { |