@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Innmind\Immutable\Map; |
5 | 5 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | /** |
183 | 183 | * @param callable(T, S): void $function |
184 | 184 | */ |
185 | - public function foreach(callable $function): void |
|
185 | + public function foreach (callable $function): void |
|
186 | 186 | { |
187 | 187 | foreach ($this->values as $k) { |
188 | 188 | /** @var T $key */ |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | public function toMapOf(string $key, string $value, callable $mapper = null): Map |
472 | 472 | { |
473 | 473 | /** @psalm-suppress MissingParamType */ |
474 | - $mapper ??= static fn($k, $v): \Generator => yield $k => $v; |
|
474 | + $mapper ?? = static fn($k, $v): \Generator => yield $k => $v; |
|
475 | 475 | |
476 | 476 | /** @var Map<MT, MS> */ |
477 | 477 | $map = Map::of($key, $value); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Innmind\Immutable\Map; |
5 | 5 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | /** |
185 | 185 | * @param callable(T, S): void $function |
186 | 186 | */ |
187 | - public function foreach(callable $function): void |
|
187 | + public function foreach (callable $function): void |
|
188 | 188 | { |
189 | 189 | foreach ($this->pairs->iterator() as $pair) { |
190 | 190 | $function($pair->key(), $pair->value()); |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | public function toMapOf(string $key, string $value, callable $mapper = null): Map |
430 | 430 | { |
431 | 431 | /** @psalm-suppress MissingParamType */ |
432 | - $mapper ??= static fn($k, $v): \Generator => yield $k => $v; |
|
432 | + $mapper ?? = static fn($k, $v): \Generator => yield $k => $v; |
|
433 | 433 | |
434 | 434 | /** @var Map<MT, MS> */ |
435 | 435 | $map = Map::of($key, $value); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Innmind\Immutable\Map; |
5 | 5 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | /** |
168 | 168 | * @param callable(T, S): void $function |
169 | 169 | */ |
170 | - public function foreach(callable $function): void |
|
170 | + public function foreach (callable $function): void |
|
171 | 171 | { |
172 | 172 | foreach ($this->values as $k => $v) { |
173 | 173 | $function($this->normalizeKey($k), $v); |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | public function toMapOf(string $key, string $value, callable $mapper = null): Map |
447 | 447 | { |
448 | 448 | /** @psalm-suppress MissingParamType */ |
449 | - $mapper ??= static fn($k, $v): \Generator => yield $k => $v; |
|
449 | + $mapper ?? = static fn($k, $v): \Generator => yield $k => $v; |
|
450 | 450 | |
451 | 451 | /** @var Map<MT, MS> */ |
452 | 452 | $map = Map::of($key, $value); |