1 | <?php |
||
11 | abstract class AbstractJoin implements Join, Snippet |
||
12 | { |
||
13 | private |
||
14 | $table, |
||
1 ignored issue
–
show
|
|||
15 | $using, |
||
16 | $on; |
||
17 | |||
18 | 23 | public function __construct(string $table, ?string $alias = null) |
|
23 | |||
24 | /** |
||
25 | * @param array[string]|string $column |
||
26 | */ |
||
27 | 9 | public function using($column): self |
|
35 | |||
36 | 16 | public function on(?string $leftColumn, ?string $rightColumn): self |
|
43 | |||
44 | 23 | public function toString(): string |
|
57 | |||
58 | abstract protected function getJoinDeclaration(): string; |
||
59 | |||
60 | 23 | private function buildUsingConditionClause(): string |
|
69 | |||
70 | 23 | private function buildOnConditionClause(): string |
|
84 | } |
||
85 |
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.