| Conditions | 2 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function __toString() |
||
| 15 | { |
||
| 16 | try { |
||
| 17 | $contextText = $this->pipeString($this->trimString($this->getContextText())."\n"); |
||
| 18 | $string = sprintf("%s\n\n%s", $this->getMessage(), $contextText); |
||
| 19 | } catch (\Exception $e) { |
||
| 20 | return $this->getMessage(); |
||
| 21 | } |
||
| 22 | |||
| 23 | return $string; |
||
| 24 | } |
||
| 25 | |||
| 56 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.