| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 32 | protected function addGroupLimit(int $value): void |
|
| 24 | { |
||
| 25 | 32 | $grammar = $this->getEagerLimitGrammar(); |
|
| 26 | |||
| 27 | 32 | $sql = $grammar->compileFirstPathSegment( |
|
| 28 | 32 | $this->related->qualifyColumn( |
|
| 29 | 32 | $this->related->getPathName() |
|
| 30 | 32 | ) |
|
| 31 | 32 | ); |
|
| 32 | |||
| 33 | 32 | $column = new Expression($sql); |
|
| 34 | |||
| 35 | 32 | $this->query->groupLimit($value, $column); |
|
| 36 | |||
| 37 | 32 | $this->query->getQuery()->addBinding( |
|
| 38 | 32 | array_fill( |
|
| 39 | 32 | 0, |
|
| 40 | 32 | substr_count($sql, '?'), |
|
| 41 | 32 | $this->related->getPathSeparator() |
|
| 42 | 32 | ), |
|
| 43 | 32 | 'select' |
|
| 44 | 32 | ); |
|
| 75 |