Automattic\WooCommerce\Vendor\GraphQL\Type\Definition

Type::getNamedType │ public static │ WC 1.0

Returns the underlying named type of the given type.

Method of the class: Type{}

No Hooks.

Returns

(Type&NamedType)|null.

Usage

$result = Type::getNamedType( ?Type $type ): ?Type;
?Type $type(required)
.

Type::getNamedType() code WC 11.1.2

public static function getNamedType(?Type $type): ?Type
{
    if ($type instanceof WrappingType) {
        return $type->getInnermostType();
    }

    assert($type === null || $type instanceof NamedType, 'only other option');

    return $type;
}