Passed
Push — master ( 296071...a4f823 )
by Richard
05:22 queued 11s
created

getLoader()   B

Complexity

Conditions 9
Paths 61

Size

Total Lines 37
Code Lines 23

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 9
eloc 23
nc 61
nop 0
dl 0
loc 37
rs 8.0555
c 0
b 0
f 0
1
<?php
2
3
// autoload_real.php @generated by Composer
4
5
class ComposerAutoloaderInit6352cb8ef79af2c7649e83bf921c4678
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('ComposerAutoloaderInit6352cb8ef79af2c7649e83bf921c4678', 'loadClassLoader'), true, true);
28
        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
        spl_autoload_unregister(array('ComposerAutoloaderInit6352cb8ef79af2c7649e83bf921c4678', 'loadClassLoader'));
30
31
        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
        if ($useStaticLoader) {
33
            require __DIR__ . '/autoload_static.php';
34
35
            call_user_func(\Composer\Autoload\ComposerStaticInit6352cb8ef79af2c7649e83bf921c4678::getInitializer($loader));
36
        } else {
37
            $classMap = require __DIR__ . '/autoload_classmap.php';
38
            if ($classMap) {
39
                $loader->addClassMap($classMap);
40
            }
41
        }
42
43
        $loader->setClassMapAuthoritative(true);
44
        $loader->register(true);
45
46
        if ($useStaticLoader) {
47
            $includeFiles = Composer\Autoload\ComposerStaticInit6352cb8ef79af2c7649e83bf921c4678::$files;
48
        } else {
49
            $includeFiles = require __DIR__ . '/autoload_files.php';
50
        }
51
        foreach ($includeFiles as $fileIdentifier => $file) {
52
            composerRequire6352cb8ef79af2c7649e83bf921c4678($fileIdentifier, $file);
53
        }
54
55
        return $loader;
56
    }
57
}
58
59
function composerRequire6352cb8ef79af2c7649e83bf921c4678($fileIdentifier, $file)
60
{
61
    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
62
        require $file;
63
64
        $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
65
    }
66
}
67