We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | private function autowireSolutionImplementingContainerAwareInterface(Definition $solutionDefinition, bool $isGenerated): void |
| 97 | 97 | { |
| 98 | 98 | $methods = array_map( |
| 99 | - fn ($methodCall) => $methodCall[0], |
|
| 99 | + fn($methodCall) => $methodCall[0], |
|
| 100 | 100 | $solutionDefinition->getMethodCalls() |
| 101 | 101 | ); |
| 102 | 102 | if ( |
@@ -156,7 +156,7 @@ |
||
| 156 | 156 | private function checkTypesDuplication(array $typeConfigs): void |
| 157 | 157 | { |
| 158 | 158 | $types = array_merge(...array_map('array_keys', $typeConfigs)); |
| 159 | - $duplications = array_keys(array_filter(array_count_values($types), fn ($count) => $count > 1)); |
|
| 159 | + $duplications = array_keys(array_filter(array_count_values($types), fn($count) => $count > 1)); |
|
| 160 | 160 | if (!empty($duplications)) { |
| 161 | 161 | throw new ForbiddenOverwriteException(sprintf( |
| 162 | 162 | 'Types (%s) cannot be overwritten. See inheritance doc section for more details.', |
@@ -219,8 +219,8 @@ discard block |
||
| 219 | 219 | // @phpstan-ignore-next-line |
| 220 | 220 | $node |
| 221 | 221 | ->beforeNormalization() |
| 222 | - ->ifTrue(fn ($v) => isset($v['query']) && is_string($v['query']) || isset($v['mutation']) && is_string($v['mutation'])) |
|
| 223 | - ->then(fn ($v) => ['default' => $v]) |
|
| 222 | + ->ifTrue(fn($v) => isset($v['query']) && is_string($v['query']) || isset($v['mutation']) && is_string($v['mutation'])) |
|
| 223 | + ->then(fn($v) => ['default' => $v]) |
|
| 224 | 224 | ->end() |
| 225 | 225 | ->useAttributeAsKey('name') |
| 226 | 226 | ->prototype('array') |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | ->prototype('array') |
| 271 | 271 | ->addDefaultsIfNotSet() |
| 272 | 272 | ->beforeNormalization() |
| 273 | - ->ifTrue(fn ($v) => isset($v['type']) && is_string($v['type'])) |
|
| 273 | + ->ifTrue(fn($v) => isset($v['type']) && is_string($v['type'])) |
|
| 274 | 274 | ->then(function ($v) { |
| 275 | 275 | if ('yml' === $v['type']) { |
| 276 | 276 | $v['types'] = ['yaml']; |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | $node = $builder->getRootNode(); |
| 345 | 345 | |
| 346 | 346 | $node->beforeNormalization() |
| 347 | - ->ifTrue(fn ($v) => is_array($v) && !empty($v)) |
|
| 347 | + ->ifTrue(fn($v) => is_array($v) && !empty($v)) |
|
| 348 | 348 | ->then(function ($v) { |
| 349 | 349 | foreach ($v as $key => &$config) { |
| 350 | 350 | if (is_string($config)) { |
@@ -382,19 +382,19 @@ discard block |
||
| 382 | 382 | $node = $builder->getRootNode(); |
| 383 | 383 | |
| 384 | 384 | $node->beforeNormalization() |
| 385 | - ->ifTrue(fn ($v) => is_string($v) && is_numeric($v)) |
|
| 386 | - ->then(fn ($v) => (int) $v) |
|
| 385 | + ->ifTrue(fn($v) => is_string($v) && is_numeric($v)) |
|
| 386 | + ->then(fn($v) => (int) $v) |
|
| 387 | 387 | ->end(); |
| 388 | 388 | |
| 389 | 389 | $node |
| 390 | 390 | ->info('Disabled if equal to false.') |
| 391 | 391 | ->beforeNormalization() |
| 392 | - ->ifTrue(fn ($v) => false === $v) |
|
| 393 | - ->then(fn () => $disabledValue) |
|
| 392 | + ->ifTrue(fn($v) => false === $v) |
|
| 393 | + ->then(fn() => $disabledValue) |
|
| 394 | 394 | ->end() |
| 395 | 395 | ->defaultValue($disabledValue) |
| 396 | 396 | ->validate() |
| 397 | - ->ifTrue(fn ($v) => is_int($v) && $v < 0) |
|
| 397 | + ->ifTrue(fn($v) => is_int($v) && $v < 0) |
|
| 398 | 398 | ->thenInvalid(sprintf('"%s.security.%s" must be greater or equal to 0.', self::NAME, $name)) |
| 399 | 399 | ->end() |
| 400 | 400 | ; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | private function treatFieldsDefaultAccess(ArrayNodeDefinition $node): void |
| 51 | 51 | { |
| 52 | 52 | $node->validate() |
| 53 | - ->ifTrue(fn ($v) => array_key_exists('fieldsDefaultAccess', $v) && null !== $v['fieldsDefaultAccess']) |
|
| 53 | + ->ifTrue(fn($v) => array_key_exists('fieldsDefaultAccess', $v) && null !== $v['fieldsDefaultAccess']) |
|
| 54 | 54 | ->then(function ($v) { |
| 55 | 55 | foreach ($v['fields'] as &$field) { |
| 56 | 56 | if (array_key_exists('access', $field) && null !== $field['access']) { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | private function treatFieldsDefaultPublic(ArrayNodeDefinition $node): void |
| 72 | 72 | { |
| 73 | 73 | $node->validate() |
| 74 | - ->ifTrue(fn ($v) => array_key_exists('fieldsDefaultPublic', $v) && null !== $v['fieldsDefaultPublic']) |
|
| 74 | + ->ifTrue(fn($v) => array_key_exists('fieldsDefaultPublic', $v) && null !== $v['fieldsDefaultPublic']) |
|
| 75 | 75 | ->then(function ($v) { |
| 76 | 76 | foreach ($v['fields'] as &$field) { |
| 77 | 77 | if (array_key_exists('public', $field) && null !== $field['public']) { |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | |
| 347 | 347 | $buildersAnnotations = array_merge(self::getMetadataMatching($metadatas, Metadata\FieldsBuilder::class), $typeAnnotation->builders); |
| 348 | 348 | if (!empty($buildersAnnotations)) { |
| 349 | - $typeConfiguration['builders'] = array_map(fn ($fieldsBuilderAnnotation) => ['builder' => $fieldsBuilderAnnotation->name, 'builderConfig' => $fieldsBuilderAnnotation->config], $buildersAnnotations); |
|
| 349 | + $typeConfiguration['builders'] = array_map(fn($fieldsBuilderAnnotation) => ['builder' => $fieldsBuilderAnnotation->name, 'builderConfig' => $fieldsBuilderAnnotation->config], $buildersAnnotations); |
|
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | if (isset($typeAnnotation->isTypeOf)) { |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | $reflectionConstant = new ReflectionClassConstant($reflectionClass->getName(), $name); |
| 441 | 441 | $valueConfig = self::getDescriptionConfiguration(static::getMetadatas($reflectionConstant), true); |
| 442 | 442 | |
| 443 | - $enumValueAnnotation = current(array_filter($enumValues, fn ($enumValueAnnotation) => $enumValueAnnotation->name === $name)); |
|
| 443 | + $enumValueAnnotation = current(array_filter($enumValues, fn($enumValueAnnotation) => $enumValueAnnotation->name === $name)); |
|
| 444 | 444 | $valueConfig['value'] = $value; |
| 445 | 445 | |
| 446 | 446 | if (false !== $enumValueAnnotation) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | private static function removedDecorators(array $configs): array |
| 41 | 41 | { |
| 42 | - return array_filter($configs, fn ($config) => !isset($config['decorator']) || true !== $config['decorator']); |
|
| 42 | + return array_filter($configs, fn($config) => !isset($config['decorator']) || true !== $config['decorator']); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | private static function processConfigsHeirs(array $configs): array |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $parentTypes = array_intersect_key($configs, array_flip($parents)); |
| 102 | 102 | |
| 103 | 103 | // Restore initial order |
| 104 | - uksort($parentTypes, fn ($a, $b) => (int) (array_search($a, $parents, true) > array_search($b, $parents, true))); |
|
| 104 | + uksort($parentTypes, fn($a, $b) => (int) (array_search($a, $parents, true) > array_search($b, $parents, true))); |
|
| 105 | 105 | |
| 106 | 106 | $mergedParentsConfig = self::mergeConfigs(...array_column($parentTypes, 'config')); |
| 107 | 107 | $childType = $configs[$child]; |
@@ -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 use 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 | |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | parent::__construct( |
| 15 | 15 | 'arguments', |
| 16 | - fn ($mapping, $data) => "$this->gqlServices->get('service_container')->get('overblog_graphql.arguments_transformer')->getArguments($mapping, $data, \$info)", |
|
| 17 | - static fn (array $arguments, $mapping, $data) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('service_container')->get('overblog_graphql.arguments_transformer')->getArguments($mapping, $data, $arguments['info']) |
|
| 16 | + fn($mapping, $data) => "$this->gqlServices->get('service_container')->get('overblog_graphql.arguments_transformer')->getArguments($mapping, $data, \$info)", |
|
| 17 | + static fn(array $arguments, $mapping, $data) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('service_container')->get('overblog_graphql.arguments_transformer')->getArguments($mapping, $data, $arguments['info']) |
|
| 18 | 18 | ); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -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 | } |