| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 41 | public function toString(Escaper $escaper): string |
|
| 25 | { |
||
| 26 | 41 | if($this->leftCondition->isEmpty()) |
|
| 27 | { |
||
| 28 | 11 | return $this->rightCondition->toString($escaper); |
|
| 29 | } |
||
| 30 | |||
| 31 | 37 | if($this->rightCondition->isEmpty()) |
|
| 32 | { |
||
| 33 | 10 | return $this->leftCondition->toString($escaper); |
|
| 34 | } |
||
| 35 | |||
| 36 | 33 | return $this->buildCondition($escaper); |
|
| 37 | } |
||
| 38 | |||
| 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.