| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | abstract class BaseAggregateFunction extends BaseFunction |
||
| 21 | { |
||
| 22 | use OrderableTrait; |
||
| 23 | use DistinctableTrait; |
||
| 24 | |||
| 25 | 3 | public function parse(Parser $parser): void |
|
| 26 | { |
||
| 27 | 3 | $shouldUseLexer = DoctrineOrm::isPre219(); |
|
| 28 | |||
| 29 | 3 | $this->customizeFunction(); |
|
| 30 | |||
| 31 | 3 | $parser->match($shouldUseLexer ? Lexer::T_IDENTIFIER : TokenType::T_IDENTIFIER); |
|
|
|
|||
| 32 | 3 | $parser->match($shouldUseLexer ? Lexer::T_OPEN_PARENTHESIS : TokenType::T_OPEN_PARENTHESIS); |
|
| 33 | |||
| 34 | 3 | $this->parseDistinctClause($parser); |
|
| 35 | 3 | $this->expression = $parser->StringPrimary(); |
|
| 36 | |||
| 37 | 3 | $this->parseOrderByClause($parser); |
|
| 38 | |||
| 39 | 3 | $parser->match($shouldUseLexer ? Lexer::T_CLOSE_PARENTHESIS : TokenType::T_CLOSE_PARENTHESIS); |
|
| 40 | } |
||
| 41 | |||
| 42 | 3 | public function getSql(SqlWalker $sqlWalker): string |
|
| 51 | } |
||
| 52 | } |
||
| 53 |