Automattic\WooCommerce\Vendor\GraphQL\Utils

BreakingChangesFinder::typeKindNameprivate staticWC 1.0

Метод класса: BreakingChangesFinder{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = BreakingChangesFinder::typeKindName( $type ): string;
$type(Type&NamedType) (обязательный)
.

Код BreakingChangesFinder::typeKindName() WC 11.0.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);
}