Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
44 | 33 | protected function buildPartCondition(Condition $condition, Escaper $escaper): string |
|
45 | { |
||
46 | 33 | $partCondition = $condition->toString($escaper); |
|
47 | |||
48 | 33 | if($condition instanceof CompositeCondition) |
|
49 | { |
||
50 | 23 | $partCondition = sprintf('(%s)', $partCondition); |
|
51 | } |
||
52 | |||
53 | 33 | return $partCondition; |
|
54 | } |
||
55 | |||
58 |
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.