Automattic\WooCommerce\Vendor\GraphQL\Utils
BreakingChangesFinder::typeKindName
Method of the class: BreakingChangesFinder{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = BreakingChangesFinder::typeKindName( $type ): string;
- $type(Type&NamedType) (required)
- .
BreakingChangesFinder::typeKindName() BreakingChangesFinder::typeKindName code WC 10.9.1
private static function typeKindName(NamedType $type): string
{
if ($type instanceof ScalarType) {
return 'a Scalar type';
}
if ($type instanceof ObjectType) {
return 'an Object type';
}
if ($type instanceof InterfaceType) {
return 'an Interface type';
}
if ($type instanceof UnionType) {
return 'a Union type';
}
if ($type instanceof EnumType) {
return 'an Enum type';
}
if ($type instanceof InputObjectType) {
return 'an Input type';
}
throw new \TypeError('Unknown type: ' . $type->name);
}