public function equals(Definition $definition): bool
    {
        if (get_class($this) !== get_class($definition)) {
            return false;
        }

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

        if (null !== $this->type && null !== $definition->type && !$this->type->equals($definition->type)) {
            return false;
        }

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

        if (null !== $this->moreInfo && null !== $definition->moreInfo && !$this->moreInfo->equals($definition->moreInfo)) {
            return false;
        }

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

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

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

        if (null !== $this->name) {
            if (count($this->name) !== count($definition->name)) {
                return false;
            }

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

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

        if (null !== $this->description) {
            if (count($this->description) !== count($definition->description)) {
                return false;
            }

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

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

        if (null !== $this->extensions && null !== $definition->extensions && !$this->extensions->equals($definition->extensions)) {
            return false;
        }

        return true;
    }
public function equals(Definition $definition): bool
    {
        if (get_class($this) !== get_class($definition)) {
            return false;
        }

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

        if (null !== $this->type && null !== $definition->type && !$this->type->equals($definition->type)) {
            return false;
        }

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

        if (null !== $this->moreInfo && null !== $definition->moreInfo && !$this->moreInfo->equals($definition->moreInfo)) {
            return false;
        }

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

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

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

        if (null !== $this->name) {
            if (count($this->name) !== count($definition->name)) {
                return false;
            }

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

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

        if (null !== $this->description) {
            if (count($this->description) !== count($definition->description)) {
                return false;
            }

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

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

        if (null !== $this->extensions && null !== $definition->extensions && !$this->extensions->equals($definition->extensions)) {
            return false;
        }

        return true;
    }
public function equals ( Definition $ definition ) : bool { if ( get_class ( $ this ) !== get_class ( $ definition ) ) { return false ; } if ( null !== $ this -> type xor null !== $ definition -> type ) { return false ; } if ( null !== $ this -> type && null !== $ definition -> type && ! $ this -> type -> equals ( $ definition -> type ) ) { return false ; } if ( null !== $ this -> moreInfo xor null !== $ definition -> moreInfo ) { return false ; } if ( null !== $ this -> moreInfo && null !== $ definition -> moreInfo && ! $ this -> moreInfo -> equals ( $ definition -> moreInfo ) ) { return false ; } if ( null !== $ this -> extensions xor null !== $ definition -> extensions ) { return false ; } if ( null !== $ this -> name xor null !== $ definition -> name ) { return false ; } if ( null !== $ this -> description xor null !== $ definition -> description ) { return false ; } if ( null !== $ this -> name ) { if ( count ( $ this -> name ) !== count ( $ definition -> name ) ) { return false ; } foreach ( $ this -> name as $ language => $ value ) { if ( ! isset ( $ definition -> name [ $ language ] ) ) { return false ; } if ( $ value !== $ definition -> name [ $ language ] ) { return false ; } } } if ( null !== $ this -> description ) { if ( count ( $ this -> description ) !== count ( $ definition -> description ) ) { return false ; } foreach ( $ this -> description as $ language => $ value ) { if ( ! isset ( $ definition -> description [ $ language ] ) ) { return false ; } if ( $ value !== $ definition -> description [ $ language ] ) { return false ; } } } if ( null !== $ this -> extensions && null !== $ definition -> extensions && ! $ this -> extensions -> equals ( $ definition -> extensions ) ) { return false ; } return true ; }
Checks if another definition is equal.

Two definitions are equal if and only if all of their properties are equal.
Checks if another definition is equal .