@@ -15,7 +15,7 @@ discard block |
||
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 |
||
24 | 24 | */ |
25 | 25 | public function getNextValue($previousValue) |
26 | 26 | { |
27 | - return $previousValue + $this->step; |
|
27 | + return $previousValue+$this->step; |
|
28 | 28 | } |
29 | 29 | } |
@@ -26,11 +26,11 @@ discard block |
||
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 |
||
39 | 39 | */ |
40 | 40 | public function getNextValue($previousValue) |
41 | 41 | { |
42 | - return $previousValue * $this->step; |
|
42 | + return $previousValue*$this->step; |
|
43 | 43 | } |
44 | 44 | } |
@@ -112,10 +112,10 @@ |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | if ($offset < 0) { |
115 | - $offset = $this->size + ($offset % $this->size); |
|
115 | + $offset = $this->size+($offset%$this->size); |
|
116 | 116 | } |
117 | 117 | |
118 | - $offset = ($offset % $this->size); |
|
118 | + $offset = ($offset%$this->size); |
|
119 | 119 | |
120 | 120 | return $this->getValueByIndex($offset); |
121 | 121 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | return ($this->indexValueGetter)($index, $this->start); |
59 | 59 | } |
60 | 60 | |
61 | - return reduce(xrange($index), function ($carry) { |
|
61 | + return reduce(xrange($index), function($carry) { |
|
62 | 62 | return $this->getNextValue($carry); |
63 | 63 | }, $this->start); |
64 | 64 | } |