| Total Complexity | 6 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class Mailcode_Exception extends BaseException |
||
| 22 | { |
||
| 23 | public function __construct(string $message, ?string $details = null, $code = null, $previous = null) |
||
| 24 | { |
||
| 25 | if(defined('TESTS_ROOT') && !empty($details)) { |
||
| 26 | $message .= PHP_EOL. |
||
| 27 | 'Details:'.PHP_EOL. |
||
| 28 | $details; |
||
| 29 | } |
||
| 30 | |||
| 31 | parent::__construct($message, $details, $code, $previous); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var Mailcode_Collection|null |
||
| 36 | */ |
||
| 37 | private ?Mailcode_Collection $collection = null; |
||
| 38 | |||
| 39 | public function setCollection(Mailcode_Collection $collection) : void |
||
| 40 | { |
||
| 41 | $this->collection = $collection; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return Mailcode_Collection|null |
||
| 46 | */ |
||
| 47 | public function getCollection(): ?Mailcode_Collection |
||
| 48 | { |
||
| 49 | return $this->collection; |
||
| 50 | } |
||
| 51 | |||
| 52 | public function hasCollection() : bool |
||
| 55 | } |
||
| 56 | } |
||
| 57 |