Conditions | 4 |
Paths | 8 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
83 | 16 | public function build(): string |
|
84 | { |
||
85 | 16 | $clause = ''; |
|
86 | |||
87 | 16 | if ($this->limit != 0) { |
|
88 | 2 | $clause .= "LIMIT {$this->limit}"; |
|
89 | } |
||
90 | |||
91 | 16 | if ($this->offset != 0) { |
|
92 | 2 | $clause .= " OFFSET {$this->offset}"; |
|
93 | } |
||
94 | |||
95 | 16 | if ($clause != '') { |
|
96 | 2 | $clause = PHP_EOL . ltrim($clause); |
|
97 | } |
||
98 | |||
99 | 16 | return $clause; |
|
100 | } |
||
101 | } |
||
102 |