1 | <?php |
||
22 | abstract class HTTPClientAbstract implements HTTPClientInterface, LoggerAwareInterface{ |
||
23 | use LoggerAwareTrait; |
||
24 | |||
25 | /** |
||
26 | * @var \chillerlan\HTTP\HTTPOptions |
||
27 | */ |
||
28 | protected $options; |
||
29 | |||
30 | /** |
||
31 | * @var \Psr\Http\Message\RequestFactoryInterface |
||
32 | */ |
||
33 | protected $requestFactory; |
||
34 | |||
35 | /** |
||
36 | * @var \Psr\Http\Message\ResponseFactoryInterface |
||
37 | */ |
||
38 | protected $responseFactory; |
||
39 | |||
40 | /** |
||
41 | * CurlClient constructor. |
||
42 | * |
||
43 | * @param \chillerlan\Settings\SettingsContainerInterface|null $options |
||
44 | * @param \Psr\Http\Message\ResponseFactoryInterface|null $responseFactory |
||
45 | * @param \Psr\Log\LoggerInterface|null $logger |
||
46 | */ |
||
47 | public function __construct( |
||
56 | |||
57 | /** |
||
58 | * @todo: files, content-type |
||
59 | * |
||
60 | * @param string $uri |
||
61 | * @param string|null $method |
||
62 | * @param array|null $query |
||
63 | * @param mixed|null $body |
||
64 | * @param array|null $headers |
||
65 | * |
||
66 | * @return \Psr\Http\Message\ResponseInterface |
||
67 | */ |
||
68 | public function request(string $uri, string $method = null, array $query = null, $body = null, array $headers = null):ResponseInterface{ |
||
102 | |||
103 | } |
||
104 |
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.