private function validateIsOrdered($method)
    {
        $innerIterator = $this->elements;
        if (!($innerIterator instanceof Iterators\IOrderedIterator)) {
            throw new PinqException(
                    'Invalid call to %s: %s::%s must be called first.',
                    $method,
                    __CLASS__,
                    'orderBy');
        }

        return $innerIterator;
    }
private function validateIsOrdered($method)
    {
        $innerIterator = $this->elements;
        if (!($innerIterator instanceof Iterators\IOrderedIterator)) {
            throw new PinqException(
                    'Invalid call to %s: %s::%s must be called first.',
                    $method,
                    __CLASS__,
                    'orderBy');
        }

        return $innerIterator;
    }
private function validateIsOrdered ( $ method ) { $ innerIterator = $ this -> elements ; if ( ! ( $ innerIterator instanceof Iterators \ IOrderedIterator ) ) { throw new PinqException ( 'Invalid call to %s: %s::%s must be called first.' , $ method , __CLASS__ , 'orderBy' ) ; } return $ innerIterator ; }
Verifies that the traversable is ordered.

@param string $method The called method name

@return Iterators\IOrderedIterator
@throws PinqException
Verifies that the traversable is ordered .