src/Entity/EntityReference.php
public function equals( $reference ) {
        if ( !( $reference instanceof EntityReference ) ) {
            return false;
        }

        if ( strcasecmp( $this->entityLogicalName, $reference->entityLogicalName ) !== 0 ) {
            return false;
        }

        if ( $this->getID() !== $reference->getID() ) {
            return false;
        }

        return true;
    }
public function equals( $reference ) {
        if ( !( $reference instanceof EntityReference ) ) {
            return false;
        }

        if ( strcasecmp( $this->entityLogicalName, $reference->entityLogicalName ) !== 0 ) {
            return false;
        }

        if ( $this->getID() !== $reference->getID() ) {
            return false;
        }

        return true;
    }
public function equals ( $ reference ) { if ( ! ( $ reference instanceof EntityReference ) ) { return false ; } if ( strcasecmp ( $ this -> entityLogicalName , $ reference -> entityLogicalName ) !== 0 ) { return false ; } if ( $ this -> getID ( ) !== $ reference -> getID ( ) ) { return false ; } return true ; }
Determines whether two entity references are equal.

@param mixed $reference

@return bool
Determines whether two entity references are equal .