Completed
Pull Request — master (#583)
by Richard
11:35
created

ComposerAutoloaderInitfb0e5c3e4af98ed910184391855ba473   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 48
rs 10
c 0
b 0
f 0
wmc 11
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A loadClassLoader() 0 6 2
D getLoader() 0 36 9
1
<?php
2
3
// autoload_real.php @generated by Composer
4
5
class ComposerAutoloaderInitfb0e5c3e4af98ed910184391855ba473
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
    public static function getLoader()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
17
    {
18
        if (null !== self::$loader) {
19
            return self::$loader;
20
        }
21
22
        spl_autoload_register(array('ComposerAutoloaderInitfb0e5c3e4af98ed910184391855ba473', 'loadClassLoader'), true, true);
23
        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
        spl_autoload_unregister(array('ComposerAutoloaderInitfb0e5c3e4af98ed910184391855ba473', 'loadClassLoader'));
25
26
        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
        if ($useStaticLoader) {
28
            require_once __DIR__ . '/autoload_static.php';
29
30
            call_user_func(\Composer\Autoload\ComposerStaticInitfb0e5c3e4af98ed910184391855ba473::getInitializer($loader));
31
        } else {
32
            $classMap = require __DIR__ . '/autoload_classmap.php';
33
            if ($classMap) {
34
                $loader->addClassMap($classMap);
35
            }
36
        }
37
38
        $loader->setClassMapAuthoritative(true);
39
        $loader->register(true);
40
41
        if ($useStaticLoader) {
42
            $includeFiles = Composer\Autoload\ComposerStaticInitfb0e5c3e4af98ed910184391855ba473::$files;
43
        } else {
44
            $includeFiles = require __DIR__ . '/autoload_files.php';
45
        }
46
        foreach ($includeFiles as $fileIdentifier => $file) {
47
            composerRequirefb0e5c3e4af98ed910184391855ba473($fileIdentifier, $file);
48
        }
49
50
        return $loader;
51
    }
52
}
53
54
function composerRequirefb0e5c3e4af98ed910184391855ba473($fileIdentifier, $file)
55
{
56
    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
57
        require $file;
58
59
        $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
60
    }
61
}
62