| Total Complexity | 4 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 77.78% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class FreshMailException extends \Exception |
||
| 19 | { |
||
| 20 | const EXCEPTION_MESSAGE = 'FreshMail exception'; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * FreshMailException constructor. |
||
| 24 | * |
||
| 25 | * @param string $message |
||
| 26 | * @param int $code |
||
| 27 | * @param Throwable|null $previous |
||
| 28 | */ |
||
| 29 | 686 | public function __construct($message = '', $code = 0, Throwable $previous = null) |
|
| 30 | { |
||
| 31 | 686 | if (!$message) { |
|
| 32 | 7 | $message = $this->getDefaultMessage(); |
|
| 33 | } |
||
| 34 | 686 | parent::__construct($message, $code, $previous); |
|
| 35 | 686 | } |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 7 | protected function getDefaultMessage(): string |
|
| 41 | { |
||
| 42 | 7 | return static::EXCEPTION_MESSAGE; |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function __toString() |
||
| 51 | } |
||
| 52 | } |
||
| 53 |