| Total Complexity | 3 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 23 | class Exception extends RuntimeException implements ExceptionInterface |
||
| 24 | { |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Context of the exception |
||
| 28 | * |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | private $context = []; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Constructor of the exception |
||
| 35 | * |
||
| 36 | * @param string $message |
||
| 37 | * @param array $context |
||
| 38 | * @param int $code |
||
| 39 | * @param Throwable $previous |
||
| 40 | */ |
||
| 41 | public function __construct(string $message = '', array $context = [], int $code = 0, Throwable $previous = null) |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritDoc} |
||
| 50 | */ |
||
| 51 | final public function getContext() : array |
||
| 52 | { |
||
| 53 | return $this->context; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritDoc} |
||
| 58 | */ |
||
| 59 | final public function fromContext($key, $default = null) |
||
| 62 | } |
||
| 63 | } |
||
| 64 |