| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| 1 | <?php |
||
| 19 | 5 | public function toString(Escaper $escaper) |
|
| 20 | { |
||
| 21 | 5 | if($this->isEmpty()) |
|
| 22 | 5 | { |
|
| 23 | 2 | return ''; |
|
| 24 | } |
||
| 25 | |||
| 26 | 3 | $statement = $this->statement; |
|
| 27 | |||
| 28 | 3 | if($this->statement instanceof Query) |
|
| 29 | 3 | { |
|
| 30 | 2 | $this->statement->setEscaper($escaper); |
|
| 31 | |||
| 32 | 2 | $statement = $this->wrapWithParenthese($this->statement->toString()); |
|
| 33 | 2 | } |
|
| 34 | |||
| 35 | 3 | return (string) $statement; |
|
| 36 | } |
||
| 37 | |||
| 48 |