Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function find() |
||
25 | { |
||
26 | $provider = Provider::withResource('generateDecimalFractions') |
||
27 | ->withParameters(['n' => 3, 'decimalPlaces' => 10]); |
||
28 | |||
29 | $result = $this->getRandomOrgAPI()->getData($provider); |
||
30 | |||
31 | $this->coordinates = [ |
||
|
|||
32 | 'x' => rad2deg($result[0] * 2 * pi() - pi()), |
||
33 | 'y' => rad2deg(pi()/2 - acos($result[1] * 2 - 1)), |
||
34 | 'z' => $result[2] * 1000, |
||
35 | ]; |
||
36 | |||
37 | return $this; |
||
38 | } |
||
39 | |||
50 |
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..