Passed
Push — main ( bacfa2...24c5a0 )
by Osvaldo
07:23
created

ComposerAutoloaderInit806e07cdf43c7c81033d8908d20b95ac   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 25
c 1
b 0
f 0
dl 0
loc 49
rs 10
wmc 11

2 Methods

Rating   Name   Duplication   Size   Complexity  
A loadClassLoader() 0 4 2
B getLoader() 0 35 9
1
<?php
2
3
// autoload_real.php @generated by Composer
4
5
class ComposerAutoloaderInit806e07cdf43c7c81033d8908d20b95ac
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
        spl_autoload_register(array('ComposerAutoloaderInit806e07cdf43c7c81033d8908d20b95ac', 'loadClassLoader'), true, true);
26
        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
0 ignored issues
show
Unused Code introduced by
The call to Composer\Autoload\ClassLoader::__construct() has too many arguments starting with dirname(dirname(__FILE__)). ( Ignorable by Annotation )

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

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

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...
27
        spl_autoload_unregister(array('ComposerAutoloaderInit806e07cdf43c7c81033d8908d20b95ac', 'loadClassLoader'));
28
29
        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
        if ($useStaticLoader) {
31
            require __DIR__ . '/autoload_static.php';
32
33
            call_user_func(\Composer\Autoload\ComposerStaticInit806e07cdf43c7c81033d8908d20b95ac::getInitializer($loader));
34
        } else {
35
            $map = require __DIR__ . '/autoload_namespaces.php';
36
            foreach ($map as $namespace => $path) {
37
                $loader->set($namespace, $path);
38
            }
39
40
            $map = require __DIR__ . '/autoload_psr4.php';
41
            foreach ($map as $namespace => $path) {
42
                $loader->setPsr4($namespace, $path);
43
            }
44
45
            $classMap = require __DIR__ . '/autoload_classmap.php';
46
            if ($classMap) {
47
                $loader->addClassMap($classMap);
48
            }
49
        }
50
51
        $loader->register(true);
52
53
        return $loader;
54
    }
55
}
56