Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
6 | final class Controller |
||
7 | { |
||
8 | /** |
||
9 | * @var ContainerInterface |
||
10 | */ |
||
11 | private $container; |
||
12 | |||
13 | /** |
||
14 | * @param ContainerInterface $container |
||
15 | */ |
||
16 | public function __construct(ContainerInterface $container) |
||
17 | { |
||
18 | $this->container = $container; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @param $name |
||
23 | * @param mixed $default |
||
24 | * @return mixed |
||
25 | */ |
||
26 | public function getParamater($name, $default = null) |
||
29 | } |
||
30 | } |
||
31 |
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.