| 1 | <?php |
||
| 9 | trait Limit |
||
| 10 | { |
||
| 11 | protected |
||
| 12 | $limit, |
||
|
1 ignored issue
–
show
|
|||
| 13 | $offset; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param int|string $limit |
||
| 17 | */ |
||
| 18 | 7 | public function limit($limit): self |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param int|string $offset |
||
| 27 | */ |
||
| 28 | 6 | public function offset($offset): self |
|
| 39 | |||
| 40 | 30 | private function buildLimit(): string |
|
| 54 | |||
| 55 | 30 | private function buildLimitClause(): string |
|
| 64 | |||
| 65 | 6 | private function buildOffsetClause(): string |
|
| 74 | } |
||
| 75 |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.