| 1 | <?php |
||
| 3 | class AutomatedLinkTest extends SapphireTest { |
||
| 4 | |||
| 5 | public static $fixture_file = 'fixtures/AutomatedLinkTest.yml'; |
||
| 6 | |||
| 7 | public function testInsertion(){ |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Create a dummy object for testing functionality on the SiteTree |
||
| 26 | * |
||
| 27 | * @param string|null $content |
||
| 28 | * @return Page |
||
| 29 | */ |
||
| 30 | private function createPage($content=null){ |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Render the $page supplied into a DOMDocument object |
||
| 38 | * |
||
| 39 | * @param Page $page |
||
| 40 | * @return DOMDocument |
||
| 41 | */ |
||
| 42 | private function getPageDOM(Page $page){ |
||
| 47 | } |
||
| 48 | |||
| 50 |
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.
In this case you can add the
@ignorePhpDoc annotation to the duplicate definition and it will be ignored.