ComposerAutoloaderInite51ffc086cc73a0e04fdd1790cb59b90   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 17
c 2
b 0
f 0
dl 0
loc 37
rs 10
wmc 5

2 Methods

Rating   Name   Duplication   Size   Complexity  
A loadClassLoader() 0 4 2
A getLoader() 0 23 3
1
<?php
2
3
// autoload_real.php @generated by Composer
4
5
class ComposerAutoloaderInite51ffc086cc73a0e04fdd1790cb59b90
6
{
7
    private static $loader;
8
9
    public static function loadClassLoader($class)
10
    {
11
        if ('Composer\Autoload\ClassLoader' === $class) {
12
            require __DIR__ . '/ClassLoader.php';
13
        }
14
    }
15
16
    /**
17
     * @return \Composer\Autoload\ClassLoader
18
     */
19
    public static function getLoader()
20
    {
21
        if (null !== self::$loader) {
22
            return self::$loader;
23
        }
24
25
        require __DIR__ . '/platform_check.php';
26
27
        spl_autoload_register(array('ComposerAutoloaderInite51ffc086cc73a0e04fdd1790cb59b90', 'loadClassLoader'), true, true);
28
        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
0 ignored issues
show
Unused Code introduced by
The call to Composer\Autoload\ClassLoader::__construct() has too many arguments starting with dirname(__DIR__). ( Ignorable by Annotation )

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

28
        self::$loader = $loader = /** @scrutinizer ignore-call */ new \Composer\Autoload\ClassLoader(\dirname(__DIR__));

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...
29
        spl_autoload_unregister(array('ComposerAutoloaderInite51ffc086cc73a0e04fdd1790cb59b90', 'loadClassLoader'));
30
31
        require __DIR__ . '/autoload_static.php';
32
        call_user_func(\Composer\Autoload\ComposerStaticInite51ffc086cc73a0e04fdd1790cb59b90::getInitializer($loader));
33
34
        $loader->register(true);
35
36
        $includeFiles = \Composer\Autoload\ComposerStaticInite51ffc086cc73a0e04fdd1790cb59b90::$files;
37
        foreach ($includeFiles as $fileIdentifier => $file) {
38
            composerRequiree51ffc086cc73a0e04fdd1790cb59b90($fileIdentifier, $file);
39
        }
40
41
        return $loader;
42
    }
43
}
44
45
/**
46
 * @param string $fileIdentifier
47
 * @param string $file
48
 * @return void
49
 */
50
function composerRequiree51ffc086cc73a0e04fdd1790cb59b90($fileIdentifier, $file)
51
{
52
    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
53
        $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
54
55
        require $file;
56
    }
57
}
58