Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
28 | public function walkSelectClause($selectClause): string |
||
29 | { |
||
30 | $sql = parent::walkSelectClause($selectClause); |
||
31 | |||
32 | if ($this->getQuery()->getHint('mysqlWalker.sqlCalcFoundRows') === true) { |
||
33 | if ($selectClause->isDistinct) { |
||
34 | $sql = str_replace('SELECT DISTINCT', 'SELECT DISTINCT SQL_CALC_FOUND_ROWS', $sql); |
||
35 | } else { |
||
36 | $sql = str_replace('SELECT', 'SELECT SQL_CALC_FOUND_ROWS', $sql); |
||
37 | } |
||
38 | } |
||
39 | |||
40 | return $sql; |
||
41 | } |
||
43 |