| 1 | <?php |
||
| 10 | class DelegateException extends ApplicationException |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var bool ハンドリング可否 |
||
| 14 | */ |
||
| 15 | private $isHandled; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var \Exception 例外オブジェクト |
||
| 19 | */ |
||
| 20 | private $originException; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * constructor |
||
| 24 | * @param \Exception 例外オブジェクト |
||
| 25 | */ |
||
| 26 | 4 | public function __construct(\Exception $originException) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * オリジナルの例外を返却する |
||
| 35 | * @return \Exception 例外オブジェクト |
||
| 36 | */ |
||
| 37 | public function getOriginException() |
||
| 38 | { |
||
| 39 | return $this->originException; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * ハンドリング可否を返却する |
||
| 44 | * @return bool ハンドリング可否 |
||
| 45 | */ |
||
| 46 | public function isHandled() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * ハンドリングを許可する |
||
| 53 | */ |
||
| 54 | 4 | public function enableHandled() |
|
| 58 | } |
||
| 59 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: