@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | 'Unknown value %s for enumeration %s', |
200 | 200 | \is_scalar($value) |
201 | 201 | ? \var_export($value, true) |
202 | - : 'of type ' . (\is_object($value) ? \get_class($value) : \gettype($value)), |
|
202 | + : 'of type '.(\is_object($value) ? \get_class($value) : \gettype($value)), |
|
203 | 203 | static::class |
204 | 204 | )); |
205 | 205 | } |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | return self::$instances[static::class][$name]; |
226 | 226 | } |
227 | 227 | |
228 | - $const = static::class . "::{$name}"; |
|
228 | + $const = static::class."::{$name}"; |
|
229 | 229 | if (!\defined($const)) { |
230 | 230 | throw new InvalidArgumentException("{$const} not defined"); |
231 | 231 | } |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | // Enumerators must be defined as public class constants |
374 | 374 | foreach ($reflection->getReflectionConstants() as $reflConstant) { |
375 | 375 | if ($reflConstant->isPublic()) { |
376 | - $scopeConstants[ $reflConstant->getName() ] = $reflConstant->getValue(); |
|
376 | + $scopeConstants[$reflConstant->getName()] = $reflConstant->getValue(); |
|
377 | 377 | } |
378 | 378 | } |
379 | 379 |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | // we will switch this into a binary bitset |
80 | 80 | if ($this->enumerationCount > \PHP_INT_SIZE * 8) { |
81 | 81 | // init binary bitset with zeros |
82 | - $this->bitset = \str_repeat("\0", (int)\ceil($this->enumerationCount / 8)); |
|
82 | + $this->bitset = \str_repeat("\0", (int) \ceil($this->enumerationCount / 8)); |
|
83 | 83 | |
84 | 84 | // switch internal binary bitset functions |
85 | 85 | $this->fnDoGetIterator = 'doGetIteratorBin'; |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | throw new InvalidArgumentException('out-of-range bits detected'); |
326 | 326 | } |
327 | 327 | |
328 | - $this->bitset = \substr($bitset, 0, -1) . $lastByteExpected; |
|
328 | + $this->bitset = \substr($bitset, 0, -1).$lastByteExpected; |
|
329 | 329 | } |
330 | 330 | |
331 | 331 | $this->bitset = $bitset; |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | private function doGetBinaryBitsetLeInt() |
1038 | 1038 | { |
1039 | 1039 | $bin = \pack(\PHP_INT_SIZE === 8 ? 'P' : 'V', $this->bitset); |
1040 | - return \substr($bin, 0, (int)\ceil($this->enumerationCount / 8)); |
|
1040 | + return \substr($bin, 0, (int) \ceil($this->enumerationCount / 8)); |
|
1041 | 1041 | } |
1042 | 1042 | |
1043 | 1043 | /** |
@@ -1095,6 +1095,6 @@ discard block |
||
1095 | 1095 | */ |
1096 | 1096 | private function doGetBitInt($ordinal) |
1097 | 1097 | { |
1098 | - return (bool)($this->bitset & (1 << $ordinal)); |
|
1098 | + return (bool) ($this->bitset & (1 << $ordinal)); |
|
1099 | 1099 | } |
1100 | 1100 | } |
@@ -53,14 +53,14 @@ |
||
53 | 53 | $name = \array_search($value, $constants, true); |
54 | 54 | if ($name === false) { |
55 | 55 | $message = \is_scalar($value) |
56 | - ? 'Unknown value ' . \var_export($value, true) |
|
57 | - : 'Invalid value of type ' . (\is_object($value) ? \get_class($value) : \gettype($value)); |
|
56 | + ? 'Unknown value '.\var_export($value, true) |
|
57 | + : 'Invalid value of type '.(\is_object($value) ? \get_class($value) : \gettype($value)); |
|
58 | 58 | throw new RuntimeException($message); |
59 | 59 | } |
60 | 60 | |
61 | 61 | $class = static::class; |
62 | 62 | $enumerator = $this; |
63 | - $closure = function () use ($class, $name, $value, $enumerator) { |
|
63 | + $closure = function() use ($class, $name, $value, $enumerator) { |
|
64 | 64 | if ($value !== null && $this->value !== null) { |
65 | 65 | throw new LogicException('Do not call this directly - please use unserialize($enum) instead'); |
66 | 66 | } |