Completed
Pull Request — master (#122)
by Richard
12:56
created

getLoader()   C

Complexity

Conditions 7
Paths 25

Size

Total Lines 36
Code Lines 23

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 7
eloc 23
nc 25
nop 0
dl 0
loc 36
rs 6.7272
c 1
b 0
f 0
1
<?php
2
3
// autoload_real.php @generated by Composer
4
5
class ComposerAutoloaderInitfb111d443af336ae9955b26ed60e9c14
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('ComposerAutoloaderInitfb111d443af336ae9955b26ed60e9c14', 'loadClassLoader'), true, true);
23
        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
        spl_autoload_unregister(array('ComposerAutoloaderInitfb111d443af336ae9955b26ed60e9c14', 'loadClassLoader'));
25
26
        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
27
        if ($useStaticLoader) {
28
            require_once __DIR__ . '/autoload_static.php';
29
30
            call_user_func(\Composer\Autoload\ComposerStaticInitfb111d443af336ae9955b26ed60e9c14::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\ComposerStaticInitfb111d443af336ae9955b26ed60e9c14::$files;
43
        } else {
44
            $includeFiles = require __DIR__ . '/autoload_files.php';
45
        }
46
        foreach ($includeFiles as $fileIdentifier => $file) {
47
            composerRequirefb111d443af336ae9955b26ed60e9c14($fileIdentifier, $file);
48
        }
49
50
        return $loader;
51
    }
52
}
53
54
function composerRequirefb111d443af336ae9955b26ed60e9c14($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