We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $this->expectExceptionMessage( |
| 23 | 23 | 'Enum class "invalid_class" does not exist.', |
| 24 | 24 | ); |
| 25 | - new PhpEnumType([ // @phpstan-ignore-line |
|
| 25 | + new PhpEnumType([// @phpstan-ignore-line |
|
| 26 | 26 | 'name' => 'MyEnum', |
| 27 | 27 | 'enumClass' => 'invalid_class', |
| 28 | 28 | ]); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | private ?ResolverArgs $__resolverArgs; |
| 50 | 50 | |
| 51 | 51 | public function __construct( |
| 52 | - ObjectType|InputObjectType $type, |
|
| 52 | + ObjectType | InputObjectType $type, |
|
| 53 | 53 | ?string $field = null, |
| 54 | 54 | ?ValidationNode $parent = null, |
| 55 | 55 | ?ResolverArgs $resolverArgs = null |
@@ -33,10 +33,10 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @dataProvider specialTypeFieldProvider |
| 35 | 35 | */ |
| 36 | - public function testSpecialField($fieldName, ObjectType|UnionType|InterfaceType|CustomScalarType $typeWithSpecialField, ?callable $fieldValueRetriever = null, $strict = true): void |
|
| 36 | + public function testSpecialField($fieldName, ObjectType | UnionType | InterfaceType | CustomScalarType $typeWithSpecialField, ?callable $fieldValueRetriever = null, $strict = true): void |
|
| 37 | 37 | { |
| 38 | 38 | if (null === $fieldValueRetriever) { |
| 39 | - $fieldValueRetriever = fn (ObjectType|UnionType|InterfaceType|CustomScalarType $type, $fieldName) => $type->config[$fieldName]; |
|
| 39 | + $fieldValueRetriever = fn (ObjectType | UnionType | InterfaceType | CustomScalarType $type, $fieldName) => $type->config[$fieldName]; |
|
| 40 | 40 | } |
| 41 | 41 | $expected = static function (): void { |
| 42 | 42 | }; |
@@ -292,8 +292,8 @@ discard block |
||
| 292 | 292 | // custom scalar |
| 293 | 293 | [ResolverMapInterface::SERIALIZE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => ''])], |
| 294 | 294 | [ResolverMapInterface::PARSE_VALUE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => '', 'parseValue' => fn (mixed $input): mixed => ''])], |
| 295 | - [ResolverMapInterface::PARSE_LITERAL, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => '', 'parseLiteral' => fn (Node $a, ?array $b): mixed => ''])], |
|
| 296 | - [ResolverMapInterface::SCALAR_TYPE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => ''])], |
|
| 295 | + [ResolverMapInterface::PARSE_LITERAL, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => '', 'parseLiteral' => fn (Node $a, ?array $b) : mixed => ''])], |
|
| 296 | + [ResolverMapInterface::SCALAR_TYPE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input) : mixed => ''])], |
|
| 297 | 297 | ]; |
| 298 | 298 | } |
| 299 | 299 | |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | return $value; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - public static function isListOfType(GeneratedTypeInterface|ListOfType|NonNull $type): bool |
|
| 51 | + public static function isListOfType(GeneratedTypeInterface | ListOfType | NonNull $type): bool |
|
| 52 | 52 | { |
| 53 | 53 | if ($type instanceof ListOfType || ($type instanceof NonNull && $type->getWrappedType() instanceof ListOfType)) { |
| 54 | 54 | return true; |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * |
| 62 | 62 | * @throws ArgumentsValidationException |
| 63 | 63 | */ |
| 64 | - public function validate(string|array|null $groups = null, bool $throw = true): ?ConstraintViolationListInterface |
|
| 64 | + public function validate(string | array | null $groups = null, bool $throw = true): ?ConstraintViolationListInterface |
|
| 65 | 65 | { |
| 66 | 66 | $rootNode = new ValidationNode( |
| 67 | 67 | $this->info->parentType, |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | return $rootObject; |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - private function shouldCascade(array $config, array $inputData, string|int $property): bool |
|
| 162 | + private function shouldCascade(array $config, array $inputData, string | int $property): bool |
|
| 163 | 163 | { |
| 164 | 164 | return isset($config['cascade']) && isset($inputData[$property]); |
| 165 | 165 | } |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | * Creates a new nested ValidationNode object or a collection of them |
| 169 | 169 | * based on the type of the argument and applies the cascade validation. |
| 170 | 170 | */ |
| 171 | - private function handleCascade(ValidationNode $rootObject, string|int $property, array $arg, array $config, mixed $value): void |
|
| 171 | + private function handleCascade(ValidationNode $rootObject, string | int $property, array $arg, array $config, mixed $value): void |
|
| 172 | 172 | { |
| 173 | 173 | $argType = Utils::unclosure($arg['type']); |
| 174 | 174 | /** @var ObjectType|InputObjectType $type */ |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | /** |
| 203 | 203 | * Adds property constraints to the metadata object related to a ValidationNode object. |
| 204 | 204 | */ |
| 205 | - private function applyPropertyConstraints(ObjectMetadata $metadata, string|int $property, array $config): void |
|
| 205 | + private function applyPropertyConstraints(ObjectMetadata $metadata, string | int $property, array $config): void |
|
| 206 | 206 | { |
| 207 | 207 | foreach ($config as $key => $value) { |
| 208 | 208 | switch ($key) { |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | } |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | - private function addLinkedConstraints(string $property, array $link, ObjectMetadata $metadata, ): void |
|
| 224 | + private function addLinkedConstraints(string $property, array $link, ObjectMetadata $metadata,): void |
|
| 225 | 225 | { |
| 226 | 226 | [$fqcn, $classProperty, $type] = $link; |
| 227 | 227 | |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | |
| 253 | - private function createCollectionNode(array $values, ObjectType|InputObjectType $type, ValidationNode $parent): array |
|
| 253 | + private function createCollectionNode(array $values, ObjectType | InputObjectType $type, ValidationNode $parent): array |
|
| 254 | 254 | { |
| 255 | 255 | $collection = []; |
| 256 | 256 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | return $collection; |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | - private function createObjectNode(array $value, ObjectType|InputObjectType $type, ValidationNode $parent): ValidationNode |
|
| 264 | + private function createObjectNode(array $value, ObjectType | InputObjectType $type, ValidationNode $parent): ValidationNode |
|
| 265 | 265 | { |
| 266 | 266 | /** @phpstan-ignore-next-line */ |
| 267 | 267 | $classValidation = Utils::normalizeConfig($type->config['validation'] ?? []); |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | /** |
| 301 | 301 | * @throws ArgumentsValidationException |
| 302 | 302 | */ |
| 303 | - public function __invoke(array|string|null $groups = null, bool $throw = true): ?ConstraintViolationListInterface |
|
| 303 | + public function __invoke(array | string | null $groups = null, bool $throw = true): ?ConstraintViolationListInterface |
|
| 304 | 304 | { |
| 305 | 305 | return $this->validate($groups, $throw); |
| 306 | 306 | } |