public function equals(Verb $verb): bool
    {
        if (!$this->id->equals($verb->id)) {
            return false;
        }

        if (null === $this->display && null === $verb->display) {
            return true;
        }

        if (null !== $this->display xor null !== $verb->display) {
            return false;
        }

        if (count($this->display) !== count($verb->getDisplay())) {
            return false;
        }

        foreach ($this->display as $language => $value) {
            if (!isset($verb->display[$language])) {
                return false;
            }

            if ($value !== $verb->display[$language]) {
                return false;
            }
        }

        return true;
    }
public function equals(Verb $verb): bool
    {
        if (!$this->id->equals($verb->id)) {
            return false;
        }

        if (null === $this->display && null === $verb->display) {
            return true;
        }

        if (null !== $this->display xor null !== $verb->display) {
            return false;
        }

        if (count($this->display) !== count($verb->getDisplay())) {
            return false;
        }

        foreach ($this->display as $language => $value) {
            if (!isset($verb->display[$language])) {
                return false;
            }

            if ($value !== $verb->display[$language]) {
                return false;
            }
        }

        return true;
    }
public function equals ( Verb $ verb ) : bool { if ( ! $ this -> id -> equals ( $ verb -> id ) ) { return false ; } if ( null === $ this -> display && null === $ verb -> display ) { return true ; } if ( null !== $ this -> display xor null !== $ verb -> display ) { return false ; } if ( count ( $ this -> display ) !== count ( $ verb -> getDisplay ( ) ) ) { return false ; } foreach ( $ this -> display as $ language => $ value ) { if ( ! isset ( $ verb -> display [ $ language ] ) ) { return false ; } if ( $ value !== $ verb -> display [ $ language ] ) { return false ; } } return true ; }
Checks if another verb is equal.

Two verbs are equal if and only if all of their properties are equal.
Checks if another verb is equal .