We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -45,6 +45,6 @@ |
||
| 45 | 45 | |
| 46 | 46 | protected function normalizeFields(array $fields): array |
| 47 | 47 | { |
| 48 | - return array_map(fn (array $field) => new Field($field), $fields); |
|
| 48 | + return array_map(fn(array $field) => new Field($field), $fields); |
|
| 49 | 49 | } |
| 50 | 50 | } |
@@ -45,6 +45,6 @@ |
||
| 45 | 45 | |
| 46 | 46 | protected function normalizeArgs(array $args): array |
| 47 | 47 | { |
| 48 | - return array_map(fn (array $arg) => new Arg($arg), $args); |
|
| 48 | + return array_map(fn(array $arg) => new Arg($arg), $args); |
|
| 49 | 49 | } |
| 50 | 50 | } |
@@ -311,12 +311,12 @@ |
||
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | if (!empty($this->config->interfaces)) { |
| 314 | - $items = array_map(fn ($type) => "$this->gqlServices->getType('$type')", $this->config->interfaces); |
|
| 314 | + $items = array_map(fn($type) => "$this->gqlServices->getType('$type')", $this->config->interfaces); |
|
| 315 | 315 | $configLoader->addItem('interfaces', ArrowFunction::new(Collection::numeric($items, true))); |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | if (!empty($this->config->types)) { |
| 319 | - $items = array_map(fn ($type) => "$this->gqlServices->getType('$type')", $this->config->types); |
|
| 319 | + $items = array_map(fn($type) => "$this->gqlServices->getType('$type')", $this->config->types); |
|
| 320 | 320 | $configLoader->addItem('types', ArrowFunction::new(Collection::numeric($items, true))); |
| 321 | 321 | } |
| 322 | 322 | |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | { |
| 15 | 15 | parent::__construct( |
| 16 | 16 | 'getUser', |
| 17 | - fn () => "$this->gqlServices->get('".Security::class."')->getUser()", |
|
| 18 | - static fn (array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->getUser() |
|
| 17 | + fn() => "$this->gqlServices->get('".Security::class."')->getUser()", |
|
| 18 | + static fn(array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->getUser() |
|
| 19 | 19 | ); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | { |
| 15 | 15 | parent::__construct( |
| 16 | 16 | 'isAnonymous', |
| 17 | - fn () => "$this->gqlServices->get('".Security::class."')->isAnonymous()", |
|
| 18 | - static fn (array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->isAnonymous() |
|
| 17 | + fn() => "$this->gqlServices->get('".Security::class."')->isAnonymous()", |
|
| 18 | + static fn(array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->isAnonymous() |
|
| 19 | 19 | ); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | { |
| 15 | 15 | parent::__construct( |
| 16 | 16 | 'isRememberMe', |
| 17 | - fn () => "$this->gqlServices->get('".Security::class."')->isRememberMe()", |
|
| 18 | - static fn (array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->isRememberMe() |
|
| 17 | + fn() => "$this->gqlServices->get('".Security::class."')->isRememberMe()", |
|
| 18 | + static fn(array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->isRememberMe() |
|
| 19 | 19 | ); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -106,13 +106,13 @@ |
||
| 106 | 106 | protected function createGraphQLServices(array $services = []): GraphQLServices |
| 107 | 107 | { |
| 108 | 108 | $locateableServices = [ |
| 109 | - TypeResolver::class => fn () => $this->createMock(TypeResolver::class), |
|
| 110 | - QueryResolver::class => fn () => $this->createMock(QueryResolver::class), |
|
| 111 | - MutationResolver::class => fn () => $$this->createMock(MutationResolver::class), |
|
| 109 | + TypeResolver::class => fn() => $this->createMock(TypeResolver::class), |
|
| 110 | + QueryResolver::class => fn() => $this->createMock(QueryResolver::class), |
|
| 111 | + MutationResolver::class => fn() => $$this->createMock(MutationResolver::class), |
|
| 112 | 112 | ]; |
| 113 | 113 | |
| 114 | 114 | foreach ($services as $id => $service) { |
| 115 | - $locateableServices[$id] = fn () => $service; |
|
| 115 | + $locateableServices[$id] = fn() => $service; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | return new GraphQLServices($locateableServices); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | $alias = $container->getAlias($id); |
| 72 | 72 | $id = (string) $alias; |
| 73 | 73 | $definition = $container->getDefinition($id); |
| 74 | - } catch (ServiceNotFoundException|InvalidArgumentException $e) { |
|
| 74 | + } catch (ServiceNotFoundException | InvalidArgumentException $e) { |
|
| 75 | 75 | if ($throw) { |
| 76 | 76 | throw $e; |
| 77 | 77 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $node |
| 43 | 43 | ->isRequired() |
| 44 | 44 | ->validate() |
| 45 | - ->ifTrue(fn ($name) => !preg_match('/^[_a-z][_0-9a-z]*$/i', $name)) |
|
| 45 | + ->ifTrue(fn($name) => !preg_match('/^[_a-z][_0-9a-z]*$/i', $name)) |
|
| 46 | 46 | ->thenInvalid('Invalid type name "%s". (see http://spec.graphql.org/June2018/#sec-Names)') |
| 47 | 47 | ->end() |
| 48 | 48 | ; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | { |
| 158 | 158 | $node |
| 159 | 159 | ->beforeNormalization() |
| 160 | - ->ifTrue(fn ($options) => !empty($options[$old]) && empty($options[$new])) |
|
| 160 | + ->ifTrue(fn($options) => !empty($options[$old]) && empty($options[$new])) |
|
| 161 | 161 | ->then(function ($options) use ($old, $new) { |
| 162 | 162 | if (is_callable($options[$old])) { |
| 163 | 163 | if (is_array($options[$old])) { |
@@ -167,8 +167,7 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | } elseif (is_string($options[$old])) { |
| 169 | 169 | $options[$new]['expression'] = ExpressionLanguage::stringHasTrigger($options[$old]) ? |
| 170 | - ExpressionLanguage::unprefixExpression($options[$old]) : |
|
| 171 | - json_encode($options[$old]); |
|
| 170 | + ExpressionLanguage::unprefixExpression($options[$old]) : json_encode($options[$old]); |
|
| 172 | 171 | } else { |
| 173 | 172 | $options[$new]['expression'] = json_encode($options[$old]); |
| 174 | 173 | } |
@@ -177,7 +176,7 @@ discard block |
||
| 177 | 176 | }) |
| 178 | 177 | ->end() |
| 179 | 178 | ->beforeNormalization() |
| 180 | - ->ifTrue(fn ($options) => is_array($options) && array_key_exists($old, $options)) |
|
| 179 | + ->ifTrue(fn($options) => is_array($options) && array_key_exists($old, $options)) |
|
| 181 | 180 | ->then(function ($options) use ($old) { |
| 182 | 181 | unset($options[$old]); |
| 183 | 182 | |
@@ -185,7 +184,7 @@ discard block |
||
| 185 | 184 | }) |
| 186 | 185 | ->end() |
| 187 | 186 | ->validate() |
| 188 | - ->ifTrue(fn (array $v) => !empty($v[$new]) && !empty($v[$old])) |
|
| 187 | + ->ifTrue(fn(array $v) => !empty($v[$new]) && !empty($v[$old])) |
|
| 189 | 188 | ->thenInvalid(sprintf( |
| 190 | 189 | '"%s" and "%s" should not be used together in "%%s".', |
| 191 | 190 | $new, |
@@ -203,17 +202,17 @@ discard block |
||
| 203 | 202 | $node |
| 204 | 203 | ->info($info) |
| 205 | 204 | ->validate() |
| 206 | - ->ifTrue(fn (array $v) => !empty($v['method']) && !empty($v['expression'])) |
|
| 205 | + ->ifTrue(fn(array $v) => !empty($v['method']) && !empty($v['expression'])) |
|
| 207 | 206 | ->thenInvalid('"method" and "expression" should not be use together.') |
| 208 | 207 | ->end() |
| 209 | 208 | ->beforeNormalization() |
| 210 | 209 | // Allow short syntax |
| 211 | - ->ifTrue(fn ($options) => is_string($options) && ExpressionLanguage::stringHasTrigger($options)) |
|
| 212 | - ->then(fn ($options) => ['expression' => ExpressionLanguage::unprefixExpression($options)]) |
|
| 210 | + ->ifTrue(fn($options) => is_string($options) && ExpressionLanguage::stringHasTrigger($options)) |
|
| 211 | + ->then(fn($options) => ['expression' => ExpressionLanguage::unprefixExpression($options)]) |
|
| 213 | 212 | ->end() |
| 214 | 213 | ->beforeNormalization() |
| 215 | - ->ifTrue(fn ($options) => is_string($options) && !ExpressionLanguage::stringHasTrigger($options)) |
|
| 216 | - ->then(fn ($options) => ['method' => $options]) |
|
| 214 | + ->ifTrue(fn($options) => is_string($options) && !ExpressionLanguage::stringHasTrigger($options)) |
|
| 215 | + ->then(fn($options) => ['method' => $options]) |
|
| 217 | 216 | ->end() |
| 218 | 217 | ->children() |
| 219 | 218 | ->scalarNode('method')->end() |