| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public static function getLoader() |
||
| 20 | { |
||
| 21 | if (null !== self::$loader) { |
||
| 22 | return self::$loader; |
||
| 23 | } |
||
| 24 | |||
| 25 | spl_autoload_register(array('ComposerAutoloaderInitHumbugBox451', 'loadClassLoader'), true, true); |
||
| 26 | self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); |
||
|
|
|||
| 27 | spl_autoload_unregister(array('ComposerAutoloaderInitHumbugBox451', 'loadClassLoader')); |
||
| 28 | |||
| 29 | require __DIR__ . '/autoload_static.php'; |
||
| 30 | call_user_func(\Composer\Autoload\ComposerStaticInitHumbugBox451::getInitializer($loader)); |
||
| 31 | |||
| 32 | $loader->setClassMapAuthoritative(true); |
||
| 33 | $loader->register(true); |
||
| 34 | |||
| 35 | return $loader; |
||
| 36 | } |
||
| 38 |
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.