Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function denormalize(array $data, APIResponse $response): APIResponse |
||
14 | { |
||
15 | if (!$response instanceof UltravioletIndex) { |
||
16 | return $response; |
||
17 | } |
||
18 | |||
19 | $response->value = $this->getData('value', $data); |
||
20 | $response->date = $this->getDateTimeFromTimestamp('date', $data); |
||
|
|||
21 | $response->isoDate = $this->getValue('date_iso', $data, \DateTimeInterface::class); |
||
22 | |||
23 | $location = new GeographicCoordinates(); |
||
24 | $location->latitude = $this->getData('lat', $data); |
||
25 | $location->longitude = $this->getData('lon', $data); |
||
26 | |||
27 | $response->location = $location; |
||
28 | |||
29 | return $response; |
||
30 | } |
||
31 | } |
||
32 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..