Completed
Push — master ( def55f...3693cb )
by Christopher
20s queued 12s
created
src/BitMask.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         if ($value) {
29 29
             $this->value = 0 === $flag ? 0 : $this->value | $flag;
30 30
         } else {
31
-            $this->value = 0 === $flag  ? $this->value : $this->value & ~$flag;
31
+            $this->value = 0 === $flag ? $this->value : $this->value & ~$flag;
32 32
         }
33 33
         return $this;
34 34
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $regexBase = '/(isComponentOf|is|set)(%s)/m';
46 46
         $regexFull = sprintf($regexBase, implode('$|', array_keys($array)));
47 47
         preg_match($regexFull, $name, $match);
48
-        if (count($match)>0 && $match[0] === $name) {
48
+        if (count($match) > 0 && $match[0] === $name) {
49 49
             return $this->{$match[1] . 'Flag'}($array[$match[2]], $arguments[0] ?? true);
50 50
         }
51 51
         throw new BadMethodCallException(sprintf('Enum %s not found on %s', $name, get_class($this)));
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
     public static function toArray(): array
71 71
     {
72 72
         $firstTime = !isset(static::$cache[static::class]);
73
-        $array     = array_filter(parent::toArray(), function ($value): bool {
73
+        $array     = array_filter(parent::toArray(), function($value): bool {
74 74
             return is_scalar($value);
75 75
         });
76
-        $firstTime && array_walk($array, function ($item): void {
76
+        $firstTime && array_walk($array, function($item): void {
77 77
             if (!is_integer($item)) {
78 78
                 throw new UnexpectedValueException(
79 79
                     sprintf('All defined Const on Enum %s should be integers', static::class)
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function getKey()
87 87
     {
88 88
         $value = $this->value;
89
-        $f     = array_filter(static::toArray(), function ($key) use (&$value) {
89
+        $f     = array_filter(static::toArray(), function($key) use (&$value) {
90 90
             return  $value & $key;
91 91
         });
92 92
         return array_keys($f);
Please login to merge, or discard this patch.