Total Complexity | 3 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class WeatherJSONControllerMock extends WeatherJSONController |
||
17 | { |
||
18 | /** |
||
19 | * Get weather data |
||
20 | * |
||
21 | */ |
||
22 | 3 | public function getIPData($location) |
|
29 | } |
||
30 | |||
31 | |||
32 | |||
33 | /** |
||
34 | * Get weather data |
||
35 | * |
||
36 | * @return object |
||
37 | */ |
||
38 | 1 | public function getData($weather, $lat, $lon) |
|
39 | { |
||
40 | 1 | $weather = new WeatherModelMock(); |
|
41 | 1 | $weatherInfo = $weather->getData($lat, $lon); |
|
42 | |||
43 | 1 | return $weatherInfo; |
|
44 | } |
||
45 | |||
46 | |||
47 | |||
48 | /** |
||
49 | * Get weather data multi |
||
50 | * |
||
51 | * @return object |
||
52 | */ |
||
53 | 1 | public function getMultiData($weather, $lat, $lon) |
|
59 | } |
||
60 | } |
||
61 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.