private function addBrackets($text, $subPattern = null)
    {
        if ($text instanceof VerbalExpression) {
            return $text->compile();
        }

        return $this->generateOpeningBracket($subPattern) .  $text . ')';
    }
private function addBrackets($text, $subPattern = null)
    {
        if ($text instanceof VerbalExpression) {
            return $text->compile();
        }

        return $this->generateOpeningBracket($subPattern) .  $text . ')';
    }
private function addBrackets ( $ text , $ subPattern = null ) { if ( $ text instanceof VerbalExpression ) { return $ text -> compile ( ) ; } return $ this -> generateOpeningBracket ( $ subPattern ) . $ text . ')' ; }
Wrap string in brackets

@param string|VerbalExpression $text       Text to wrap
@param boolean                 $subPattern Use sub pattern capturing

@return string
Wrap string in brackets