@@ -205,8 +205,7 @@ discard block |
||
| 205 | 205 | if ($this->hasGid()) { |
| 206 | 206 | $this->api->post("{$this}/addFollowers", ['followers' => array_column($users, 'gid')]); |
| 207 | 207 | $this->_merge('followers', $users); |
| 208 | - } |
|
| 209 | - else { |
|
| 208 | + } else { |
|
| 210 | 209 | $this->_merge('followers', $users, true); |
| 211 | 210 | } |
| 212 | 211 | return $this; |
@@ -222,8 +221,7 @@ discard block |
||
| 222 | 221 | if ($this->hasGid()) { |
| 223 | 222 | $this->api->post("{$this}/addTag", ['tag' => $tag->getGid()]); |
| 224 | 223 | $this->_merge('tags', [$tag]); |
| 225 | - } |
|
| 226 | - else { |
|
| 224 | + } else { |
|
| 227 | 225 | $this->_merge('tags', [$tag], true); |
| 228 | 226 | } |
| 229 | 227 | return $this; |
@@ -239,8 +237,7 @@ discard block |
||
| 239 | 237 | if ($target instanceof Project) { |
| 240 | 238 | $project = $target; |
| 241 | 239 | $section = null; |
| 242 | - } |
|
| 243 | - else { |
|
| 240 | + } else { |
|
| 244 | 241 | $project = $target->getProject(); |
| 245 | 242 | $section = $target; |
| 246 | 243 | } |
@@ -255,8 +252,7 @@ discard block |
||
| 255 | 252 | 'section' => $section |
| 256 | 253 | ]) |
| 257 | 254 | ]); |
| 258 | - } |
|
| 259 | - else { |
|
| 255 | + } else { |
|
| 260 | 256 | if (!$this->hasWorkspace()) { |
| 261 | 257 | $this->setWorkspace($project->getWorkspace()); |
| 262 | 258 | } |
@@ -567,8 +563,7 @@ discard block |
||
| 567 | 563 | if ($this->hasGid()) { |
| 568 | 564 | $this->api->post("{$this}/setParent", ['parent' => $parent ? $parent->getGid() : null]); |
| 569 | 565 | $this->data['parent'] = $parent; |
| 570 | - } |
|
| 571 | - else { |
|
| 566 | + } else { |
|
| 572 | 567 | $this->_set('parent', $parent); |
| 573 | 568 | } |
| 574 | 569 | return $this; |
@@ -63,8 +63,7 @@ discard block |
||
| 63 | 63 | $this->data[$key] = array_values(array_unique($this->data[$key])); |
| 64 | 64 | if ($force) { |
| 65 | 65 | $this->diff[$key] = true; |
| 66 | - } |
|
| 67 | - else { |
|
| 66 | + } else { |
|
| 68 | 67 | $this->_cache(); |
| 69 | 68 | } |
| 70 | 69 | } |
@@ -105,8 +104,7 @@ discard block |
||
| 105 | 104 | if (isset($key)) { |
| 106 | 105 | $value = $this->api->get($this, [], ['fields' => static::$optFields[$key] ?? $key])[$key] ?? null; |
| 107 | 106 | $this->_setMapped($key, $value); |
| 108 | - } |
|
| 109 | - else { |
|
| 107 | + } else { |
|
| 110 | 108 | $this->_setData($this->api->get($this, [], ['expand' => 'this'])); |
| 111 | 109 | } |
| 112 | 110 | $this->_cache(); |