| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 4 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 13 | 3 | public function __toString() |
|
| 14 | { |
||
| 15 | 3 | $messages = [sprintf("- %s\n", $this->getMessage())]; |
|
| 16 | 3 | $e = $this->getPrevious(); |
|
| 17 | 3 | if (! $e instanceof \Exception) { |
|
| 18 | 1 | return $this->getMainMessage($this); |
|
| 19 | } |
||
| 20 | 2 | if ($e instanceof Unbound) { |
|
| 21 | 1 | return $this->buildMessage($e, $messages) . "\n" . $e->getTraceAsString(); |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | return parent::__toString(); |
|
| 25 | } |
||
| 26 | |||
| 56 |