1 | <?php |
||
15 | class ExceptionHandler |
||
16 | { |
||
17 | /** |
||
18 | * @var Negotiator |
||
19 | */ |
||
20 | private $negotiator; |
||
21 | |||
22 | /** |
||
23 | * @var ExceptionHandlerPreferences |
||
24 | */ |
||
25 | private $preferences; |
||
26 | |||
27 | /** |
||
28 | * @var ResolverInterface |
||
29 | */ |
||
30 | private $resolver; |
||
31 | |||
32 | /** |
||
33 | * @var Whoops |
||
34 | */ |
||
35 | private $whoops; |
||
36 | |||
37 | /** |
||
38 | * @var LoggerInterface|null |
||
39 | */ |
||
40 | private $logger; |
||
41 | |||
42 | /** |
||
43 | * @param ExceptionHandlerPreferences $preferences |
||
44 | * @param Negotiator $negotiator |
||
45 | * @param ResolverInterface $resolver |
||
46 | * @param Whoops $whoops |
||
47 | * @param LoggerInterface|null $logger |
||
48 | */ |
||
49 | 13 | public function __construct( |
|
62 | |||
63 | /** |
||
64 | * @param ServerRequestInterface $request |
||
65 | * @param ResponseInterface $response |
||
66 | * @param callable $next |
||
67 | * |
||
68 | * @return ResponseInterface |
||
69 | */ |
||
70 | 13 | public function __invoke( |
|
120 | |||
121 | /** |
||
122 | * Determine the preferred content type for the current request |
||
123 | * |
||
124 | * @param ServerRequestInterface $request |
||
125 | * |
||
126 | * @return string |
||
127 | */ |
||
128 | 13 | private function type(ServerRequestInterface $request) |
|
143 | |||
144 | /** |
||
145 | * Retrieve the handler to use for the given type |
||
146 | * |
||
147 | * @param string $type |
||
148 | * |
||
149 | * @return \Whoops\Handler\HandlerInterface |
||
150 | */ |
||
151 | private function handler($type) |
||
155 | } |
||
156 |
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: