1 | <?php |
||
8 | class ExceptionDelegator |
||
9 | { |
||
10 | use Injector; |
||
11 | |||
12 | /** |
||
13 | * @var Logger ロガー |
||
14 | */ |
||
15 | private $logger; |
||
16 | |||
17 | /** |
||
18 | * @var object インスタンス |
||
19 | */ |
||
20 | private $instance; |
||
21 | |||
22 | /** |
||
23 | * @var string メソッド名 |
||
24 | */ |
||
25 | private $method; |
||
26 | |||
27 | /** |
||
28 | * @var \Exception 例外オブジェクト |
||
29 | */ |
||
30 | private $exceptionObject; |
||
31 | |||
32 | /** |
||
33 | * @var array<Container> 例外ハンドリングリスト |
||
34 | */ |
||
35 | private $exceptionHandler; |
||
36 | |||
37 | /** |
||
38 | * constructor |
||
39 | */ |
||
40 | 8 | public function __construct($instance, \Exception $exceptionObject, string $method = null) |
|
41 | { |
||
42 | 8 | $this->instance = $instance; |
|
43 | 8 | $this->method = $method; |
|
44 | 8 | $this->exceptionObject = $exceptionObject; |
|
45 | 8 | $this->exceptionHandler = []; |
|
46 | $this->logger = new class() { function __call($name, $args) {} }; |
||
48 | |||
49 | /** |
||
50 | * 例外ハンドリングリストを設定する |
||
51 | * @param array<Container> 例外ハンドリングリスト |
||
52 | */ |
||
53 | 4 | public function setExceptionHandler(array $exceptionHandler) |
|
57 | |||
58 | /** |
||
59 | * 例外を実行する |
||
60 | */ |
||
61 | 8 | public function raise() |
|
96 | } |
||
97 |
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..