Automattic\WooCommerce\Vendor\GraphQL\Utils
AST::isMissingVariable
Returns true if the provided valueNode is a variable which is not defined in the set of variables.
Method of the class: AST{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = AST::isMissingVariable( $valueNode, ?array $variables ): bool;
- $valueNode(ValueNode&Node) (required)
- .
- ?array $variables(required)
- .
AST::isMissingVariable() AST::isMissingVariable code WC 10.9.1
private static function isMissingVariable(ValueNode $valueNode, ?array $variables): bool
{
return $valueNode instanceof VariableNode
&& ($variables === null || ! array_key_exists($valueNode->name->value, $variables));
}