Passed
Push — master ( 132083...2c9e70 )
by Smoren
02:22
created
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/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): Range
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/Range.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)
17 17
     {
18
-        return $this->start + $index * $this->step;
18
+        return $this->start+$index*$this->step;
19 19
     }
20 20
 
21 21
     /**
@@ -24,6 +24,6 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function getNextValue($previousValue)
26 26
     {
27
-        return $previousValue + $this->step;
27
+        return $previousValue+$this->step;
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
src/Structs/Sequence.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function offsetExists($offset): bool
40 40
     {
41
-        if(!is_int($offset)) {
41
+        if (!is_int($offset)) {
42 42
             return false;
43 43
         }
44 44
 
45
-        if(!$this->isInfinite()) {
46
-            if($offset >= 0) {
45
+        if (!$this->isInfinite()) {
46
+            if ($offset >= 0) {
47 47
                 return $offset < count($this);
48 48
             }
49 49
             return abs($offset) <= count($this);
@@ -99,21 +99,21 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function offsetGet($offset)
101 101
     {
102
-        if(!$this->offsetExists($offset)) {
102
+        if (!$this->offsetExists($offset)) {
103 103
             throw new OutOfRangeException();
104 104
         }
105 105
 
106 106
         /** @var int $offset */
107 107
 
108
-        if($this->isInfinite()) {
108
+        if ($this->isInfinite()) {
109 109
             return $this->getValueByIndex($offset);
110 110
         }
111 111
 
112
-        if($offset < 0) {
113
-            $offset = $this->size + ($offset % $this->size);
112
+        if ($offset < 0) {
113
+            $offset = $this->size+($offset%$this->size);
114 114
         }
115 115
 
116
-        $offset = ($offset % $this->size);
116
+        $offset = ($offset%$this->size);
117 117
 
118 118
         return $this->getValueByIndex($offset);
119 119
     }
Please login to merge, or discard this patch.
src/Structs/Exponential.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function getValueByIndex(int $index)
28 28
     {
29
-        if ((float)$this->step === 0.0 && $index < 0) {
29
+        if ((float) $this->step === 0.0 && $index < 0) {
30 30
             throw new \DivisionByZeroError();
31 31
         }
32 32
 
33
-        return $this->start * ($this->step ** $index);
33
+        return $this->start*($this->step ** $index);
34 34
     }
35 35
 
36 36
     /**
@@ -39,6 +39,6 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function getNextValue($previousValue)
41 41
     {
42
-        return $previousValue * $this->step;
42
+        return $previousValue*$this->step;
43 43
     }
44 44
 }
Please login to merge, or discard this patch.