@@ -219,12 +219,12 @@ discard block |
||
| 219 | 219 | : null; |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | - /** |
|
| 223 | - * |
|
| 224 | - * @param HashMap<T> $collection |
|
| 225 | - * @return bool |
|
| 226 | - * @throws InvalidOperationException |
|
| 227 | - */ |
|
| 222 | + /** |
|
| 223 | + * |
|
| 224 | + * @param HashMap<T> $collection |
|
| 225 | + * @return bool |
|
| 226 | + * @throws InvalidOperationException |
|
| 227 | + */ |
|
| 228 | 228 | public function equals(BaseCollection $collection): bool |
| 229 | 229 | { |
| 230 | 230 | if (!$collection instanceof self) { |
@@ -249,11 +249,11 @@ discard block |
||
| 249 | 249 | $this->initializePairs($data); |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | - /** |
|
| 253 | - * Return the value for given key |
|
| 254 | - * @param mixed $key |
|
| 255 | - * @return T|null |
|
| 256 | - */ |
|
| 252 | + /** |
|
| 253 | + * Return the value for given key |
|
| 254 | + * @param mixed $key |
|
| 255 | + * @return T|null |
|
| 256 | + */ |
|
| 257 | 257 | public function get($key) |
| 258 | 258 | { |
| 259 | 259 | return $this->data->offsetExists($key) |
@@ -261,11 +261,11 @@ discard block |
||
| 261 | 261 | : null; |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | - /** |
|
| 265 | - * {@inheritedoc} |
|
| 266 | - * @param HashMap<T> $collection |
|
| 267 | - * @return HashMap<T> |
|
| 268 | - */ |
|
| 264 | + /** |
|
| 265 | + * {@inheritedoc} |
|
| 266 | + * @param HashMap<T> $collection |
|
| 267 | + * @return HashMap<T> |
|
| 268 | + */ |
|
| 269 | 269 | public function merge(BaseCollection $collection): BaseCollection |
| 270 | 270 | { |
| 271 | 271 | TypeCheck::isEqual( |
@@ -309,9 +309,9 @@ discard block |
||
| 309 | 309 | throw new InvalidOperationException('Can not call this method in map'); |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | - /** |
|
| 313 | - * {@inheritedoc} |
|
| 314 | - */ |
|
| 312 | + /** |
|
| 313 | + * {@inheritedoc} |
|
| 314 | + */ |
|
| 315 | 315 | public function remove($key): void |
| 316 | 316 | { |
| 317 | 317 | if ($this->isEmpty()) { |
@@ -328,12 +328,12 @@ discard block |
||
| 328 | 328 | $this->data->offsetUnset($key); |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | - /** |
|
| 332 | - * |
|
| 333 | - * @param int $offset |
|
| 334 | - * @param int|null $length |
|
| 335 | - * @return HashMap<T>|null |
|
| 336 | - */ |
|
| 331 | + /** |
|
| 332 | + * |
|
| 333 | + * @param int $offset |
|
| 334 | + * @param int|null $length |
|
| 335 | + * @return HashMap<T>|null |
|
| 336 | + */ |
|
| 337 | 337 | public function slice(int $offset, ?int $length = null): ?BaseCollection |
| 338 | 338 | { |
| 339 | 339 | $newData = array_slice($this->all(), $offset, $length, true); |
@@ -347,11 +347,11 @@ discard block |
||
| 347 | 347 | : null; |
| 348 | 348 | } |
| 349 | 349 | |
| 350 | - /** |
|
| 351 | - * |
|
| 352 | - * @param callable $callback |
|
| 353 | - * @return HashMap<T>|null |
|
| 354 | - */ |
|
| 350 | + /** |
|
| 351 | + * |
|
| 352 | + * @param callable $callback |
|
| 353 | + * @return HashMap<T>|null |
|
| 354 | + */ |
|
| 355 | 355 | public function sort(callable $callback): ?BaseCollection |
| 356 | 356 | { |
| 357 | 357 | $data = $this->all(); |