Automattic\WooCommerce\Vendor\GraphQL\Validator\Rules

VariablesInAllowedPosition::badVarPosMessagepublic staticWC 1.0

A var type is allowed if it is the same or more strict than the expected type. It can be more strict if the variable type is non-null when the expected type is nullable. If both are list types, the variable item type can be more strict than the expected item type.

Method of the class: VariablesInAllowedPosition{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = VariablesInAllowedPosition::badVarPosMessage( $varName, $varType, $expectedType ): string;
$varName(string) (required)
.
$varType(string) (required)
.
$expectedType(string) (required)
.

VariablesInAllowedPosition::badVarPosMessage() code WC 10.9.1

public static function badVarPosMessage(string $varName, string $varType, string $expectedType): string
{
    return "Variable \"\${$varName}\" of type \"{$varType}\" used in position expecting type \"{$expectedType}\".";
}