1 | <?php |
||
14 | class ExceptionDelegator |
||
15 | { |
||
16 | use Injector; |
||
17 | |||
18 | /** |
||
19 | * @var Logger ロガー |
||
20 | */ |
||
21 | private $logger; |
||
22 | |||
23 | /** |
||
24 | * @var object インスタンス |
||
25 | */ |
||
26 | private $instance; |
||
27 | |||
28 | /** |
||
29 | * @var string メソッド名 |
||
30 | */ |
||
31 | private $method; |
||
32 | |||
33 | /** |
||
34 | * @var \Exception 例外オブジェクト |
||
35 | */ |
||
36 | private $exceptionObject; |
||
37 | |||
38 | /** |
||
39 | * @var array<Container> 例外ハンドリングリスト |
||
40 | */ |
||
41 | private $exceptionHandler; |
||
42 | |||
43 | /** |
||
44 | * constructor |
||
45 | */ |
||
46 | public function __construct($instance, \Exception $exceptionObject, string $method = null) |
||
47 | { |
||
48 | $this->instance = $instance; |
||
49 | $this->method = $method; |
||
50 | $this->exceptionObject = $exceptionObject; |
||
51 | $this->exceptionHandler = []; |
||
52 | $this->logger = new class() { function __call($name, $args) {} }; |
||
54 | |||
55 | /** |
||
56 | * 例外ハンドリングリストを設定する |
||
57 | * @param array<Container> 例外ハンドリングリスト |
||
58 | */ |
||
59 | public function setExceptionHandler(array $exceptionHandler) |
||
63 | |||
64 | /** |
||
65 | * 例外を実行する |
||
66 | */ |
||
67 | public function raise() |
||
102 | } |
||
103 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..