@@ -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\Sequence; |
5 | 5 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | /** |
201 | 201 | * @param callable(T): void $function |
202 | 202 | */ |
203 | - public function foreach(callable $function): void |
|
203 | + public function foreach (callable $function): void |
|
204 | 204 | { |
205 | 205 | foreach ($this->iterator() as $value) { |
206 | 206 | $function($value); |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | public function toSequenceOf(string $type, callable $mapper = null): Sequence |
582 | 582 | { |
583 | 583 | /** @psalm-suppress MissingParamType */ |
584 | - $mapper ??= static fn($v): \Generator => yield $v; |
|
584 | + $mapper ?? = static fn($v): \Generator => yield $v; |
|
585 | 585 | $values = $this->values; |
586 | 586 | |
587 | 587 | /** @psalm-suppress MissingClosureParamType */ |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | public function toSetOf(string $type, callable $mapper = null): Set |
610 | 610 | { |
611 | 611 | /** @psalm-suppress MissingParamType */ |
612 | - $mapper ??= static fn($v): \Generator => yield $v; |
|
612 | + $mapper ?? = static fn($v): \Generator => yield $v; |
|
613 | 613 | $values = $this->values; |
614 | 614 | |
615 | 615 | /** @psalm-suppress MissingClosureParamType */ |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Fixtures\Innmind\Immutable; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Fixtures\Innmind\Immutable; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Fixtures\Innmind\Immutable; |
5 | 5 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Tests\Innmind\Immutable\Map; |
5 | 5 | |
@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | $this->assertSame(1, $m2->size()); |
56 | 56 | |
57 | 57 | $m = new Primitive('int', 'int'); |
58 | - $m = $m |
|
59 | - (23, 24) |
|
58 | + $m = $m(23, 24) |
|
60 | 59 | (41, 42) |
61 | 60 | (65, 66) |
62 | 61 | (89, 90) |
@@ -431,7 +430,7 @@ discard block |
||
431 | 430 | |
432 | 431 | $v = $m->reduce( |
433 | 432 | 42, |
434 | - function (float $carry, int $key, int $value): float { |
|
433 | + function(float $carry, int $key, int $value): float { |
|
435 | 434 | return $carry / ($key * $value); |
436 | 435 | } |
437 | 436 | ); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Tests\Innmind\Immutable\Map; |
5 | 5 | |
@@ -48,8 +48,7 @@ discard block |
||
48 | 48 | $this->assertSame(1, $m2->size()); |
49 | 49 | |
50 | 50 | $m = new ObjectKeys('stdClass', 'int'); |
51 | - $m = $m |
|
52 | - ($a = new \stdClass, 24) |
|
51 | + $m = $m($a = new \stdClass, 24) |
|
53 | 52 | ($b = new \stdClass, 42) |
54 | 53 | ($c = new \stdClass, 66) |
55 | 54 | ($d = new \stdClass, 90) |
@@ -398,7 +397,7 @@ discard block |
||
398 | 397 | |
399 | 398 | $v = $m->reduce( |
400 | 399 | 42, |
401 | - function (float $carry, \stdClass $key, int $value): float { |
|
400 | + function(float $carry, \stdClass $key, int $value): float { |
|
402 | 401 | return $carry / $value; |
403 | 402 | } |
404 | 403 | ); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Tests\Innmind\Immutable\Map; |
5 | 5 | |
@@ -41,8 +41,7 @@ discard block |
||
41 | 41 | $this->assertSame(1, $m2->size()); |
42 | 42 | |
43 | 43 | $m = new DoubleIndex('int', 'int'); |
44 | - $m = $m |
|
45 | - (23, 24) |
|
44 | + $m = $m(23, 24) |
|
46 | 45 | (41, 42) |
47 | 46 | (65, 66) |
48 | 47 | (89, 90) |
@@ -417,7 +416,7 @@ discard block |
||
417 | 416 | |
418 | 417 | $v = $m->reduce( |
419 | 418 | 42, |
420 | - function (float $carry, int $key, int $value): float { |
|
419 | + function(float $carry, int $key, int $value): float { |
|
421 | 420 | return $carry / ($key * $value); |
422 | 421 | } |
423 | 422 | ); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Tests\Innmind\Immutable\ValidateArgument; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Tests\Innmind\Immutable\Sequence; |
5 | 5 |