@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\Security\EventListener; |
| 15 | 15 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | 'user' => $token->getUser(), |
| 108 | 108 | 'object' => $request->attributes->get('data'), |
| 109 | 109 | 'request' => $request, |
| 110 | - 'roles' => array_map(function (Role $role) { |
|
| 110 | + 'roles' => array_map(function(Role $role) { |
|
| 111 | 111 | return $role->getRole(); |
| 112 | 112 | }, $roles), |
| 113 | 113 | 'trust_resolver' => $this->authenticationTrustResolver, |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\DataProvider; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\Bridge\Doctrine\Orm; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\Security; |
| 15 | 15 | |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | parent::registerFunctions(); |
| 31 | 31 | |
| 32 | - $this->register('is_granted', function ($attributes, $object = 'null') { |
|
| 32 | + $this->register('is_granted', function($attributes, $object = 'null') { |
|
| 33 | 33 | return sprintf('$auth_checker->isGranted(%s, %s)', $attributes, $object); |
| 34 | - }, function (array $variables, $attributes, $object = null) { |
|
| 34 | + }, function(array $variables, $attributes, $object = null) { |
|
| 35 | 35 | return $variables['auth_checker']->isGranted($attributes, $object); |
| 36 | 36 | }); |
| 37 | 37 | } |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | ->arrayNode('swagger') |
| 90 | 90 | ->addDefaultsIfNotSet() |
| 91 | 91 | ->children() |
| 92 | - ->arrayNode('api_keys') |
|
| 93 | - ->prototype('array') |
|
| 92 | + ->arrayNode('api_keys') |
|
| 93 | + ->prototype('array') |
|
| 94 | 94 | ->children() |
| 95 | 95 | ->scalarNode('name') |
| 96 | 96 | ->info('The name of the header or query parameter containing the api key.') |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | ->values(['query', 'header']) |
| 101 | 101 | ->end() |
| 102 | 102 | ->end() |
| 103 | - ->end() |
|
| 103 | + ->end() |
|
| 104 | 104 | ->end() |
| 105 | 105 | ->end() |
| 106 | 106 | ->end() |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\Bridge\Symfony\Bundle\DependencyInjection; |
| 15 | 15 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | ->scalarNode('description')->defaultValue('')->info('The description of the API.')->end() |
| 46 | 46 | ->scalarNode('version')->defaultValue('0.0.0')->info('The version of the API.')->end() |
| 47 | 47 | ->scalarNode('default_operation_path_resolver') |
| 48 | - ->beforeNormalization()->always(function ($v) { |
|
| 48 | + ->beforeNormalization()->always(function($v) { |
|
| 49 | 49 | @trigger_error('The use of the `default_operation_path_resolver` has been deprecated in 2.1 and will be removed in 3.0. Use `path_segment_name_generator` instead.', E_USER_DEPRECATED); |
| 50 | 50 | |
| 51 | 51 | return $v; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | ->end() |
| 68 | 68 | ->booleanNode('enable_fos_user')->defaultValue(class_exists(FOSUserBundle::class))->info('Enable the FOSUserBundle integration.')->end() |
| 69 | 69 | ->booleanNode('enable_nelmio_api_doc') |
| 70 | - ->beforeNormalization()->always(function ($v) { |
|
| 70 | + ->beforeNormalization()->always(function($v) { |
|
| 71 | 71 | if ($v) { |
| 72 | 72 | @trigger_error('Enabling the NelmioApiDocBundle integration has been deprecated in 2.2 and will be removed in 3.0. NelmioApiDocBundle 3 has native support for API Platform.', E_USER_DEPRECATED); |
| 73 | 73 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | ->useAttributeAsKey('exception_class') |
| 212 | 212 | ->beforeNormalization() |
| 213 | 213 | ->ifArray() |
| 214 | - ->then(function (array $exceptionToStatus) { |
|
| 214 | + ->then(function(array $exceptionToStatus) { |
|
| 215 | 215 | foreach ($exceptionToStatus as &$httpStatusCode) { |
| 216 | 216 | if (is_int($httpStatusCode)) { |
| 217 | 217 | continue; |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | ->prototype('integer')->end() |
| 231 | 231 | ->validate() |
| 232 | 232 | ->ifArray() |
| 233 | - ->then(function (array $exceptionToStatus) { |
|
| 233 | + ->then(function(array $exceptionToStatus) { |
|
| 234 | 234 | foreach ($exceptionToStatus as $httpStatusCode) { |
| 235 | 235 | if ($httpStatusCode < 100 || $httpStatusCode >= 600) { |
| 236 | 236 | throw new InvalidConfigurationException(sprintf('The HTTP status code "%s" is not valid.', $httpStatusCode)); |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | ->useAttributeAsKey('format') |
| 263 | 263 | ->beforeNormalization() |
| 264 | 264 | ->ifArray() |
| 265 | - ->then(function ($v) { |
|
| 265 | + ->then(function($v) { |
|
| 266 | 266 | foreach ($v as $format => $value) { |
| 267 | 267 | if (isset($value['mime_types'])) { |
| 268 | 268 | continue; |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\Serializer; |
| 15 | 15 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $this->itemDataProvider = $itemDataProvider; |
| 60 | 60 | $this->allowPlainIdentifiers = $allowPlainIdentifiers; |
| 61 | 61 | |
| 62 | - $this->setCircularReferenceHandler(function ($object) { |
|
| 62 | + $this->setCircularReferenceHandler(function($object) { |
|
| 63 | 63 | return $this->iriConverter->getIriFromItem($object); |
| 64 | 64 | }); |
| 65 | 65 | } |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Util; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\EventListener; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\EventListener; |
| 15 | 15 | |