Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
25 | 7 | public function toString(Escaper $escaper): string |
|
26 | { |
||
27 | 7 | if($this->isEmpty()) |
|
28 | { |
||
29 | 2 | return ''; |
|
30 | } |
||
31 | |||
32 | 5 | return sprintf( |
|
33 | 5 | '%s BETWEEN %s AND %s', |
|
34 | 5 | $this->column->getName(), |
|
35 | 5 | $this->escapeValue($this->start, $escaper), |
|
36 | 5 | $this->escapeValue($this->end, $escaper) |
|
37 | ); |
||
38 | } |
||
39 | |||
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.