@@ -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 | } |
@@ -118,7 +118,7 @@ |
||
118 | 118 | { |
119 | 119 | $this->capacity = max( |
120 | 120 | self::MIN_CAPACITY, |
121 | - $this->capacity() * $this->getDecayFactor() |
|
121 | + $this->capacity() * $this->getDecayFactor() |
|
122 | 122 | ); |
123 | 123 | } |
124 | 124 |
@@ -270,7 +270,8 @@ |
||
270 | 270 | * @psalm-param callable(TValue): TNewValue $callback |
271 | 271 | * @psalm-return Set<TNewValue> |
272 | 272 | */ |
273 | - public function map(callable $callback) { |
|
273 | + public function map(callable $callback) |
|
274 | + { |
|
274 | 275 | return new self(array_map($callback, $this->toArray())); |
275 | 276 | } |
276 | 277 |