Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0932 |
Changes | 0 |
1 | <?php |
||
42 | 18 | private function getInitialStub() |
|
43 | { |
||
44 | 18 | if ($this->stubConfiguration[$this->className]['disableConstructor'] == true) { |
|
45 | 18 | return $this->testCase->getMockBuilder($this->className) |
|
46 | 18 | ->disableOriginalConstructor() |
|
47 | 18 | ->getMock(); |
|
48 | } |
||
49 | |||
50 | return $this->testCase->getMockBuilder($this->className) |
||
51 | ->getMock(); |
||
52 | } |
||
60 |
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.