| Conditions | 4 |
| Paths | 8 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 58 | 159 | protected function buildLimit() |
|
| 59 | { |
||
| 60 | 159 | $clause = ''; |
|
| 61 | |||
| 62 | 159 | $limit = $this->getLimit(); |
|
| 63 | 159 | if (!empty($limit)) { |
|
| 64 | 15 | $clause .= "LIMIT {$limit}"; |
|
| 65 | 15 | } |
|
| 66 | |||
| 67 | 159 | if (!empty($this->offset)) { |
|
| 68 | 10 | $clause .= " OFFSET {$this->offset}"; |
|
| 69 | 10 | } |
|
| 70 | |||
| 71 | 159 | if (!empty($clause)) { |
|
| 72 | 15 | $clause = PHP_EOL . trim($clause); |
|
| 73 | 15 | } |
|
| 74 | |||
| 75 | 159 | return $clause; |
|
| 76 | } |
||
| 77 | } |
||
| 78 |