src/Parser/IntervalParser.php
private function parseEndTerm(string $endTerm)
    {
        if ('' === $endTerm) {
            throw new \ErrorException('Parse interval expression');
        }

        $endInclusion = \substr($endTerm, -1);

        if (!\in_array($endInclusion, [self::LEFT, self::RIGHT], true)) {
            throw new \ErrorException('Parse interval expression');
        }

        $isOpen       = $endInclusion === self::RIGHT;
        $endValue     = \substr($endTerm, 0, -1);
        return $this->parseValue($endValue, false, $isOpen);
    }
private function parseEndTerm(string $endTerm)
    {
        if ('' === $endTerm) {
            throw new \ErrorException('Parse interval expression');
        }

        $endInclusion = \substr($endTerm, -1);

        if (!\in_array($endInclusion, [self::LEFT, self::RIGHT], true)) {
            throw new \ErrorException('Parse interval expression');
        }

        $isOpen       = $endInclusion === self::RIGHT;
        $endValue     = \substr($endTerm, 0, -1);
        return $this->parseValue($endValue, false, $isOpen);
    }
private function parseEndTerm ( string $ endTerm ) { if ( '' === $ endTerm ) { throw new \ ErrorException ( 'Parse interval expression' ) ; } $ endInclusion = \ substr ( $ endTerm , - 1 ) ; if ( ! \ in_array ( $ endInclusion , [ self :: LEFT , self :: RIGHT ] , true ) ) { throw new \ ErrorException ( 'Parse interval expression' ) ; } $ isOpen = $ endInclusion === self :: RIGHT ; $ endValue = \ substr ( $ endTerm , 0 , - 1 ) ; return $ this -> parseValue ( $ endValue , false , $ isOpen ) ; }
Pareses the end term
@param string $endTerm
@return float|int|string
@throws \InvalidArgumentException
@throws \ErrorException
Pareses the end term