Automattic\WooCommerce\Vendor\GraphQL\Utils
TypeComparators::areSameBuiltInScalar
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;
TypeComparators::areSameBuiltInScalar() 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();
}