final public function compareTo(ComparableInterface $other)
    {
        if (false === ($other instanceof self)) {
            throw new ClassCastException(
                'The specified object\'s type is not an instance of '
                . __CLASS__ . '.'
            );
        }

        if (false === ($this instanceof $other)) {
            throw new ClassCastException(
                'The specified object\'s type is not an instance of '
                . \get_class($this) . '.'
            );
        }

        return ($this->ordinal - $other->ordinal);
    }
final public function compareTo(ComparableInterface $other)
    {
        if (false === ($other instanceof self)) {
            throw new ClassCastException(
                'The specified object\'s type is not an instance of '
                . __CLASS__ . '.'
            );
        }

        if (false === ($this instanceof $other)) {
            throw new ClassCastException(
                'The specified object\'s type is not an instance of '
                . \get_class($this) . '.'
            );
        }

        return ($this->ordinal - $other->ordinal);
    }
final public function compareTo ( ComparableInterface $ other ) { if ( false === ( $ other instanceof self ) ) { throw new ClassCastException ( 'The specified object\'s type is not an instance of ' . __CLASS__ . '.' ) ; } if ( false === ( $ this instanceof $ other ) ) { throw new ClassCastException ( 'The specified object\'s type is not an instance of ' . \ get_class ( $ this ) . '.' ) ; } return ( $ this -> ordinal - $ other -> ordinal ) ; }
Compares this enumeration constant with the specified enumeration
constant for order.

Enumeration constants are only comparable to other enumeration constants
of the same enumeration type. The natural order implemented by this
method is the order in which the enumeration constants are declared.

@param ComparableInterface $other The other enumeration constant to
compare this enumeration constant to.

@return integer A negative integer, zero, or a positive integer as this
enumeration constant is less than, equal to, or greater
than the specified enumeration constant.
@throws ClassCastException If `$other` is not an enumeration type.
@throws ClassCastException If `$other` is not an enumeration constant of
the same enumeration type.
Compares this enumeration constant with the specified enumeration constant for order .