src/Helpers/TypeEqualityHelperMethods.php
final private function isSameObjectAs(Type $type, int $flags = null): bool
    {
        if ($flags & TypeEquality::IGNORE_OBJECT_IDENTITY) {
            return true;
        }

        return (spl_object_hash($this) === spl_object_hash($type)) ? true : false;
    }
final private function isSameObjectAs(Type $type, int $flags = null): bool
    {
        if ($flags & TypeEquality::IGNORE_OBJECT_IDENTITY) {
            return true;
        }

        return (spl_object_hash($this) === spl_object_hash($type)) ? true : false;
    }
final private function isSameObjectAs ( Type $ type , int $ flags = null ) : bool { if ( $ flags & TypeEquality :: IGNORE_OBJECT_IDENTITY ) { return true ; } return ( spl_object_hash ( $ this ) === spl_object_hash ( $ type ) ) ? true : false ; }
Check against an objects ID

Makes a comparison against an objects identity, obtained through the use
of spl_object_hash. Method returns true if both objects point to the
same PHP reference. Note that this method also returns true when the $flag
is set to ignore this type of check.

@param Type $type - the object to check against
@param int|null $flags - optional flags enable or disable certain checks
@return bool - Returns true if identities are equal
Check against an objects ID