| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | final class ErrorEvent implements ErrorEventInterface |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var \Throwable |
||
| 25 | */ |
||
| 26 | private $throwable; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * ErrorEvent constructor. |
||
| 30 | * |
||
| 31 | * @param \Throwable $throwable |
||
| 32 | * |
||
| 33 | * @TODO Add debug stack back trace |
||
| 34 | */ |
||
| 35 | 1 | public function __construct(\Throwable $throwable) |
|
| 36 | { |
||
| 37 | 1 | $this->throwable = $throwable; |
|
| 38 | 1 | } |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | 1 | public function __toString(): string |
|
| 44 | { |
||
| 45 | 1 | return (string) $this->getThrowable(); |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return \Throwable |
||
| 50 | */ |
||
| 51 | 1 | public function getThrowable(): \Throwable |
|
| 54 | } |
||
| 55 | } |
||
| 56 |