| Total Complexity | 6 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | trait DistinctableTrait |
||
| 13 | { |
||
| 14 | protected bool $isDistinct = false; |
||
| 15 | |||
| 16 | 2 | protected function parseDistinctClause(Parser $parser): void |
|
| 17 | { |
||
| 18 | 2 | $shouldUseLexer = DoctrineOrm::isPre219(); |
|
| 19 | 2 | $lexer = $parser->getLexer(); |
|
| 20 | |||
| 21 | 2 | if ($lexer->isNextToken($shouldUseLexer ? Lexer::T_DISTINCT : TokenType::T_DISTINCT)) { |
|
| 22 | 2 | $parser->match($shouldUseLexer ? Lexer::T_DISTINCT : TokenType::T_DISTINCT); |
|
| 23 | 2 | $this->isDistinct = true; |
|
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | 2 | protected function getOptionalDistinctClause(): string |
|
| 30 | } |
||
| 31 | } |
||
| 32 |