| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 1 | public function find() { |
|
| 23 | 1 | $result = $this->randomOrgAPI->call('generateDecimalFractions', ['n' => 3, 'decimalPlaces' => 10]) |
|
| 24 | 1 | ->getData(); |
|
| 25 | |||
| 26 | 1 | $this->coordinates = [ |
|
|
|
|||
| 27 | 1 | 'x' => rad2deg($result[0] * 2 * pi() - pi()), |
|
| 28 | 1 | 'y' => rad2deg(pi()/2 - acos($result[1] * 2 - 1)), |
|
| 29 | 1 | 'z' => $result[2] * 1000, |
|
| 30 | ]; |
||
| 31 | |||
| 32 | 1 | return $this; |
|
| 33 | } |
||
| 34 | |||
| 45 |
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..