| @@ -52,7 +52,7 @@ | ||
| 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 | /** | 
| @@ -65,11 +65,11 @@ discard block | ||
| 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 | ||
| 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); | 
| @@ -19,12 +19,12 @@ discard block | ||
| 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 | ||
| 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 | } | 
| @@ -12,7 +12,7 @@ | ||
| 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 | |
| @@ -19,7 +19,7 @@ | ||
| 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 | /** | 
| @@ -19,7 +19,7 @@ discard block | ||
| 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 | ||
| 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 | } | 
| @@ -15,7 +15,7 @@ discard block | ||
| 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 | ||
| 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 | } | 
| @@ -19,7 +19,7 @@ discard block | ||
| 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 | ||
| 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 | } | 
| @@ -60,7 +60,7 @@ | ||
| 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 | /** |