src/Parser/DateLexer/PregCollection.php
protected function compileExpressions()
    {
        if (count($this->expressions) === 0) {
            throw new BadMethodCallException('Can\'t compile an empty expression');
        }
        if (count($this->expressions) === 1) {
            return reset($this->expressions);
        }

        $parts = [];

        foreach ($this->expressions as $expr) {
            $expr = '(?:' . $expr . ')';

            $parts[] = $expr;
        }

        return '(?:' . implode('|', $parts) . ')';
    }
protected function compileExpressions()
    {
        if (count($this->expressions) === 0) {
            throw new BadMethodCallException('Can\'t compile an empty expression');
        }
        if (count($this->expressions) === 1) {
            return reset($this->expressions);
        }

        $parts = [];

        foreach ($this->expressions as $expr) {
            $expr = '(?:' . $expr . ')';

            $parts[] = $expr;
        }

        return '(?:' . implode('|', $parts) . ')';
    }
protected function compileExpressions ( ) { if ( count ( $ this -> expressions ) === 0 ) { throw new BadMethodCallException ( 'Can\'t compile an empty expression' ) ; } if ( count ( $ this -> expressions ) === 1 ) { return reset ( $ this -> expressions ) ; } $ parts = [ ] ; foreach ( $ this -> expressions as $ expr ) { $ expr = '(?:' . $ expr . ')' ; $ parts [ ] = $ expr ; } return '(?:' . implode ( '|' , $ parts ) . ')' ; }
Compile expression list.

@return string
Compile expression list .