@@ -113,7 +113,7 @@ |
||
| 113 | 113 | )); |
| 114 | 114 | } |
| 115 | 115 | $stack[] = new Token(Token::LITERAL, $value, $variable); |
| 116 | - } elseif (Token::FUNCTION === $token->getType()) { |
|
| 116 | + } elseif (Token::function === $token->getType()) { |
|
| 117 | 117 | if (! array_key_exists($token->getValue(), $this->functions)) { |
| 118 | 118 | throw new UnknownFunctionException(sprintf( |
| 119 | 119 | 'Unknown function [%s]', |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | public const OPERATOR = 'operator'; |
| 62 | 62 | public const LEFT_PARENTHESIS = 'LP'; |
| 63 | 63 | public const RIGHT_PARENTHESIS = 'RP'; |
| 64 | - public const FUNCTION = 'function'; |
|
| 64 | + public const function = 'function'; |
|
| 65 | 65 | public const PARAM_SEPARATOR = 'PS'; |
| 66 | 66 | public const STRING = 'string'; |
| 67 | 67 | public const SPACE = 'space'; |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | continue 2; |
| 192 | 192 | |
| 193 | 193 | case $ch === '[': |
| 194 | - $this->tokens[] = new Token(Token::FUNCTION, 'array'); |
|
| 194 | + $this->tokens[] = new Token(Token::function, 'array'); |
|
| 195 | 195 | $this->allowNegative = true; |
| 196 | 196 | $this->tokens[] = new Token(Token::LEFT_PARENTHESIS, ''); |
| 197 | 197 | |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | |
| 251 | 251 | case $this->isLeftParenthesis($ch): |
| 252 | 252 | if ($this->stringBuffer != '') { |
| 253 | - $this->tokens[] = new Token(Token::FUNCTION, $this->stringBuffer); |
|
| 253 | + $this->tokens[] = new Token(Token::function, $this->stringBuffer); |
|
| 254 | 254 | $this->stringBuffer = ''; |
| 255 | 255 | } elseif (strlen($this->numberBuffer) > 0) { |
| 256 | 256 | $this->emptyNumberBufferAsLiteral(); |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | |
| 345 | 345 | break; |
| 346 | 346 | |
| 347 | - case Token::FUNCTION: |
|
| 347 | + case Token::function: |
|
| 348 | 348 | if ($paramCounter->count() > 0 && $paramCounter->top() === 0) { |
| 349 | 349 | $paramCounter->push($paramCounter->pop() + 1); |
| 350 | 350 | } |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | throw new IncorrectBracketsException('Incorrect brackets'); |
| 408 | 408 | } |
| 409 | 409 | } |
| 410 | - if ($stack->count() > 0 && Token::FUNCTION === $stack->top()->getType()) { |
|
| 410 | + if ($stack->count() > 0 && Token::function === $stack->top()->getType()) { |
|
| 411 | 411 | /** @var Token $funcToken */ |
| 412 | 412 | $funcToken = $stack->pop(); |
| 413 | 413 | $funcToken->setParamCount($paramCounter->pop()); |