1 | <?php |
||
18 | class StringFormatterTest extends ValueFormatterTestBase { |
||
19 | |||
20 | /** |
||
21 | * @deprecated since DataValues Interfaces 0.2, just use getInstance. |
||
22 | */ |
||
23 | protected function getFormatterClass() { |
||
24 | throw new \LogicException( 'Should not be called, use getInstance' ); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @see ValueFormatterTestBase::getInstance |
||
29 | * |
||
30 | * @param FormatterOptions|null $options |
||
31 | * |
||
32 | * @return StringFormatter |
||
33 | */ |
||
34 | protected function getInstance( FormatterOptions $options = null ) { |
||
37 | |||
38 | /** |
||
39 | * @see ValueFormatterTestBase::validProvider |
||
40 | */ |
||
41 | public function validProvider() { |
||
50 | |||
51 | /** |
||
52 | * @dataProvider invalidProvider |
||
53 | */ |
||
54 | public function testInvalidFormat( $value ) { |
||
59 | |||
60 | public function invalidProvider() { |
||
67 | |||
68 | } |
||
69 |
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
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.