Passed
Push — master ( 8dfa4a...e4531b )
by Smoren
02:19
created
src/Structs/IntSequence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     public function offsetGet($offset): int
54 54
     {
55
-        return (int)$this->_offsetGet($offset);
55
+        return (int) $this->_offsetGet($offset);
56 56
     }
57 57
 
58 58
     /**
Please login to merge, or discard this patch.
src/Structs/IndexedArray.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function offsetSet($offset, $value): void
67 67
     {
68
-        if($offset === null) {
68
+        if ($offset === null) {
69 69
             $this->source[] = $value;
70 70
         } else {
71 71
             $range = $this->getRange();
72
-            if(isset($range[$offset])) {
72
+            if (isset($range[$offset])) {
73 73
                 $index = $range[$offset];
74 74
                 $this->source[$index] = $value;
75 75
             } else {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function offsetUnset($offset): void
85 85
     {
86 86
         $range = $this->getRange();
87
-        if(isset($range[$offset])) {
87
+        if (isset($range[$offset])) {
88 88
             $index = $range[$offset];
89 89
             unset($this->source[$index]);
90 90
             $this->source = array_values($this->source);
Please login to merge, or discard this patch.
src/Traits/SequenceTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function offsetExists($offset): bool
21 21
     {
22
-        if(!is_int($offset)) {
22
+        if (!is_int($offset)) {
23 23
             return false;
24 24
         }
25 25
 
26
-        if(!$this->isInfinite()) {
27
-            if($offset >= 0) {
26
+        if (!$this->isInfinite()) {
27
+            if ($offset >= 0) {
28 28
                 return $offset < count($this);
29 29
             }
30 30
             return abs($offset) <= count($this);
@@ -72,21 +72,21 @@  discard block
 block discarded – undo
72 72
      */
73 73
     protected function _offsetGet($offset): float
74 74
     {
75
-        if(!$this->offsetExists($offset)) {
75
+        if (!$this->offsetExists($offset)) {
76 76
             throw new OutOfRangeException();
77 77
         }
78 78
 
79 79
         /** @var int $offset */
80 80
 
81
-        if($this->isInfinite()) {
81
+        if ($this->isInfinite()) {
82 82
             return $this->getValueByIndex($offset);
83 83
         }
84 84
 
85
-        if($offset < 0) {
86
-            $offset = $this->size + ($offset % $this->size);
85
+        if ($offset < 0) {
86
+            $offset = $this->size+($offset%$this->size);
87 87
         }
88 88
 
89
-        $offset = ($offset % $this->size);
89
+        $offset = ($offset%$this->size);
90 90
 
91 91
         return $this->getValueByIndex($offset);
92 92
     }
Please login to merge, or discard this patch.
src/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  */
13 13
 function xrange(int $start, ?int $size = null, int $step = 1): IntRange
14 14
 {
15
-    if($size === null) {
15
+    if ($size === null) {
16 16
         [$start, $size] = [0, $start];
17 17
     }
18 18
 
Please login to merge, or discard this patch.
src/Structs/FloatRange.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function getValueByIndex(int $index): float
21 21
     {
22
-        return $this->start + $index * $this->step;
22
+        return $this->start+$index*$this->step;
23 23
     }
24 24
 
25 25
     /**
Please login to merge, or discard this patch.
src/Structs/IntRange.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function getValueByIndex(int $index): int
21 21
     {
22
-        return $this->start + $index * $this->step;
22
+        return $this->start+$index*$this->step;
23 23
     }
24 24
 
25 25
     /**
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function getNextValue($previousValue): int
38 38
     {
39
-        return $previousValue + $this->step;
39
+        return $previousValue+$this->step;
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/Structs/IntExponential.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function getValueByIndex(int $index): int
17 17
     {
18
-        return (int)($this->start * ($this->step ** $index));
18
+        return (int) ($this->start*($this->step ** $index));
19 19
     }
20 20
 
21 21
     /**
@@ -32,6 +32,6 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function getNextValue($previousValue): int
34 34
     {
35
-        return $previousValue * $this->step;
35
+        return $previousValue*$this->step;
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
src/Structs/FloatExponential.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function getValueByIndex(int $index): float
21 21
     {
22
-        return $this->start * ($this->step ** $index);
22
+        return $this->start*($this->step ** $index);
23 23
     }
24 24
 
25 25
     /**
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function getNextValue($previousValue): float
38 38
     {
39
-        return $previousValue * $this->step;
39
+        return $previousValue*$this->step;
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/Structs/FloatSequence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      */
61 61
     public function getNextValue($previousValue): float
62 62
     {
63
-        return $previousValue + $this->step;
63
+        return $previousValue+$this->step;
64 64
     }
65 65
 
66 66
     /**
Please login to merge, or discard this patch.