Automattic\WooCommerce\Vendor\GraphQL\Utils

Utils::assertValidNamepublic staticWC 1.0

Upholds the spec rules about naming.

Method of the class: Utils{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = Utils::assertValidName( $name ): void;
$name(string) (required)
.

Utils::assertValidName() code WC 10.8.1

public static function assertValidName(string $name): void
{
    $error = self::isValidNameError($name);
    if ($error !== null) {
        throw $error;
    }
}