Passed
Push — master ( 8c9cfe...19df46 )
by Smoren
01:38
created
src/Models/Bitmap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public static function create($value): BitmapInterface
22 22
     {
23
-        if(is_array($value)) {
23
+        if (is_array($value)) {
24 24
             return static::createFromArray($value);
25 25
         }
26
-        if($value instanceof BitmapInterface) {
26
+        if ($value instanceof BitmapInterface) {
27 27
             return new static($value->getValue());
28 28
         }
29 29
         return new static($value);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public static function createFromArray(array $bits): BitmapInterface
36 36
     {
37 37
         $value = 0;
38
-        foreach($bits as $code) {
38
+        foreach ($bits as $code) {
39 39
             $value += 2**$code;
40 40
         }
41 41
         return new static($value);
@@ -115,12 +115,12 @@  discard block
 block discarded – undo
115 115
         $result = [];
116 116
         $i = 0;
117 117
 
118
-        while($bitmap) {
119
-            if($bitmap % 2) {
118
+        while ($bitmap) {
119
+            if ($bitmap%2) {
120 120
                 $result[] = $i;
121 121
             }
122 122
 
123
-            $bitmap = (int)($bitmap / 2);
123
+            $bitmap = (int) ($bitmap/2);
124 124
             ++$i;
125 125
         }
126 126
 
Please login to merge, or discard this patch.