src/SDL/Reflection/Validation/Definitions/ArgumentValidator.php 1 location
|
@@ 40-43 (lines=4) @@
|
| 37 |
|
{ |
| 38 |
|
$definition = $type->getTypeDefinition(); |
| 39 |
|
|
| 40 |
|
if (! ($definition instanceof Inputable)) { |
| 41 |
|
$error = \sprintf('%s must be type of Scalar, Enum or Input', $type); |
| 42 |
|
throw new TypeConflictException($error, $this->getCallStack()); |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
if ($type->hasDefaultValue()) { |
| 46 |
|
$this->validateDefaultValue($type, $definition); |
src/SDL/Reflection/Validation/Definitions/PassedArgumentsValidator.php 1 location
|
@@ 74-77 (lines=4) @@
|
| 71 |
|
|
| 72 |
|
$this->getCallStack()->push($type); |
| 73 |
|
|
| 74 |
|
if (! ($type instanceof Inputable)) { |
| 75 |
|
$error = \sprintf('%s must be type of Scalar, Enum or Input', $type); |
| 76 |
|
throw new TypeConflictException($error, $this->getCallStack()); |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
if ($argument->isList()) { |
| 80 |
|
$this->validateListArguments($argument, $type, $value); |