We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | $parentTypes = array_intersect_key($configs, array_flip($parents)); |
| 104 | 104 | |
| 105 | 105 | // Restore initial order |
| 106 | - uksort($parentTypes, fn ($a, $b) => (int) (array_search($a, $parents, true) > array_search($b, $parents, true))); |
|
| 106 | + uksort($parentTypes, fn($a, $b) => (int) (array_search($a, $parents, true) > array_search($b, $parents, true))); |
|
| 107 | 107 | |
| 108 | 108 | $mergedParentsConfig = self::mergeConfigs(...array_column($parentTypes, 'config')); |
| 109 | 109 | $childType = $configs[$child]; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | /** @var ArrayNodeDefinition $rootNode */ |
| 38 | 38 | $rootNode = $treeBuilder->getRootNode(); |
| 39 | 39 | |
| 40 | - $configTypeKeys = array_map(fn ($type) => $this->normalizedConfigTypeKey($type), self::$types); |
|
| 40 | + $configTypeKeys = array_map(fn($type) => $this->normalizedConfigTypeKey($type), self::$types); |
|
| 41 | 41 | |
| 42 | 42 | $this->addBeforeNormalization($rootNode); |
| 43 | 43 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | ->end() |
| 69 | 69 | // config is renamed _{TYPE}_config |
| 70 | 70 | ->beforeNormalization() |
| 71 | - ->ifTrue(fn ($v) => isset($v['type']) && is_string($v['type'])) |
|
| 71 | + ->ifTrue(fn($v) => isset($v['type']) && is_string($v['type'])) |
|
| 72 | 72 | ->then(function ($v) { |
| 73 | 73 | $key = $this->normalizedConfigTypeKey($v['type']); |
| 74 | 74 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | ->scalarNode('class_name') |
| 86 | 86 | ->isRequired() |
| 87 | 87 | ->validate() |
| 88 | - ->ifTrue(fn ($name) => !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name)) |
|
| 88 | + ->ifTrue(fn($name) => !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name)) |
|
| 89 | 89 | ->thenInvalid('A valid class name starts with a letter or underscore, followed by any number of letters, numbers, or underscores.') |
| 90 | 90 | ->end() |
| 91 | 91 | ->end() |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | ->end() |
| 105 | 105 | // _{TYPE}_config is renamed config |
| 106 | 106 | ->validate() |
| 107 | - ->ifTrue(fn ($v) => isset($v[$this->normalizedConfigTypeKey($v['type'])])) |
|
| 107 | + ->ifTrue(fn($v) => isset($v[$this->normalizedConfigTypeKey($v['type'])])) |
|
| 108 | 108 | ->then(function ($v) { |
| 109 | 109 | $key = $this->normalizedConfigTypeKey($v['type']); |
| 110 | 110 | $v['config'] = $v[$key]; |
@@ -124,8 +124,8 @@ discard block |
||
| 124 | 124 | $node |
| 125 | 125 | // process beforeNormalization (should be execute after relay normalization) |
| 126 | 126 | ->beforeNormalization() |
| 127 | - ->ifTrue(fn ($types) => is_array($types)) |
|
| 128 | - ->then(fn ($types) => Config\Processor::process($types, Config\Processor::BEFORE_NORMALIZATION)) |
|
| 127 | + ->ifTrue(fn($types) => is_array($types)) |
|
| 128 | + ->then(fn($types) => Config\Processor::process($types, Config\Processor::BEFORE_NORMALIZATION)) |
|
| 129 | 129 | ->end() |
| 130 | 130 | ; |
| 131 | 131 | } |
@@ -209,8 +209,8 @@ discard block |
||
| 209 | 209 | // @phpstan-ignore-next-line |
| 210 | 210 | $node |
| 211 | 211 | ->beforeNormalization() |
| 212 | - ->ifTrue(fn ($v) => isset($v['query']) && is_string($v['query']) || isset($v['mutation']) && is_string($v['mutation'])) |
|
| 213 | - ->then(fn ($v) => ['default' => $v]) |
|
| 212 | + ->ifTrue(fn($v) => isset($v['query']) && is_string($v['query']) || isset($v['mutation']) && is_string($v['mutation'])) |
|
| 213 | + ->then(fn($v) => ['default' => $v]) |
|
| 214 | 214 | ->end() |
| 215 | 215 | ->useAttributeAsKey('name') |
| 216 | 216 | ->prototype('array') |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $node = $builder->getRootNode(); |
| 318 | 318 | |
| 319 | 319 | $node->beforeNormalization() |
| 320 | - ->ifTrue(fn ($v) => is_array($v) && !empty($v)) |
|
| 320 | + ->ifTrue(fn($v) => is_array($v) && !empty($v)) |
|
| 321 | 321 | ->then(function ($v) { |
| 322 | 322 | foreach ($v as $key => &$config) { |
| 323 | 323 | if (is_string($config)) { |
@@ -355,19 +355,19 @@ discard block |
||
| 355 | 355 | $node = $builder->getRootNode(); |
| 356 | 356 | |
| 357 | 357 | $node->beforeNormalization() |
| 358 | - ->ifTrue(fn ($v) => is_string($v) && is_numeric($v)) |
|
| 359 | - ->then(fn ($v) => (int) $v) |
|
| 358 | + ->ifTrue(fn($v) => is_string($v) && is_numeric($v)) |
|
| 359 | + ->then(fn($v) => (int) $v) |
|
| 360 | 360 | ->end(); |
| 361 | 361 | |
| 362 | 362 | $node |
| 363 | 363 | ->info('Disabled if equal to false.') |
| 364 | 364 | ->beforeNormalization() |
| 365 | - ->ifTrue(fn ($v) => false === $v) |
|
| 366 | - ->then(fn () => $disabledValue) |
|
| 365 | + ->ifTrue(fn($v) => false === $v) |
|
| 366 | + ->then(fn() => $disabledValue) |
|
| 367 | 367 | ->end() |
| 368 | 368 | ->defaultValue($disabledValue) |
| 369 | 369 | ->validate() |
| 370 | - ->ifTrue(fn ($v) => is_int($v) && $v < 0) |
|
| 370 | + ->ifTrue(fn($v) => is_int($v) && $v < 0) |
|
| 371 | 371 | ->thenInvalid(sprintf('"%s.security.%s" must be greater or equal to 0.', self::NAME, $name)) |
| 372 | 372 | ->end() |
| 373 | 373 | ; |
@@ -12,8 +12,8 @@ |
||
| 12 | 12 | { |
| 13 | 13 | parent::__construct( |
| 14 | 14 | 'newObject', |
| 15 | - static fn ($className, $args = '[]') => "(new \\ReflectionClass($className))->newInstanceArgs($args)", |
|
| 16 | - static fn ($arguments, $className, $args = []) => new $className(...$args) |
|
| 15 | + static fn($className, $args = '[]') => "(new \\ReflectionClass($className))->newInstanceArgs($args)", |
|
| 16 | + static fn($arguments, $className, $args = []) => new $className(...$args) |
|
| 17 | 17 | ); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -318,12 +318,12 @@ |
||
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | if (!empty($c->interfaces)) { |
| 321 | - $items = array_map(fn ($type) => "$this->gqlServices->getType('$type')", $c->interfaces); |
|
| 321 | + $items = array_map(fn($type) => "$this->gqlServices->getType('$type')", $c->interfaces); |
|
| 322 | 322 | $configLoader->addItem('interfaces', ArrowFunction::new(Collection::numeric($items, true))); |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | if (!empty($c->types)) { |
| 326 | - $items = array_map(fn ($type) => "$this->gqlServices->getType('$type')", $c->types); |
|
| 326 | + $items = array_map(fn($type) => "$this->gqlServices->getType('$type')", $c->types); |
|
| 327 | 327 | $configLoader->addItem('types', ArrowFunction::new(Collection::numeric($items, true))); |
| 328 | 328 | } |
| 329 | 329 | |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | parent::__construct( |
| 15 | 15 | 'hasAnyPermission', |
| 16 | - fn ($object, $permissions) => "$this->gqlServices->get('security')->hasAnyPermission($object, $permissions)", |
|
| 17 | - static fn (array $arguments, $object, $permissions) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('security')->hasAnyPermission($object, $permissions) |
|
| 16 | + fn($object, $permissions) => "$this->gqlServices->get('security')->hasAnyPermission($object, $permissions)", |
|
| 17 | + static fn(array $arguments, $object, $permissions) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('security')->hasAnyPermission($object, $permissions) |
|
| 18 | 18 | ); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | parent::__construct( |
| 15 | 15 | 'hasAnyRole', |
| 16 | - fn ($roles) => "$this->gqlServices->get('security')->hasAnyRole($roles)", |
|
| 17 | - static fn (array $arguments, $roles) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('security')->hasAnyRole($roles) |
|
| 16 | + fn($roles) => "$this->gqlServices->get('security')->hasAnyRole($roles)", |
|
| 17 | + static fn(array $arguments, $roles) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('security')->hasAnyRole($roles) |
|
| 18 | 18 | ); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | parent::__construct( |
| 15 | 15 | 'isAnonymous', |
| 16 | - fn () => "$this->gqlServices->get('security')->isAnonymous()", |
|
| 17 | - static fn (array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('security')->isAnonymous() |
|
| 16 | + fn() => "$this->gqlServices->get('security')->isAnonymous()", |
|
| 17 | + static fn(array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('security')->isAnonymous() |
|
| 18 | 18 | ); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | parent::__construct( |
| 15 | 15 | 'isFullyAuthenticated', |
| 16 | - fn () => "$this->gqlServices->get('security')->isFullyAuthenticated()", |
|
| 17 | - fn (array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('security')->isFullyAuthenticated() |
|
| 16 | + fn() => "$this->gqlServices->get('security')->isFullyAuthenticated()", |
|
| 17 | + fn(array $arguments) => $arguments[TypeGenerator::GRAPHQL_SERVICES]->get('security')->isFullyAuthenticated() |
|
| 18 | 18 | ); |
| 19 | 19 | } |
| 20 | 20 | } |