mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 12:56:05 +03:00
Minor instanceof tweak
This commit is contained in:
parent
22e41a3729
commit
61245213c4
@ -135,7 +135,7 @@ class Values
|
||||
* runtime values of query variables.
|
||||
*
|
||||
* @param $value
|
||||
* @param Type $type
|
||||
* @param InputType $type
|
||||
* @return array
|
||||
*/
|
||||
private static function isValidPHPValue($value, InputType $type)
|
||||
@ -258,7 +258,11 @@ class Values
|
||||
return $obj;
|
||||
|
||||
}
|
||||
Utils::invariant($type instanceof ScalarType || $type instanceof EnumType, 'Must be input type');
|
||||
|
||||
if ($type instanceof LeafType) {
|
||||
return $type->parseValue($value);
|
||||
}
|
||||
|
||||
throw new InvariantViolation('Must be input type');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user