@@ -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 | } |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | */ |
| 89 | 89 | protected function decreaseCapacity() |
| 90 | 90 | { |
| 91 | - $this->capacity = max(self::MIN_CAPACITY, $this->capacity * $this->getDecayFactor()); |
|
| 91 | + $this->capacity = max(self::MIN_CAPACITY, $this->capacity * $this->getDecayFactor()); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |