| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | abstract class AbstractJobException extends \RuntimeException implements JobExceptionInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Options for the queue. |
||
| 23 | * |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | protected $options = []; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * AbstractJobException constructor. |
||
| 30 | * |
||
| 31 | * @param string|null $message |
||
| 32 | * @param array $options Options for the queue |
||
| 33 | */ |
||
| 34 | 3 | public function __construct($message = null, array $options = []) |
|
| 35 | { |
||
| 36 | 3 | parent::__construct($message); |
|
| 37 | |||
| 38 | 3 | $this->setOptions($options); |
|
| 39 | 3 | } |
|
| 40 | |||
| 41 | 3 | public function getOptions() : array |
|
| 42 | { |
||
| 43 | 3 | return array_merge( |
|
| 44 | [ |
||
| 45 | 3 | 'message' => $this->getMessage(), |
|
| 46 | 3 | 'trace' => $this->getTraceAsString() |
|
| 47 | ], |
||
| 48 | 3 | $this->options |
|
| 49 | ); |
||
| 50 | |||
| 51 | } |
||
| 52 | |||
| 53 | 3 | public function setOptions(array $options) : void |
|
| 56 | 3 | } |
|
| 57 | |||
| 58 | |||
| 60 |