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

        $startInclusion = $startTerm[0];

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

        $isOpen         = $startInclusion === self::LEFT;
        $startValue     = \substr($startTerm, 1);
        return $this->parseValue($startValue, true, $isOpen);
    }
private function parseStartTerm(string $startTerm)
    {
        if ('' === $startTerm) {
            throw new \ErrorException('Parse interval expression');
        }

        $startInclusion = $startTerm[0];

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

        $isOpen         = $startInclusion === self::LEFT;
        $startValue     = \substr($startTerm, 1);
        return $this->parseValue($startValue, true, $isOpen);
    }
private function parseStartTerm ( string $ startTerm ) { if ( '' === $ startTerm ) { throw new \ ErrorException ( 'Parse interval expression' ) ; } $ startInclusion = $ startTerm [ 0 ] ; if ( ! \ in_array ( $ startInclusion , [ self :: LEFT , self :: RIGHT ] , true ) ) { throw new \ ErrorException ( 'Parse interval expression' ) ; } $ isOpen = $ startInclusion === self :: LEFT ; $ startValue = \ substr ( $ startTerm , 1 ) ; return $ this -> parseValue ( $ startValue , true , $ isOpen ) ; }
Parses the start term
@param string $startTerm
@return float|int|string
@throws \InvalidArgumentException
@throws \ErrorException
Parses the start term