WooCommerce Code Reference

TypeComparators
in package

Table of Contents

isEqualType()  : bool
Provided two types, return true if the types are equal (invariant).
isTypeSubTypeOf()  : bool
Provided a type and a super type, return true if the first type is either equal or a subset of the second super type (covariant).
areSameBuiltInScalar()  : bool
Built-in scalars may exist as different instances when a type loader overrides them. Compare by name to handle this case.

Methods

areSameBuiltInScalar()

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

private static areSameBuiltInScalar(Type $typeA, Type $typeB) : bool
Parameters
$typeA : Type
$typeB : Type
Return values
bool