Passed
Push — master ( 9b9e59...b4f796 )
by y
01:34
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 (ReflectionException $exception) {
42
+        } catch (ReflectionException $exception) {
44 43
             return 'none'; // unreachable
45 44
         }
46 45
     }
Please login to merge, or discard this patch.
src/CustomField/EnumOption.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@  discard block
 block discarded – undo
68 68
                 'enum_option' => $this->getGid(),
69 69
                 'after_enum_option' => $option->getGid()
70 70
             ]);
71
-        }
72
-        else {
71
+        } else {
73 72
             unset($this->data['insert_before'], $this->diff['insert_before']);
74 73
             $this->_set('insert_after', $option->getGid());
75 74
         }
@@ -87,8 +86,7 @@  discard block
 block discarded – undo
87 86
                 'enum_option' => $this->getGid(),
88 87
                 'before_enum_option' => $option->getGid()
89 88
             ]);
90
-        }
91
-        else {
89
+        } else {
92 90
             unset($this->data['insert_after'], $this->diff['insert_after']);
93 91
             $this->_set('insert_before', $option->getGid());
94 92
         }
Please login to merge, or discard this patch.
src/CustomField.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@
 block discarded – undo
62 62
         $option->setName($name);
63 63
         if ($this->hasGid()) {
64 64
             $option->create();
65
-        }
66
-        else {
65
+        } else {
67 66
             $this->diff['enum_options'] = true;
68 67
         }
69 68
         $this->data['enum_options'][] = $option;
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
@@ -460,8 +460,7 @@
 block discarded – undo
460 460
                 'sync' => $token,
461 461
                 'opt_expand' => 'this'
462 462
             ]));
463
-        }
464
-        catch (Error $error) {
463
+        } catch (Error $error) {
465 464
             if ($error->getCode() !== 412) {
466 465
                 throw $error;
467 466
             }
Please login to merge, or discard this patch.
src/Task.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -179,8 +179,7 @@  discard block
 block discarded – undo
179 179
         if ($this->hasGid()) {
180 180
             $this->api->post("{$this}/addFollowers", ['followers' => static::_getGids($users)]);
181 181
             $this->_merge('followers', $users);
182
-        }
183
-        else {
182
+        } else {
184 183
             $this->_merge('followers', $users, true);
185 184
         }
186 185
         return $this;
@@ -196,8 +195,7 @@  discard block
 block discarded – undo
196 195
         if ($this->hasGid()) {
197 196
             $this->api->post("{$this}/addTag", ['tag' => $tag->getGid()]);
198 197
             $this->_merge('tags', [$tag]);
199
-        }
200
-        else {
198
+        } else {
201 199
             $this->_merge('tags', [$tag], true);
202 200
         }
203 201
         return $this;
@@ -222,8 +220,7 @@  discard block
 block discarded – undo
222 220
                     'section' => $section
223 221
                 ]);
224 222
             }
225
-        }
226
-        else {
223
+        } else {
227 224
             if (!$this->hasWorkspace()) {
228 225
                 $this->setWorkspace($project->getWorkspace());
229 226
             }
@@ -509,8 +506,7 @@  discard block
 block discarded – undo
509 506
         if ($this->hasGid()) {
510 507
             $this->api->post("{$this}/setParent", ['parent' => $parent ? $parent->getGid() : null]);
511 508
             $this->data['parent'] = $parent;
512
-        }
513
-        else {
509
+        } else {
514 510
             $this->_set('parent', $parent);
515 511
         }
516 512
         return $this;
Please login to merge, or discard this patch.
src/Base/AbstractEntity.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
             $this->data[$key] = array_values(array_unique($this->data[$key]));
60 60
             if ($force) {
61 61
                 $this->diff[$key] = true;
62
-            }
63
-            else {
62
+            } else {
64 63
                 $this->api->getCache()->add($this);
65 64
             }
66 65
         }
@@ -110,8 +109,7 @@  discard block
 block discarded – undo
110 109
             $map = $this->_getMap();
111 110
             $this->data[$key] = isset($map[$key]) ? $this->_getMapped($map[$key], $value) : $value;
112 111
             unset($this->diff[$key]);
113
-        }
114
-        else {
112
+        } else {
115 113
             $this->_setData($this->api->get($this, [], ['expand' => 'this']));
116 114
         }
117 115
         $this->api->getCache()->add($this);
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
@@ -291,11 +291,9 @@
 block discarded – undo
291 291
         $dehydrate = function($each) use (&$dehydrate) {
292 292
             if ($each instanceof AbstractEntity and $each->hasGid()) {
293 293
                 return $each->getGid();
294
-            }
295
-            elseif ($each instanceof self) {
294
+            } elseif ($each instanceof self) {
296 295
                 return $each->toArray();
297
-            }
298
-            elseif (is_array($each)) {
296
+            } elseif (is_array($each)) {
299 297
                 return array_map($dehydrate, $each);
300 298
             }
301 299
             return $each;
Please login to merge, or discard this patch.
src/Portfolio.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@
 block discarded – undo
73 73
         if ($this->hasGid()) {
74 74
             $this->api->post("{$this}/addMembers", ['members' => static::_getGids($users)]);
75 75
             $this->_merge('members', $users);
76
-        }
77
-        else {
76
+        } else {
78 77
             $this->_merge('members', $users, true);
79 78
         }
80 79
         return $this;
Please login to merge, or discard this patch.
src/Api/SimpleCache.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@
 block discarded – undo
68 68
                     /** @var null|AbstractEntity $entity */
69 69
                     if ($entity = $this->get($entity, $caller, $factory)) {
70 70
                         $this->cache->set($key, $entity->getGid()); // renew potentially nonstandard key
71
-                    }
72
-                    else {
71
+                    } else {
73 72
                         $this->cache->delete($key); // remove invalid key
74 73
                     }
75 74
                     return $entity; // null or hydrated. parent calls add()
Please login to merge, or discard this patch.