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