@param \AlgoWeb\PODataLaravel\Models\ObjectMap\Entities\Associations\AssociationStubBase $otherStub

@return bool
763411
public function isCompatible(AssociationStubBase $otherStub)
    {
        if (!parent::isCompatible($otherStub)) {
            return false;
        }
        $isNull = null == $this->getThroughField();
        $otherNull = null == $otherStub->getThroughField();

        if ($isNull != $otherNull) {
            return false;
        }

        return ($this->getTargType() === $otherStub->getBaseType())
               && ($this->getBaseType() === $otherStub->getTargType())
               && ($this->getForeignField() === $otherStub->getKeyField())
               && ($this->getKeyField() === $otherStub->getForeignField());
    }
855036
private function isSameAmount(Money $other)
    {
        return bccomp($this->getAmountString(), $other->getAmountString(), self::GAAP_PRECISION) === 0;
    }
781666
public function other()
    {
        if ($this->other_localizations === null) {
            $this->other_localizations = $this->item->otherLocalizations()->get();
        }

        return $this->other_localizations;
    }
697867
public function zipLeft($other)
    {
        if (count($other) !== count($this)) {
            throw new \InvalidArgumentException(
                'Both left and right must have same size.'
            );
        }

        if (is_array($other)) {
            return new Seq(
                array_map(
                    function ($a, $b) {
                        return new Tuple([$a, $b]);
                    },
                    $other,
                    $this->data
                )
            );
        }

        if ($other instanceof Seq) {
            return $other->zip($this->data);
        }

        throw new \InvalidArgumentException('`$other` must be `Seq` or `array`');
    }
658839
public function relatedToOne(
        string $otherClass,
        array $fieldsMap,
        bool $applySetters = false
    ) {
        //@TODO remove duplicated code

        $thisValues = array_intersect_key($this->data, $fieldsMap);

        $filterFn = function (Query $query) use (&$thisValues, &$fieldsMap) {
            $query->where(function (WhereClause $where) use (&$query, &$thisValues, &$fieldsMap) {
                foreach ($fieldsMap as $thisKey => $thatKey) {
                    $where->and($thatKey, '=', '?');
                    $query->bind($thisValues[$thisKey]);
                }
            });

            $query->limit(1);
        };

        /* @var $otherClass Model */
        $search = $otherClass::find($filterFn, $applySetters);

        return !(empty($search)) ? $search[0] : null;
    }
1004307
private function isPrefixOf($original, $other)
    {
        $original = $this->splitName($original);
        $other = $this->splitName($other);

        if (count($other) < count($original)) {
            return false;
        }

        foreach ($original as $i => $segment) {
            if ($segment !== $other[$i]) {
                return false;
            }
        }

        return true;
    }
38454
protected function matches($other): bool
    {
        if (!(is_array($other) || $other instanceof ArrayAccess)) {
            return false;
        }
        return (array_key_exists($this->key, $other) && ($other[$this->key] === $this->value));
    }
11494
public function compareTo($other): bool {
        if(!($other instanceof $this)) {
            return FALSE;
        }
        if($this->getHost() !== $other->getHost()) {
            return FALSE;
        }
        if($this->getPort() !== $other->getPort()) {
            return FALSE;
        }
        return TRUE;
    }
400996
public function add(self $other): self
    {
        return self::from($this->value + $other->value);
    }
408455
function equals( $other ) {
		if( ! ( $other instanceof Address ) ) {
			return false;
		}
		return $this === $other
			|| $this->asString() === $other->asString();
	}
202116
public function equals(self $other) : bool
    {
        if ($other === $this) {
            return true;
        }
        
        return $other->from->equals($this->from) && $other->until->equals($this->until);
    }
1330110
public function isSame(Index $other, $renamedColumns = null)
    {
        if ($renamedColumns) {
            $columns = [];
            foreach ($this->columns as $col) {
                $columns[] = isset($renamedColumns[$col]) ? $renamedColumns[$col]->name : $col;
            }
        } else {
            $columns = $this->columns;
        }
        if ($columns != $other->columns) {
            return false;
        }
        if ($this->name == self::PRIMARY || $other->name == self::PRIMARY) {
            return $this->name == $other->name;
        } else {
            return $this->type == $other->type;
        }
    }
393142
public function isFollowedByAtMidnight(DateTimeInterval $other): bool
	{
		$left = clone $other->getLeft()->getValue();

		return (
			Utils::isSameDate($this->getRight()->getValue(), $left->modify('-1 day'))
			&& $this->getRight()->getValue()->format('H:i:s') === '23:59:59'
			&& $other->getLeft()->getValue()->format('H:i:s') === '00:00:00'
		);
	}
395958
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof VariableNode)) {
            return false;
        }

        return $this->getName() == $other->getName();
    }
53845
public function equals(ColumnDefaultValue $other)
    {
        if ($this->getType() != $other->getType()) {
            return false;
        }
        if ($this == $other) {
            return true;
        }
        // special case for current timestamp
        $equivalents = array('CURRENT_TIMESTAMP', 'NOW()');
        if (in_array(strtoupper($this->getValue()), $equivalents) && in_array(strtoupper($other->getValue()), $equivalents)) {
            return true;
        }

        return false; // Can't help, they are different
    }
836976
protected function additionalFailureDescription($other): string
    {
        $failureDescription = '';
        foreach ($this->sectionFailures as $sectionIdentifier => $sectionFailure) {
            $failureDescription .= '* Section "' . $sectionIdentifier . '": ' . $sectionFailure . LF;
        }
        return $failureDescription;
    }
164295
protected function valueEquals($other_value)
    {
        if (!$other_value instanceof EntityList) {
            return false;
        }

        $entities = $this->getValue();

        if (count($entities) !== count($other_value)) {
            return false;
        }

        foreach ($entities as $index => $entity) {
            if (!$entity->isEqualTo($other_value->getItem($index))) {
                return false;
            }
        }

        return true;
    }