Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function __invoke(callable $handler) |
||
37 | { |
||
38 | return function(RequestInterface $request, array $options) use ($handler) { |
||
39 | $encodedAuth = base64_encode($this->authenticationService->getUsername().':'.$this->authenticationService->getHash()); |
||
40 | $request = $request->withHeader('Authorization', 'Basic '.$encodedAuth); |
||
41 | |||
42 | return $handler($request, $options); |
||
43 | }; |
||
46 |
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.