Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 15 |
Ratio | 100 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
60 | View Code Duplication | public function loadCountryPolygon($country) |
|
61 | { |
||
62 | if (!$country) { |
||
63 | return; |
||
64 | } |
||
65 | $file = $this->path.DIRECTORY_SEPARATOR.sprintf(self::COUNTRY_POLYGON_FILE, $country); |
||
66 | if (!file_exists($file)) { |
||
67 | return; |
||
68 | } |
||
69 | |||
70 | return json_decode( |
||
71 | file_get_contents($file), |
||
72 | true |
||
73 | ); |
||
74 | } |
||
75 | } |
||
76 |
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..