1 | <?php |
||
18 | class Auth implements ClientInterface |
||
19 | { |
||
20 | |||
21 | /** @var Cache */ |
||
22 | protected $cache; |
||
23 | |||
24 | /** @var Client */ |
||
25 | protected $client; |
||
26 | |||
27 | /** @var string */ |
||
28 | protected $token; |
||
29 | |||
30 | /** @var string */ |
||
31 | protected $username; |
||
32 | |||
33 | /** @var string */ |
||
34 | protected $password; |
||
35 | |||
36 | protected $authStrategy; |
||
37 | |||
38 | /** |
||
39 | * @param $username |
||
40 | * @param $password |
||
41 | * @param ClientInterface $clientInterface |
||
42 | * @param AuthStrategyInterface $authStrategy |
||
43 | */ |
||
44 | public function __construct( |
||
57 | |||
58 | /** |
||
59 | * @param string $method |
||
60 | * @param null $uri |
||
61 | * @param array $options |
||
62 | * |
||
63 | * @return mixed|\Psr\Http\Message\ResponseInterface |
||
64 | * @throws \Exception |
||
65 | */ |
||
66 | public function request($method, $uri = null, array $options = []) |
||
94 | |||
95 | |||
96 | /** |
||
97 | * @inheritDoc |
||
98 | */ |
||
99 | public function send(RequestInterface $request, array $options = []) |
||
103 | |||
104 | /** |
||
105 | * @inheritDoc |
||
106 | */ |
||
107 | public function sendAsync(RequestInterface $request, array $options = []) |
||
111 | |||
112 | /** |
||
113 | * @inheritDoc |
||
114 | */ |
||
115 | public function requestAsync($method, $uri, array $options = []) |
||
119 | |||
120 | /** |
||
121 | * @inheritDoc |
||
122 | */ |
||
123 | public function getConfig($option = null) |
||
127 | |||
128 | |||
129 | /** |
||
130 | * @param Response $response |
||
131 | * |
||
132 | * @return bool |
||
133 | */ |
||
134 | protected function needToRevalidate(Response $response) |
||
144 | |||
145 | } |
||
146 |
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.