@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Spiechu\SymfonyCommonsBundle\EventListener; |
6 | 6 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @return null|ResponseSchemaValidator |
49 | 49 | */ |
50 | - protected function getResponseSchemaValidator(?callable $controller): ?ResponseSchemaValidator |
|
50 | + protected function getResponseSchemaValidator(? callable $controller) : ?ResponseSchemaValidator |
|
51 | 51 | { |
52 | 52 | return $this->getMethodAnnotationFromController($controller, ResponseSchemaValidator::class); |
53 | 53 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Spiechu\SymfonyCommonsBundle\Service; |
6 | 6 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return ValidationViolation |
42 | 42 | */ |
43 | - public static function create(string $message, ?string $property = null): self |
|
43 | + public static function create(string $message, ?string $property = null) : self |
|
44 | 44 | { |
45 | 45 | return new static($message, $property); |
46 | 46 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Spiechu\SymfonyCommonsBundle\Service; |
6 | 6 | |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * @param null|string $apiVersion |
16 | 16 | */ |
17 | - public function setApiVersion(?string $apiVersion): void |
|
17 | + public function setApiVersion(?string $apiVersion) : void |
|
18 | 18 | { |
19 | 19 | $this->apiVersion = $apiVersion; |
20 | 20 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Spiechu\SymfonyCommonsBundle\Service; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Spiechu\SymfonyCommonsBundle\Utils; |
6 | 6 | |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * |
12 | 12 | * @return array |
13 | 13 | */ |
14 | - public static function flatArrayRecursive(?array $array): array |
|
14 | + public static function flatArrayRecursive(? array $array) : array |
|
15 | 15 | { |
16 | 16 | if (empty($array)) { |
17 | 17 | return []; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Spiechu\SymfonyCommonsBundle\Event\ApiVersion; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Spiechu\SymfonyCommonsBundle\ApiFeature; |
6 | 6 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | ->cannotBeEmpty() |
57 | 57 | ->defaultValue('_method') |
58 | 58 | ->validate() |
59 | - ->ifTrue(function ($methodName): bool { |
|
59 | + ->ifTrue(function($methodName): bool { |
|
60 | 60 | return !is_string($methodName); |
61 | 61 | }) |
62 | 62 | ->thenInvalid('Not a string provided') |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ->end() |
79 | 79 | ->beforeNormalization() |
80 | 80 | ->ifArray() |
81 | - ->then(function (array $methods): array { |
|
81 | + ->then(function(array $methods): array { |
|
82 | 82 | return array_unique(array_map('strtoupper', $methods)); |
83 | 83 | }) |
84 | 84 | ->end() |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | protected function addApiVersionSupport(ArrayNodeDefinition $rootNode): void |
121 | 121 | { |
122 | - $versionNormalizer = static function ($version): string { |
|
122 | + $versionNormalizer = static function($version): string { |
|
123 | 123 | if (is_string($version)) { |
124 | 124 | return $version; |
125 | 125 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | ->end() |
157 | 157 | ->end() |
158 | 158 | ->beforeNormalization() |
159 | - ->always(function ($prototypeValue): array { |
|
159 | + ->always(function($prototypeValue): array { |
|
160 | 160 | if (empty($prototypeValue)) { |
161 | 161 | throw new \InvalidArgumentException('No version constraints provided'); |
162 | 162 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Spiechu\SymfonyCommonsBundle\Service; |
6 | 6 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @throws \InvalidArgumentException When feature with given name already exists |
37 | 37 | */ |
38 | - public function addFeature(string $name, ?string $since, ?string $until): void |
|
38 | + public function addFeature(string $name, ?string $since, ?string $until) : void |
|
39 | 39 | { |
40 | 40 | $this->assertVersionCompatibleString($since); |
41 | 41 | $this->assertVersionCompatibleString($until); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @throws \InvalidArgumentException When $string is not version compatible |
131 | 131 | */ |
132 | - protected function assertVersionCompatibleString(?string $string): void |
|
132 | + protected function assertVersionCompatibleString(?string $string) : void |
|
133 | 133 | { |
134 | 134 | if (null === $string || is_numeric($string)) { |
135 | 135 | return; |