We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -13,8 +13,8 @@ |
||
13 | 13 | { |
14 | 14 | parent::__construct( |
15 | 15 | $name, |
16 | - fn (string $value) => "$this->globalVars->get('container')->getParameter($value)", |
|
17 | - static fn (array $arguments, $paramName) => $arguments[TypeGenerator::GLOBAL_VARS]->get('container')->getParameter($paramName) |
|
16 | + fn(string $value) => "$this->globalVars->get('container')->getParameter($value)", |
|
17 | + static fn(array $arguments, $paramName) => $arguments[TypeGenerator::GLOBAL_VARS]->get('container')->getParameter($paramName) |
|
18 | 18 | ); |
19 | 19 | } |
20 | 20 | } |
@@ -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 | } |
@@ -13,8 +13,8 @@ |
||
13 | 13 | { |
14 | 14 | parent::__construct( |
15 | 15 | 'arguments', |
16 | - fn ($mapping, $data) => "$this->globalVars->get('container')->get('overblog_graphql.arguments_transformer')->getArguments($mapping, $data, \$info)", |
|
17 | - static fn (array $arguments, $mapping, $data) => $arguments[TypeGenerator::GLOBAL_VARS]->get('container')->get('overblog_graphql.arguments_transformer')->getArguments($mapping, $data, $arguments['info']) |
|
16 | + fn($mapping, $data) => "$this->globalVars->get('container')->get('overblog_graphql.arguments_transformer')->getArguments($mapping, $data, \$info)", |
|
17 | + static fn(array $arguments, $mapping, $data) => $arguments[TypeGenerator::GLOBAL_VARS]->get('container')->get('overblog_graphql.arguments_transformer')->getArguments($mapping, $data, $arguments['info']) |
|
18 | 18 | ); |
19 | 19 | } |
20 | 20 | } |
@@ -413,7 +413,7 @@ |
||
413 | 413 | $values = []; |
414 | 414 | |
415 | 415 | foreach ($graphClass->getConstants() as $name => $value) { |
416 | - $valueAnnotation = current(array_filter($enumValues, fn ($enumValueAnnotation) => $enumValueAnnotation->name == $name)); |
|
416 | + $valueAnnotation = current(array_filter($enumValues, fn($enumValueAnnotation) => $enumValueAnnotation->name == $name)); |
|
417 | 417 | $valueConfig = []; |
418 | 418 | $valueConfig['value'] = $value; |
419 | 419 |
@@ -129,12 +129,12 @@ discard block |
||
129 | 129 | if ($this->propertyAccessor->isWritable($model, $targetField)) { |
130 | 130 | |
131 | 131 | $resultValue = $this->resolveConverter( |
132 | - $modelName, |
|
133 | - $targetField, |
|
134 | - $fieldValue, |
|
135 | - $modelReflection, |
|
136 | - $fieldObject |
|
137 | - ); |
|
132 | + $modelName, |
|
133 | + $targetField, |
|
134 | + $fieldValue, |
|
135 | + $modelReflection, |
|
136 | + $fieldObject |
|
137 | + ); |
|
138 | 138 | |
139 | 139 | $this->propertyAccessor->setValue( |
140 | 140 | $model, |
@@ -398,6 +398,4 @@ discard block |
||
398 | 398 | } |
399 | 399 | } |
400 | 400 | |
401 | - return $mapping; |
|
402 | - } |
|
403 | -} |
|
401 | + return $mapping |
|
404 | 402 | \ No newline at end of file |
@@ -398,6 +398,4 @@ |
||
398 | 398 | } |
399 | 399 | } |
400 | 400 | |
401 | - return $mapping; |
|
402 | - } |
|
403 | -} |
|
401 | + return $mapping |
|
404 | 402 | \ No newline at end of file |
@@ -246,8 +246,7 @@ discard block |
||
246 | 246 | { |
247 | 247 | static $cache = []; |
248 | 248 | |
249 | - return $cache[$className][$annotationName] ??= |
|
250 | - $this->annotationReader->getClassAnnotation(new ReflectionClass($className), $annotationName); |
|
249 | + return $cache[$className][$annotationName] ??= $this->annotationReader->getClassAnnotation(new ReflectionClass($className), $annotationName); |
|
251 | 250 | } |
252 | 251 | |
253 | 252 | /** |
@@ -299,7 +298,7 @@ discard block |
||
299 | 298 | // If a path is provided, search the value from top argument down |
300 | 299 | if (count($path) > 1) { |
301 | 300 | $temp = &$this->args; |
302 | - foreach($path as $key) { |
|
301 | + foreach ($path as $key) { |
|
303 | 302 | $temp = &$temp[$key]; |
304 | 303 | } |
305 | 304 | return $temp; |
@@ -394,10 +393,8 @@ discard block |
||
394 | 393 | $annotation = $reader->getPropertyAnnotation($property, Field::class); |
395 | 394 | |
396 | 395 | if (isset($annotation->name)) { |
397 | - $mapping[$annotation->name] = $property->name; |
|
396 | + $mapping[$annotation - >name] = $property->name; |
|
398 | 397 | } |
399 | 398 | } |
400 | 399 | |
401 | - return $mapping; |
|
402 | - } |
|
403 | -} |
|
400 | + return $mapping |
|
404 | 401 | \ No newline at end of file |
@@ -398,6 +398,4 @@ |
||
398 | 398 | } |
399 | 399 | } |
400 | 400 | |
401 | - return $mapping; |
|
402 | - } |
|
403 | -} |
|
401 | + return $mapping |
|
404 | 402 | \ No newline at end of file |
@@ -398,6 +398,4 @@ |
||
398 | 398 | } |
399 | 399 | } |
400 | 400 | |
401 | - return $mapping; |
|
402 | - } |
|
403 | -} |
|
401 | + return $mapping |
|
404 | 402 | \ No newline at end of file |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** @var ArrayNodeDefinition $rootNode */ |
39 | 39 | $rootNode = $treeBuilder->getRootNode(); |
40 | 40 | |
41 | - $configTypeKeys = array_map(fn ($type) => $this->normalizedConfigTypeKey($type), self::$types); |
|
41 | + $configTypeKeys = array_map(fn($type) => $this->normalizedConfigTypeKey($type), self::$types); |
|
42 | 42 | |
43 | 43 | $this->addBeforeNormalization($rootNode); |
44 | 44 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ->end() |
70 | 70 | # temporarily rename 'config' into '_{TYPE}_config' |
71 | 71 | ->beforeNormalization() |
72 | - ->ifTrue(fn ($v) => isset($v['type']) && is_string($v['type'])) |
|
72 | + ->ifTrue(fn($v) => isset($v['type']) && is_string($v['type'])) |
|
73 | 73 | ->then(function ($v) { |
74 | 74 | $key = $this->normalizedConfigTypeKey($v['type']); |
75 | 75 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | # temporarily convert '{MODEL}' into '{TYPE}_{MODEL}' |
85 | 85 | ->beforeNormalization() |
86 | 86 | ->ifTrue(fn($v) => isset($v['model']) && is_string($v['model'])) |
87 | - ->then(function($v) { |
|
87 | + ->then(function ($v) { |
|
88 | 88 | $v['model'] = "{$v['type']}_{$v['model']}"; |
89 | 89 | return $v; |
90 | 90 | }) |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | ->scalarNode('class_name') |
95 | 95 | ->isRequired() |
96 | 96 | ->validate() |
97 | - ->ifTrue(fn ($name) => !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name)) |
|
97 | + ->ifTrue(fn($name) => !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name)) |
|
98 | 98 | ->thenInvalid('A valid class name starts with a letter or underscore, followed by any number of letters, numbers, or underscores.') |
99 | 99 | ->end() |
100 | 100 | ->end() |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | ->end() |
115 | 115 | // rename '_{TYPE}_config' back into 'config' |
116 | 116 | ->validate() |
117 | - ->ifTrue(fn ($v) => isset($v[$this->normalizedConfigTypeKey($v['type'])])) |
|
117 | + ->ifTrue(fn($v) => isset($v[$this->normalizedConfigTypeKey($v['type'])])) |
|
118 | 118 | ->then(function ($v) { |
119 | 119 | $key = $this->normalizedConfigTypeKey($v['type']); |
120 | 120 | $v['config'] = $v[$key]; |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | $node |
154 | 154 | // process beforeNormalization (should be execute after relay normalization) |
155 | 155 | ->beforeNormalization() |
156 | - ->ifTrue(fn ($types) => is_array($types)) |
|
157 | - ->then(fn ($types) => Config\Processor::process($types, Config\Processor::BEFORE_NORMALIZATION)) |
|
156 | + ->ifTrue(fn($types) => is_array($types)) |
|
157 | + ->then(fn($types) => Config\Processor::process($types, Config\Processor::BEFORE_NORMALIZATION)) |
|
158 | 158 | ->end() |
159 | 159 | ; |
160 | 160 | } |