1 | <?php |
||
20 | class RequestHandler |
||
21 | { |
||
22 | /** |
||
23 | * @var NullLogger |
||
24 | */ |
||
25 | private $logger; |
||
26 | |||
27 | /** |
||
28 | * @var JsonEncoder |
||
29 | */ |
||
30 | private $jsonEncoder; |
||
31 | |||
32 | /** |
||
33 | * RequestHandler constructor. |
||
34 | * |
||
35 | * @param LoggerInterface|null $logger |
||
36 | */ |
||
37 | public function __construct(LoggerInterface $logger = null) |
||
42 | |||
43 | /** |
||
44 | * @param GuzzleClient $client |
||
45 | * @param RequestInterface $request |
||
46 | * @return ResponseInterface |
||
47 | */ |
||
48 | public function handle(GuzzleClient $client, RequestInterface $request) |
||
79 | } |
||
80 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.