Automattic\WooCommerce\Vendor\GraphQL\Utils

TypeComparators::areSameBuiltInScalarprivate staticWC 1.0

Built-in scalars may exist as different instances when a type loader overrides them. Compare by name to handle this case.

Method of the class: TypeComparators{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = TypeComparators::areSameBuiltInScalar( $typeA, $typeB ): bool;
$typeA(Type) (required)
.
$typeB(Type) (required)
.

TypeComparators::areSameBuiltInScalar() code WC 10.9.1

private static function areSameBuiltInScalar(Type $typeA, Type $typeB): bool
{
    return Type::isBuiltInScalar($typeA)
        && Type::isBuiltInScalar($typeB)
        && $typeA->name() === $typeB->name();
}