Total Complexity | 4 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | abstract class ControlledError extends UserError implements ControlledErrorInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $description; |
||
21 | |||
22 | /** |
||
23 | * @return string |
||
24 | */ |
||
25 | public function getDescription(): ?string |
||
26 | { |
||
27 | return $this->description; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Throw a controlled error dynamically |
||
32 | * |
||
33 | * @param int|string $code |
||
34 | * @param string $message |
||
35 | * @param string|null $category |
||
36 | * |
||
37 | * @return ControlledError |
||
38 | */ |
||
39 | public static function create($code, $message = null, $category = null) |
||
67 | } |
||
68 | }; |
||
69 | } |
||
70 | } |
||
71 |