| 1 | <?php |
||
| 10 | class Insert implements Query |
||
| 11 | { |
||
| 12 | use EscaperAware; |
||
| 13 | |||
| 14 | private |
||
| 15 | $insertPart, |
||
|
1 ignored issue
–
show
|
|||
| 16 | $valuesPart; |
||
| 17 | |||
| 18 | 3 | public function __construct(?string $table = null) |
|
| 27 | |||
| 28 | 3 | public function toString(): string |
|
| 37 | |||
| 38 | 3 | public function insert(?string $table): self |
|
| 44 | |||
| 45 | 3 | public function values(array $values): self |
|
| 51 | |||
| 52 | 3 | private function buildInsertString(): string |
|
| 56 | |||
| 57 | 3 | private function buildValuesString(): string |
|
| 63 | } |
||
| 64 |
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.