| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function setUp() |
||
| 17 | { |
||
| 18 | $xmlExpected = simplexml_load_file($this->getXmlPath()); |
||
| 19 | $fontResolver = function () {}; // @codingStandardsIgnoreLine |
||
| 20 | $graphicResolver = function () {}; // @codingStandardsIgnoreLine |
||
| 21 | $argumentValidator = function (\SimpleXMLElement $xmlActual) use ($xmlExpected) { |
||
| 22 | return (string) $xmlExpected == (string) $xmlActual; |
||
| 23 | }; |
||
| 24 | $rendererDocument = m::mock(RendererDocument::class) |
||
| 25 | ->shouldReceive('render') |
||
|
|
|||
| 26 | ->with(m::on($argumentValidator), $fontResolver, $graphicResolver) |
||
| 27 | ->once() |
||
| 28 | ->getMock(); |
||
| 29 | |||
| 30 | $this->ciffRenderer = new CiffRenderer($rendererDocument); |
||
| 31 | $this->ciffRenderer->setFontResolver($fontResolver); |
||
| 32 | $this->ciffRenderer->setGraphicResolver($graphicResolver); |
||
| 33 | } |
||
| 54 |
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.