@@ -260,9 +260,9 @@ |
||
260 | 260 | $r = $this->normalizeRotations($rotations, $n); |
261 | 261 | |
262 | 262 | if ($r > 0) { |
263 | - $this->reverseRange(0, $r); |
|
263 | + $this->reverseRange(0, $r); |
|
264 | 264 | $this->reverseRange($r, $n); |
265 | - $this->reverseRange(0, $n); |
|
265 | + $this->reverseRange(0, $n); |
|
266 | 266 | } |
267 | 267 | } |
268 | 268 |
@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Ds\Traits; |
3 | 3 | |
4 | -use Error; |
|
5 | 4 | use OutOfRangeException; |
6 | 5 | use Traversable; |
7 | 6 | use UnderflowException; |
@@ -13,6 +13,7 @@ discard block |
||
13 | 13 | * object as initial values, or an int to specify an initial capacity. |
14 | 14 | * |
15 | 15 | * @param array|\Traversable|int|null $values |
16 | + * @return void |
|
16 | 17 | */ |
17 | 18 | function __construct($values = null); |
18 | 19 | |
@@ -22,6 +23,7 @@ discard block |
||
22 | 23 | * @param int $capacity The number of values for which capacity should be |
23 | 24 | * allocated. Capacity will stay the same if this value |
24 | 25 | * is less than or equal to the current capacity. |
26 | + * @return void |
|
25 | 27 | */ |
26 | 28 | function allocate(int $capacity); |
27 | 29 | |
@@ -93,6 +95,7 @@ discard block |
||
93 | 95 | * @param mixed ...$values |
94 | 96 | * |
95 | 97 | * @throws \OutOfRangeException if the index is not in the range [0, n] |
98 | + * @return void |
|
96 | 99 | */ |
97 | 100 | function insert(int $index, ...$values); |
98 | 101 | |
@@ -147,6 +150,7 @@ discard block |
||
147 | 150 | * Adds zero or more values to the end of the sequence. |
148 | 151 | * |
149 | 152 | * @param mixed ...$values |
153 | + * @return void |
|
150 | 154 | */ |
151 | 155 | function push(...$values); |
152 | 156 | |
@@ -187,6 +191,7 @@ discard block |
||
187 | 191 | * positive, or 'pop' and 'unshift' if negative. |
188 | 192 | * |
189 | 193 | * @param int $rotations The number of rotations (can be negative). |
194 | + * @return void |
|
190 | 195 | */ |
191 | 196 | function rotate(int $rotations); |
192 | 197 | |
@@ -197,6 +202,7 @@ discard block |
||
197 | 202 | * @param mixed $value |
198 | 203 | * |
199 | 204 | * @throws \OutOfRangeException if the index is not in the range [0, size-1] |
205 | + * @return void |
|
200 | 206 | */ |
201 | 207 | function set(int $index, $value); |
202 | 208 | |
@@ -247,6 +253,7 @@ discard block |
||
247 | 253 | * Adds zero or more values to the front of the sequence. |
248 | 254 | * |
249 | 255 | * @param mixed ...$values |
256 | + * @return void |
|
250 | 257 | */ |
251 | 258 | function unshift(...$values); |
252 | 259 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Creates an instance using the values of an array or Traversable object. |
28 | 28 | * |
29 | - * @param array|\Traversable|null $values |
|
29 | + * @param Map $values |
|
30 | 30 | */ |
31 | 31 | public function __construct($values = null) |
32 | 32 | { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | /** |
113 | 113 | * Merge an array of values with the current Map |
114 | 114 | * |
115 | - * @param array|\Traversable $values |
|
115 | + * @param Map $values |
|
116 | 116 | * |
117 | 117 | * @return Map |
118 | 118 | */ |
@@ -26,7 +26,7 @@ |
||
26 | 26 | * Creates a new set using the values of an array or Traversable object. |
27 | 27 | * The keys of either will not be preserved. |
28 | 28 | * |
29 | - * @param array|\Traversable|null $values |
|
29 | + * @param Set $values |
|
30 | 30 | */ |
31 | 31 | public function __construct($values = null) |
32 | 32 | { |