@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | if ($value) { |
23 | 23 | $this->value = 0 === $flag ? 0 : $this->value | $flag; |
24 | 24 | } else { |
25 | - $this->value = 0 === $flag ? $this->value : $this->value & ~$flag; |
|
25 | + $this->value = 0 === $flag ? $this->value : $this->value & ~$flag; |
|
26 | 26 | } |
27 | 27 | return $this; |
28 | 28 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $regexBase = '/(is|set)(%s)/m'; |
39 | 39 | $regexFull = sprintf($regexBase, implode('|', array_keys($array))); |
40 | 40 | preg_match($regexFull, $name, $match); |
41 | - if (count($match)>0 && $match[0] === $name) { |
|
41 | + if (count($match) > 0 && $match[0] === $name) { |
|
42 | 42 | return $this->{$match[1] . 'Flag'}($array[$match[2]], $arguments[0] ?? true); |
43 | 43 | } |
44 | 44 | throw new BadMethodCallException(sprintf('Enum %s not found on %s', $name, get_class($this))); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | public function getKey() |
77 | 77 | { |
78 | 78 | $value = $this->value; |
79 | - $f = array_filter(static::toArray(), function () use (&$value) { |
|
79 | + $f = array_filter(static::toArray(), function() use (&$value) { |
|
80 | 80 | $isSet = $value & 1; |
81 | 81 | $value = $value >> 1; |
82 | 82 | return $isSet; |