| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 82 | public function __construct($message, $code = null, $pattern = null) |
|
| 16 | { |
||
| 17 | 82 | if (!$message) { |
|
| 18 | 3 | $message = 'Unknown error'; |
|
| 19 | } |
||
| 20 | |||
| 21 | 82 | if ($pattern !== null) { |
|
| 22 | 78 | $message .= '; pattern: ' . \implode(', ', (array) $pattern); |
|
| 23 | } |
||
| 24 | |||
| 25 | 82 | parent::__construct($message, $code); |
|
| 26 | 82 | } |
|
| 27 | |||
| 49 |