Issues (321)

tests/PolyfillTestCase7.php (1 issue)

1
<?php
2
3
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
4
5
// allow hooking code to run within `run` and `fail` via defining `_run` and `_fail` in subclasses
6
abstract class PhpXmlRpc_PolyfillTestCase extends TestCase
7
{
8
    public function _run($result = null) {
9
        return parent::run($result);
10
    }
11
12
    public static function _fail() {}
13
14
    public function run(PHPUnit_Framework_TestResult $result = null) {
15
        return $this->_run($result);
16
    }
17
18
    public static function fail($message = '') {
19
        static::_fail($message);
0 ignored issues
show
The call to PhpXmlRpc_PolyfillTestCase::_fail() has too many arguments starting with $message. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        static::/** @scrutinizer ignore-call */ 
20
                _fail($message);

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.

Loading history...
20
        parent::fail($message);
21
    }
22
}
23