Automattic\WooCommerce\Vendor\GraphQL\Validator\Rules

NoUnusedVariables::unusedVariableMessagepublic staticWC 1.0

Method of the class: NoUnusedVariables{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = NoUnusedVariables::unusedVariableMessage( $varName, ?string $opName ): string;
$varName(string) (required)
.
?string $opName
.
Default: null

NoUnusedVariables::unusedVariableMessage() code WC 10.9.1

public static function unusedVariableMessage(string $varName, ?string $opName = null): string
{
    return $opName !== null
        ? "Variable \"\${$varName}\" is never used in operation \"{$opName}\"."
        : "Variable \"\${$varName}\" is never used.";
}