| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | public static function get(string $url) |
||
| 8 | { |
||
| 9 | $request = new self($url); |
||
|
|
|||
| 10 | $request |
||
| 11 | ->setDefaultGetOptions() |
||
| 12 | ->setDefaultSpeedOptions() |
||
| 13 | ->setNoFollowRedirection() |
||
| 14 | ->setDesktopUserAgent() |
||
| 15 | ; |
||
| 16 | |||
| 17 | $response = $request->exec(); |
||
| 18 | |||
| 19 | return is_int($response) ? $response : $response->getContent(); |
||
| 20 | } |
||
| 22 |
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.