Passed
Pull Request — master (#5)
by Christopher
02:33
created
src/BitMask.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function __call($name, $arguments)
35 35
     {
36 36
         $array = static::toArray();
37
-        $sub   =  array_reduce(['is','set'], function ($carry, $item) use ($name) {
37
+        $sub   = array_reduce(['is', 'set'], function($carry, $item) use ($name) {
38 38
             return substr($name, 0, strlen($item)) === $item ? strlen($item) : $carry;
39 39
         }, false);
40 40
 
@@ -42,8 +42,7 @@  discard block
 block discarded – undo
42 42
             $actualName = substr($name, $sub);
43 43
             if (isset($array[$actualName]) || array_key_exists($actualName, $array)) {
44 44
                 return $sub === 2 ?
45
-                    $this->isFlagSet($array[$actualName]) :
46
-                    $this->setFlag($array[$actualName], $arguments[0] ?? true);
45
+                    $this->isFlagSet($array[$actualName]) : $this->setFlag($array[$actualName], $arguments[0] ?? true);
47 46
             }
48 47
         }
49 48
         throw new BadMethodCallException(sprintf('Enum %s not found on %s', $name, get_class($this)));
@@ -84,7 +83,7 @@  discard block
 block discarded – undo
84 83
     public function getKey()
85 84
     {
86 85
         $value = $this->value;
87
-        $f     = array_filter(static::toArray(), function () use (&$value) {
86
+        $f     = array_filter(static::toArray(), function() use (&$value) {
88 87
             $isSet = $value & 1;
89 88
             $value = $value >> 1;
90 89
             return $isSet;
Please login to merge, or discard this patch.