@@ -239,8 +239,12 @@ |
||
| 239 | 239 | { |
| 240 | 240 | $n = count($this); |
| 241 | 241 | |
| 242 | - if ($n < 2) return 0; |
|
| 243 | - if ($r < 0) return $n - (abs($r) % $n); |
|
| 242 | + if ($n < 2) { |
|
| 243 | + return 0; |
|
| 244 | + } |
|
| 245 | + if ($r < 0) { |
|
| 246 | + return $n - (abs($r) % $n); |
|
| 247 | + } |
|
| 244 | 248 | |
| 245 | 249 | return $r % $n; |
| 246 | 250 | } |
@@ -1,8 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Ds\Traits; |
| 3 | 3 | |
| 4 | -use Ds\Deque; |
|
| 5 | - |
|
| 6 | 4 | /** |
| 7 | 5 | * Common to structures that deal with an internal capacity. While none of the |
| 8 | 6 | * PHP implementations actually make use of a capacity, it's important to keep |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Ds; |
| 3 | 3 | |
| 4 | -use Error; |
|
| 5 | 4 | use OutOfBoundsException; |
| 6 | 5 | use OutOfRangeException; |
| 7 | 6 | use Traversable; |