We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | { |
| 15 | 15 | parent::__construct( |
| 16 | 16 | 'hasAnyPermission', |
| 17 | - fn ($object, $permissions) => "$this->gqlServices->get('".Security::class."')->hasAnyPermission($object, $permissions)", |
|
| 18 | - static fn (array $arguments, $object, $permissions) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->hasAnyPermission($object, $permissions) |
|
| 17 | + fn($object, $permissions) => "$this->gqlServices->get('".Security::class."')->hasAnyPermission($object, $permissions)", |
|
| 18 | + static fn(array $arguments, $object, $permissions) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->hasAnyPermission($object, $permissions) |
|
| 19 | 19 | ); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | { |
| 15 | 15 | parent::__construct( |
| 16 | 16 | 'isGranted', |
| 17 | - fn ($attributes, $object = 'null') => "$this->gqlServices->get('".Security::class."')->isGranted($attributes, $object)", |
|
| 18 | - static fn (array $arguments, $attributes, $object = null) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->isGranted($attributes, $object) |
|
| 17 | + fn($attributes, $object = 'null') => "$this->gqlServices->get('".Security::class."')->isGranted($attributes, $object)", |
|
| 18 | + static fn(array $arguments, $attributes, $object = null) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->isGranted($attributes, $object) |
|
| 19 | 19 | ); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | { |
| 15 | 15 | parent::__construct( |
| 16 | 16 | 'hasRole', |
| 17 | - fn ($role) => "$this->gqlServices->get('".Security::class."')->hasRole($role)", |
|
| 18 | - static fn (array $arguments, $role) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->hasRole($role) |
|
| 17 | + fn($role) => "$this->gqlServices->get('".Security::class."')->hasRole($role)", |
|
| 18 | + static fn(array $arguments, $role) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get(Security::class)->hasRole($role) |
|
| 19 | 19 | ); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | parent::__construct( |
| 15 | 15 | $name, |
| 16 | - fn (string $value) => "$this->gqlServices->get('service_container')->getParameter($value)", |
|
| 17 | - static fn (array $arguments, $paramName) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('service_container')->getParameter($paramName) |
|
| 16 | + fn(string $value) => "$this->gqlServices->get('service_container')->getParameter($value)", |
|
| 17 | + static fn(array $arguments, $paramName) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('service_container')->getParameter($paramName) |
|
| 18 | 18 | ); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | parent::__construct( |
| 15 | 15 | $name, |
| 16 | - fn (string $serviceId) => "$this->gqlServices->get('service_container')->get($serviceId)", |
|
| 17 | - static fn (array $arguments, $serviceId) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('service_container')->get($serviceId) |
|
| 16 | + fn(string $serviceId) => "$this->gqlServices->get('service_container')->get($serviceId)", |
|
| 17 | + static fn(array $arguments, $serviceId) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('service_container')->get($serviceId) |
|
| 18 | 18 | ); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -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 | |
@@ -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,21 +202,21 @@ 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 | ->beforeNormalization() |
| 219 | 218 | // clean expression |
| 220 | - ->ifTrue(fn ($options) => isset($options['expression']) && is_string($options['expression']) && ExpressionLanguage::stringHasTrigger($options['expression'])) |
|
| 219 | + ->ifTrue(fn($options) => isset($options['expression']) && is_string($options['expression']) && ExpressionLanguage::stringHasTrigger($options['expression'])) |
|
| 221 | 220 | ->then(function ($options) { |
| 222 | 221 | $options['expression'] = ExpressionLanguage::unprefixExpression($options['expression']); |
| 223 | 222 | |