@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | 'description' => 'The id of this node.', |
| 121 | 121 | ], |
| 122 | 122 | ], |
| 123 | - 'resolveType' => function ($value) { |
|
| 123 | + 'resolveType' => function($value) { |
|
| 124 | 124 | if (!isset($value[ItemNormalizer::ITEM_KEY])) { |
| 125 | 125 | return null; |
| 126 | 126 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | parse_str($key, $parsed); |
| 239 | - array_walk_recursive($parsed, function (&$value) use ($graphqlFilterType) { |
|
| 239 | + array_walk_recursive($parsed, function(&$value) use ($graphqlFilterType) { |
|
| 240 | 240 | $value = $graphqlFilterType; |
| 241 | 241 | }); |
| 242 | 242 | $args = $this->mergeFilterArgs($args, $parsed, $resourceMetadata, $key); |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | 'name' => $shortName, |
| 408 | 408 | 'description' => $resourceMetadata->getDescription(), |
| 409 | 409 | 'resolveField' => $this->defaultFieldResolver, |
| 410 | - 'fields' => function () use ($resourceClass, $resourceMetadata, $input, $mutationName, $depth) { |
|
| 410 | + 'fields' => function() use ($resourceClass, $resourceMetadata, $input, $mutationName, $depth) { |
|
| 411 | 411 | return $this->getResourceObjectTypeFields($resourceClass, $resourceMetadata, $input, $mutationName, $depth); |
| 412 | 412 | }, |
| 413 | 413 | 'interfaces' => [$this->getNodeInterface()], |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | public function __invoke(string $resourceClass = null, string $rootClass = null, string $operationName = null): callable |
| 65 | 65 | { |
| 66 | - return function ($root, $args, $context, ResolveInfo $info) use ($resourceClass, $operationName) { |
|
| 66 | + return function($root, $args, $context, ResolveInfo $info) use ($resourceClass, $operationName) { |
|
| 67 | 67 | if (null === $resourceClass) { |
| 68 | 68 | return null; |
| 69 | 69 | } |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | public function __invoke(string $resourceClass = null, string $rootClass = null, string $operationName = null): callable |
| 64 | 64 | { |
| 65 | - return function ($source, $args, $context, ResolveInfo $info) use ($resourceClass, $rootClass) { |
|
| 65 | + return function($source, $args, $context, ResolveInfo $info) use ($resourceClass, $rootClass) { |
|
| 66 | 66 | if (null === $resourceClass) { |
| 67 | 67 | return null; |
| 68 | 68 | } |
@@ -29,9 +29,9 @@ |
||
| 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 | } |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | return [ |
| 82 | 82 | 'token' => $token, |
| 83 | 83 | 'user' => $token->getUser(), |
| 84 | - 'roles' => array_map(function (Role $role) { |
|
| 84 | + 'roles' => array_map(function(Role $role) { |
|
| 85 | 85 | return $role->getRole(); |
| 86 | 86 | }, $roles), |
| 87 | 87 | 'trust_resolver' => $this->authenticationTrustResolver, |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // Create the regex to purge all tags in just one request |
| 47 | - $parts = array_map(function ($iri) { |
|
| 47 | + $parts = array_map(function($iri) { |
|
| 48 | 48 | return sprintf('(^|\,)%s($|\,)', preg_quote($iri)); |
| 49 | 49 | }, $iris); |
| 50 | 50 | |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | || ( |
| 57 | 57 | '' === ($requestContent = $request->getContent()) |
| 58 | 58 | && ('POST' === $method || 'PUT' === $method) |
| 59 | - ) |
|
| 59 | + ) |
|
| 60 | 60 | ) { |
| 61 | 61 | return; |
| 62 | 62 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | $source = preg_replace_callback( |
| 65 | 65 | '/(^|(?<=&))[^=[&]+/', |
| 66 | - function ($key) { |
|
| 66 | + function($key) { |
|
| 67 | 67 | return bin2hex(urldecode($key[0])); |
| 68 | 68 | }, |
| 69 | 69 | $source |
@@ -106,8 +106,7 @@ discard block |
||
| 106 | 106 | // PHP also converts "+" to spaces when filling the global _GET or when using the function parse_str. This is why we use urldecode and then normalize to |
| 107 | 107 | // RFC 3986 with rawurlencode. |
| 108 | 108 | $parts[] = isset($keyValuePair[1]) ? |
| 109 | - rawurlencode(urldecode($keyValuePair[0])).'='.rawurlencode(urldecode($keyValuePair[1])) : |
|
| 110 | - rawurlencode(urldecode($keyValuePair[0])); |
|
| 109 | + rawurlencode(urldecode($keyValuePair[0])).'='.rawurlencode(urldecode($keyValuePair[1])) : rawurlencode(urldecode($keyValuePair[0])); |
|
| 111 | 110 | } |
| 112 | 111 | |
| 113 | 112 | return implode('&', $parts); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $parametersMemory = []; |
| 148 | 148 | $pathOperation['parameters'] = []; |
| 149 | 149 | |
| 150 | - foreach ($subresourceOperation['identifiers'] as list($identifier, , $hasIdentifier)) { |
|
| 150 | + foreach ($subresourceOperation['identifiers'] as list($identifier,, $hasIdentifier)) { |
|
| 151 | 151 | if (true === $hasIdentifier) { |
| 152 | 152 | $pathOperation['parameters'][] = ['name' => $identifier, 'in' => 'path', 'required' => true, 'type' => 'string']; |
| 153 | 153 | $parametersMemory[] = $identifier; |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | if (!isset($definitions[$definitionKey])) { |
| 456 | - $definitions[$definitionKey] = []; // Initialize first to prevent infinite loop |
|
| 456 | + $definitions[$definitionKey] = []; // Initialize first to prevent infinite loop |
|
| 457 | 457 | $definitions[$definitionKey] = $this->getDefinitionSchema($resourceClass, $resourceMetadata, $definitions, $serializerContext); |
| 458 | 458 | } |
| 459 | 459 | |