Automattic\WooCommerce\Vendor\GraphQL\Type\Definition
Type::getNamedType
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() 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;
}