1 | <?php |
||
18 | class RequestHandler |
||
19 | { |
||
20 | /** @var LoggerInterface */ |
||
21 | private $logger; |
||
22 | |||
23 | /** |
||
24 | * RequestHandler constructor. |
||
25 | * |
||
26 | * @param LoggerInterface|null $logger |
||
27 | */ |
||
28 | public function __construct(LoggerInterface $logger = null) |
||
32 | |||
33 | /** |
||
34 | * @param GuzzleClient $client |
||
35 | * @param RequestInterface $request |
||
36 | * @return ResponseInterface |
||
37 | */ |
||
38 | public function handle(GuzzleClient $client, RequestInterface $request) |
||
69 | } |
||
70 |
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: