src/Interval.php
public static function toComparable($boundary)
    {
        $isInternallyType = \is_numeric($boundary) || \is_bool($boundary) || \is_string($boundary);

        $comparable = null;
        if ($isInternallyType) {
            $comparable = $boundary;
        } elseif ($boundary instanceof \DateTimeInterface) {
            $comparable = $boundary->getTimestamp();
        } else {
            throw new \UnexpectedValueException('Unexpected boundary type');
        }

        return $comparable;
    }
public static function toComparable($boundary)
    {
        $isInternallyType = \is_numeric($boundary) || \is_bool($boundary) || \is_string($boundary);

        $comparable = null;
        if ($isInternallyType) {
            $comparable = $boundary;
        } elseif ($boundary instanceof \DateTimeInterface) {
            $comparable = $boundary->getTimestamp();
        } else {
            throw new \UnexpectedValueException('Unexpected boundary type');
        }

        return $comparable;
    }
public static function toComparable ( $ boundary ) { $ isInternallyType = \ is_numeric ( $ boundary ) || \ is_bool ( $ boundary ) || \ is_string ( $ boundary ) ; $ comparable = null ; if ( $ isInternallyType ) { $ comparable = $ boundary ; } elseif ( $ boundary instanceof \ DateTimeInterface ) { $ comparable = $ boundary -> getTimestamp ( ) ; } else { throw new \ UnexpectedValueException ( 'Unexpected boundary type' ) ; } return $ comparable ; }
Convert an boundary to comparable
@param mixed $boundary
@return mixed
@throws \UnexpectedValueException
Convert an boundary to comparable