1 | <?php |
||
14 | class ExceptionHandler |
||
15 | { |
||
16 | /** |
||
17 | * @var Negotiator |
||
18 | */ |
||
19 | private $negotiator; |
||
20 | |||
21 | /** |
||
22 | * @var ExceptionHandlerPreferences |
||
23 | */ |
||
24 | private $preferences; |
||
25 | |||
26 | /** |
||
27 | * @var ResolverInterface |
||
28 | */ |
||
29 | private $resolver; |
||
30 | |||
31 | /** |
||
32 | * @var Whoops |
||
33 | */ |
||
34 | private $whoops; |
||
35 | |||
36 | /** |
||
37 | * @param ExceptionHandlerPreferences $preferences |
||
38 | * @param Negotiator $negotiator |
||
39 | * @param ResolverInterface $resolver |
||
40 | * @param Whoops $whoops |
||
41 | */ |
||
42 | 12 | public function __construct( |
|
53 | |||
54 | /** |
||
55 | * @param ServerRequestInterface $request |
||
56 | * @param ResponseInterface $response |
||
57 | * @param callable $next |
||
58 | * |
||
59 | * @return ResponseInterface |
||
60 | */ |
||
61 | 12 | public function __invoke( |
|
100 | |||
101 | /** |
||
102 | * Determine the preferred content type for the current request |
||
103 | 12 | * |
|
104 | * @param ServerRequestInterface $request |
||
105 | 12 | * |
|
106 | 12 | * @return string |
|
107 | */ |
||
108 | 12 | private function type(ServerRequestInterface $request) |
|
123 | |||
124 | /** |
||
125 | * Retrieve the handler to use for the given type |
||
126 | 12 | * |
|
127 | * @param string $type |
||
128 | 12 | * |
|
129 | * @return \Whoops\Handler\HandlerInterface |
||
130 | */ |
||
131 | private function handler($type) |
||
135 | } |
||
136 |
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: