protected function makeComparable($value, $parameter)
    {

        if (!$value instanceof DateTimeInterface && !$parameter instanceof DateTimeInterface) {
            return [$this->getSize($value), $parameter];
        }

        // One is datetime
        try {
            $value = $this->toTimestamp($value);
            $parameter = $this->toTimestamp($parameter);
            return [$value, $parameter];
        } catch (InvalidArgumentException $e) {
            return [];
        }

    }
protected function makeComparable($value, $parameter)
    {

        if (!$value instanceof DateTimeInterface && !$parameter instanceof DateTimeInterface) {
            return [$this->getSize($value), $parameter];
        }

        // One is datetime
        try {
            $value = $this->toTimestamp($value);
            $parameter = $this->toTimestamp($parameter);
            return [$value, $parameter];
        } catch (InvalidArgumentException $e) {
            return [];
        }

    }
protected function makeComparable ( $ value , $ parameter ) { if ( ! $ value instanceof DateTimeInterface && ! $ parameter instanceof DateTimeInterface ) { return [ $ this -> getSize ( $ value ) , $ parameter ] ; } // One is datetime try { $ value = $ this -> toTimestamp ( $ value ) ; $ parameter = $ this -> toTimestamp ( $ parameter ) ; return [ $ value , $ parameter ] ; } catch ( InvalidArgumentException $ e ) { return [ ] ; } }
Make two values comparable by normal operators.

@param $value
@param $parameter

@return array
Make two values comparable by normal operators .