Conditions | 4 |
Paths | 8 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 15 | public function __construct( |
|
37 | HttpClient $httpClient = null, |
||
38 | HydratorInterface $hydrator = null, |
||
39 | RequestBuilder $requestBuilder = null |
||
40 | ) { |
||
41 | 15 | $this->httpClient = $httpClient ?: HttpClientDiscovery::find(); |
|
42 | 15 | $this->hydrator = $hydrator ?: new ModelHydrator; |
|
|
|||
43 | 15 | $this->requestBuilder = $requestBuilder ?: new RequestBuilder; |
|
44 | 15 | } |
|
45 | } |
||
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.