Verify equality with another object

@param object $o The object to compare.
@return boolean True if this object represents the same data, else False.

Compare the class and the ID field value of the 2 objects.
761156
public function equals($o) {
		return (get_class($this) == get_class($o) && $this->id() == $o->id());
	}
941361
public function equals($object)
    {
        if (!is_a($object, '\Slick\FileSystem\Node')) {
            return false;
        }

        $path = $this->details->getRealPath();

        return $path == $object->details->getRealPath();
    }
862154
private function keysAreEqual($a, $b): bool
    {
        if (is_object($a) && $a instanceof Hashable) {
            return get_class($a) === get_class($b) && $a->equals($b);
        }

        return $a === $b;
    }
822440
public function isEqual($other)
    {
        return !($other instanceof self) ?
            false :
            ($this->id === $other->id && $this->customerId === $other->customerId);
    }
1211700
@Override
    public int compare(Object o1, Object o2) {
        return (o1.hashCode() - o2.hashCode());
    }
128868
public function Equals($obj)
	{
		if ( ! $obj instanceof NotationValue )
		{
			return false;
		}

		/**
		 * @var NotationValue $other
		 */
		$other = $obj;
		return $this->LocalName == $other->LocalName && $this->NamespaceUri == $other->NamespaceUri;

	}
940042
public boolean compare(Object o) {
		if (!basicEquals(o))
			return false;

		QueryParameter that = (QueryParameter) o;

		// compare sources to have the same select no matter of letter-case and
		// white spaces
		if (!StringUtil.equalsText(source, that.source))
			return false;
		if (!StringUtil.equalsText(defaultSource, that.defaultSource))
			return false;

		return true;
	}
408259
public static function notequal($object, $value = null): bool
    {
        if (!Any::isLine($object)) {
            return false;
        }

        return $object !== $value;
    }
1329506
private function isValidObjectInstance($object)
    {
        if (!is_null($this->classname) && !$this->isInstanceOrSubclassOf($object)) {
            return false;
        }

        return true;
    }
841438
public static boolean isEqual(Object o1, Object o2) {
        return isEqual(str(o1), str(o2));
    }
1294187
public function equals($object): bool
    {
        if (get_class($object) !== get_class($this)) {
            return false;
        }

        return $this == $object;
    }
1060998
public function Equals( $obj )
	{
		if ( ! $obj instanceof GMonthValue )
		{
			return false;
		}

		/**
		 * @var DateTimeValueBase $other
		 */
		$other = $obj;
		return $this->ToString( null ) == $other->ToString( null );
	}
168990
public function Equals($obj)
	{
		if ( ! $obj instanceof NMTOKENSValue )
		{
			return false;
		}

		/**
		 * @var NMTOKENSValue $other
		 */
		$other = $obj;
		if ( count( $other->ValueList ) != count( $this->ValueList ) ) return false;
		// BMS 2018-03-21 This test is order independent but should be order dependent
		// return count( array_diff( $other->ValueList, $this->ValueList ) ) == 0;
		foreach ( $this->ValueList as $index => $token )
		{
			if ( $other->ValueList[ $index ] != $token ) return false;
		}
		return true;
	}
366795
public function equals($obj)
    {
        // TODO: optimize me with early outs
        if ($this === $obj) {
            return true;
        }

        if ((null === $obj) || !($obj instanceof AbstractCriterion)) {
            return false;
        }

        /** @var AbstractCriterion $crit */
        $crit = $obj;

        $isEquiv = (((null === $this->table && null === $crit->getTable())
            || (null !== $this->table && $this->table === $crit->getTable()))
            && $this->column === $crit->getColumn()
            && $this->comparison === $crit->getComparison())
        ;

        // check chained criterion

        $clausesLength = count($this->clauses);
        $isEquiv &= (count($crit->getClauses()) == $clausesLength);
        $critConjunctions = $crit->getConjunctions();
        $critClauses = $crit->getClauses();
        for ($i = 0; $i < $clausesLength && $isEquiv; $i++) {
            $isEquiv &= ($this->conjunctions[$i] === $critConjunctions[$i]);
            $isEquiv &= ($this->clauses[$i] === $critClauses[$i]);
        }

        if ($isEquiv) {
            $isEquiv &= $this->value === $crit->getValue();
        }

        return $isEquiv;
    }
104835
public function equals($object)
    {
        if (!is_object($object)) {
            return false;
        }

        if (!is_a($object, get_class($this))) {
            return false;
        }

        $props = array_keys(get_object_vars($this));
        $skip = array('_inspector', '___mocked', 'inspector');

        $equals = true;
        foreach ($props as $property) {
            if (in_array($property, $skip)) {
                continue;
            }
            $annotations = $this->inspector->getPropertyAnnotations($property);
            $property = str_replace('_', '', $property);
            
            if (!$annotations->hasAnnotation('@write')
                && $this->$property != $object->$property
            ) {
                return false;
            }

        }
        return $equals;
    }
880883
public function Equals( $obj )
	{
		if ( ! $obj instanceof DurationValue )
		{
			return false;
		}

		/**
		 * @var DurationValue $other
		 */
	    $other = $obj;

		if ( $other->getIsZero() && $this->getIsZero())
			return true;

		if ( $this->getType() != $other->getType() ) return false;

		return $this->ToString() == $other->ToString();
	}
645751
static function equals( $entity1, $entity2 ) {
			if ( is_null( $entity1 ) && is_null( $entity2 ) ) {
				return true;
			} else if ( is_object( $entity1 ) && is_object( $entity2 ) ) {
				return ( $entity1->id == $entity2->id );
			} else if ( is_object( $entity1 ) ) {
				return is_null( $entity1->id );
			} else {
				return is_null( $entity2->id );
			}
		}