@@ -59,7 +59,7 @@ |
||
59 | 59 | return false; |
60 | 60 | } |
61 | 61 | else { |
62 | - $this->lastError = null; |
|
62 | + $this->lastError = null; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | return $this->getNullableType()->isValidValue($value); |
@@ -57,8 +57,7 @@ |
||
57 | 57 | if ($value === null) { |
58 | 58 | $this->lastError = sprintf('Field "%s" must not be NULL', $this->getName()); |
59 | 59 | return false; |
60 | - } |
|
61 | - else { |
|
60 | + } else { |
|
62 | 61 | $this->lastError = null; |
63 | 62 | } |
64 | 63 |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | { |
28 | 28 | /** @var AbstractObjectType $objectType */ |
29 | 29 | if (!(TypeService::isObjectType($objectType) || TypeService::isInputObjectType($objectType)) || !$objectType->hasField($ast->getName())) { |
30 | - $availableFieldNames = implode(', ', array_map(function (FieldInterface $field): string { |
|
30 | + $availableFieldNames = implode(', ', array_map(function (FieldInterface $field): string { |
|
31 | 31 | return sprintf('"%s"', $field->getName()); |
32 | - }, $objectType->getFields())); |
|
33 | - throw new ResolveException(sprintf('Field "%s" not found in type "%s". Available fields are: %s', $ast->getName(), $objectType->getNamedType()->getName(), $availableFieldNames), $ast->getLocation()); |
|
32 | + }, $objectType->getFields())); |
|
33 | + throw new ResolveException(sprintf('Field "%s" not found in type "%s". Available fields are: %s', $ast->getName(), $objectType->getNamedType()->getName(), $availableFieldNames), $ast->getLocation()); |
|
34 | 34 | } |
35 | 35 | } |
36 | 36 | |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | case TypeMap::KIND_INPUT_OBJECT: |
55 | 55 | case TypeMap::KIND_LIST: |
56 | 56 | if (!$argument->getType()->isValidValue($astArgument->getValue())) { |
57 | - $error = $argument->getType()->getLastError() ?: '(no details available)'; |
|
58 | - throw new ResolveException(sprintf('Not valid type for argument "%s" in query "%s": %s', $astArgument->getName(), $field->getName(), $error), $astArgument->getLocation()); |
|
57 | + $error = $argument->getType()->getLastError() ?: '(no details available)'; |
|
58 | + throw new ResolveException(sprintf('Not valid type for argument "%s" in query "%s": %s', $astArgument->getName(), $field->getName(), $error), $astArgument->getLocation()); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | break; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | /** @var AbstractObjectType $objectType */ |
29 | 29 | if (!(TypeService::isObjectType($objectType) || TypeService::isInputObjectType($objectType)) || !$objectType->hasField($ast->getName())) { |
30 | - $availableFieldNames = implode(', ', array_map(function (FieldInterface $field): string { |
|
30 | + $availableFieldNames = implode(', ', array_map(function(FieldInterface $field): string { |
|
31 | 31 | return sprintf('"%s"', $field->getName()); |
32 | 32 | }, $objectType->getFields())); |
33 | 33 | throw new ResolveException(sprintf('Field "%s" not found in type "%s". Available fields are: %s', $ast->getName(), $objectType->getNamedType()->getName(), $availableFieldNames), $ast->getLocation()); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | public function assertValidArguments(FieldInterface $field, AstFieldInterface $query, Request $request) |
38 | 38 | { |
39 | - $requiredArguments = array_filter($field->getArguments(), function (InputField $argument) { |
|
39 | + $requiredArguments = array_filter($field->getArguments(), function(InputField $argument) { |
|
40 | 40 | return $argument->getType()->getKind() === TypeMap::KIND_NON_NULL; |
41 | 41 | }); |
42 | 42 |