Passed
Push — master ( fa9811...1f005f )
by Marc
01:43
created
src/Enum.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/EnumSerializableTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,14 +53,14 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/EnumSet.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         // we will switch this into a binary bitset
87 87
         if ($this->enumerationCount > \PHP_INT_SIZE * 8) {
88 88
             // init binary bitset with zeros
89
-            $this->bitset = $this->emptyBitset = \str_repeat("\0", (int)\ceil($this->enumerationCount / 8));
89
+            $this->bitset = $this->emptyBitset = \str_repeat("\0", (int) \ceil($this->enumerationCount / 8));
90 90
 
91 91
             // switch internal binary bitset functions
92 92
             $this->fnDoGetIterator       = 'doGetIteratorBin';
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
                 throw new InvalidArgumentException('out-of-range bits detected');
333 333
             }
334 334
 
335
-            $this->bitset = \substr($bitset, 0, -1) . $lastByteExpected;
335
+            $this->bitset = \substr($bitset, 0, -1).$lastByteExpected;
336 336
         }
337 337
 
338 338
         $this->bitset = $bitset;
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
     private function doGetBinaryBitsetLeInt()
1045 1045
     {
1046 1046
         $bin = \pack(\PHP_INT_SIZE === 8 ? 'P' : 'V', $this->bitset);
1047
-        return \substr($bin, 0, (int)\ceil($this->enumerationCount / 8));
1047
+        return \substr($bin, 0, (int) \ceil($this->enumerationCount / 8));
1048 1048
     }
1049 1049
 
1050 1050
     /**
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
      */
1103 1103
     private function doGetBitInt($ordinal)
1104 1104
     {
1105
-        return (bool)($this->bitset & (1 << $ordinal));
1105
+        return (bool) ($this->bitset & (1 << $ordinal));
1106 1106
     }
1107 1107
 
1108 1108
     /**
Please login to merge, or discard this patch.