@@ -78,7 +78,8 @@ |
||
| 78 | 78 | * @param TokenMap $tokenMap |
| 79 | 79 | * @return \Traversable <string> |
| 80 | 80 | */ |
| 81 | - public function getTokenStream($conditionString, TokenMap $tokenMap) { |
|
| 81 | + public function getTokenStream($conditionString, TokenMap $tokenMap) |
|
| 82 | + { |
|
| 82 | 83 | return $this->getTokenStreamWithRegex($conditionString, $this->buildRegex($tokenMap)); |
| 83 | 84 | } |
| 84 | 85 | |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | /** @return bool */ |
| 15 | 15 | function execute() |
| 16 | 16 | { |
| 17 | - return ! $this->containedOperand->execute(); |
|
| 17 | + return !$this->containedOperand->execute(); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -16,6 +16,6 @@ |
||
| 16 | 16 | |
| 17 | 17 | public function __toString() |
| 18 | 18 | { |
| 19 | - return (string)$this->token; |
|
| 19 | + return (string) $this->token; |
|
| 20 | 20 | } |
| 21 | 21 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | $this->tokenParser->parseToken($token, $value, $operandStack, $operatorStack, $tokenMap); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - while (! $operatorStack->isEmpty()) { |
|
| 36 | + while (!$operatorStack->isEmpty()) { |
|
| 37 | 37 | $this->tokenParser->pushOperand($operandStack, $operatorStack, $tokenMap); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | protected function registerToken($name, $regex, $class) |
| 90 | 90 | { |
| 91 | - if (! is_string($name)) { |
|
| 91 | + if (!is_string($name)) { |
|
| 92 | 92 | throw new TokenMapException('Can\'t register token, name must be string'); |
| 93 | 93 | } |
| 94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | )); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - if (! is_subclass_of($class, OperandInterface::class)) { |
|
| 102 | + if (!is_subclass_of($class, OperandInterface::class)) { |
|
| 103 | 103 | throw new TokenMapException(sprintf( |
| 104 | 104 | 'Token <%s> with class <%s> must implement OperandInterface', $name, $class |
| 105 | 105 | )); |
@@ -27,13 +27,13 @@ |
||
| 27 | 27 | ) { |
| 28 | 28 | $operatorStack->push($lexerToken); |
| 29 | 29 | } elseif ($lexerToken->isToken(TokenMap::TOKEN_BRACKET_CLOSE)) { |
| 30 | - while (! $operatorStack->top()->isToken(TokenMap::TOKEN_BRACKET_OPEN)) { |
|
| 30 | + while (!$operatorStack->top()->isToken(TokenMap::TOKEN_BRACKET_OPEN)) { |
|
| 31 | 31 | $this->pushOperand($operandStack, $operatorStack, $tokenMap); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $operatorStack->pop(); |
| 35 | 35 | } else { |
| 36 | - while (! $operatorStack->isEmpty() && $tokenMap->compareOperatorPrecedence($lexerToken, $operatorStack->top()) <= 0) { |
|
| 36 | + while (!$operatorStack->isEmpty() && $tokenMap->compareOperatorPrecedence($lexerToken, $operatorStack->top()) <= 0) { |
|
| 37 | 37 | $this->pushOperand($operandStack, $operatorStack, $tokenMap); |
| 38 | 38 | } |
| 39 | 39 | |