| Total Complexity | 4 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class ServerRequestFactory implements ServerRequestFactoryInterface |
||
| 11 | { |
||
| 12 | |||
| 13 | public function createServerRequest($method, UriInterface $uri = null) |
||
| 14 | { |
||
| 15 | if (!$uri instanceof UriInterface) { |
||
| 16 | $uri = new Uri($uri); |
||
| 17 | } |
||
| 18 | |||
| 19 | return new ServerRequest($method, $uri); |
||
|
|
|||
| 20 | } |
||
| 21 | |||
| 22 | public function createServerRequestFromArray(array $server) |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
This check compares calls to functions or methods with their respective definitions. If the call has less 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.