Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
23 | trait NumberPartTrait |
||
24 | { |
||
25 | /** |
||
26 | * Build numbered part |
||
27 | * |
||
28 | * @param string $part Part name to be build |
||
29 | * @param int $number Number of the part |
||
30 | * @return string |
||
31 | */ |
||
32 | 3 | protected function buildNumberPart($part, $number) |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * Build LIMIT part |
||
39 | * |
||
40 | * @param int $number Max rows to get |
||
41 | * @return string |
||
42 | */ |
||
43 | 1 | protected function buildLimit($number) |
|
44 | { |
||
45 | 1 | return $this->buildNumberPart('LIMIT ', $number); |
|
46 | } |
||
47 | |||
48 | /** |
||
49 | * Build OFFSET part |
||
50 | * |
||
51 | * @param int $number Rows to skip |
||
52 | * @return string |
||
53 | */ |
||
54 | 1 | protected function buildOffset($number) |
|
57 | } |
||
58 | } |