| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 5 | public function toString(Escaper $escaper): string |
|
| 21 | { |
||
| 22 | 5 | if($this->isEmpty()) |
|
| 23 | { |
||
| 24 | 2 | return ''; |
|
| 25 | } |
||
| 26 | |||
| 27 | 3 | $statement = $this->statement; |
|
| 28 | |||
| 29 | 3 | if($this->statement instanceof Query) |
|
| 30 | { |
||
| 31 | 2 | $this->statement->setEscaper($escaper); |
|
| 32 | |||
| 33 | 2 | $statement = $this->wrapWithParenthesis($this->statement->toString()); |
|
| 34 | } |
||
| 35 | |||
| 36 | 3 | return (string) $statement; |
|
| 37 | } |
||
| 38 | |||
| 49 |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.