GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

SetupAutoloader   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 0
loc 24
ccs 0
cts 8
cp 0
rs 10
c 1
b 1
f 0
wmc 1
lcom 0
cbo 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A bootstrap() 0 15 1
1
<?php
2
3
namespace Nip\Application\Bootstrap\Bootstrapers;
4
5
use Nip\Application;
6
use Nip\AutoLoader\AutoLoader;
7
8
/**
9
 * Class SetupAutoloader
10
 * @package Nip\Application\Bootstrap\Bootstrapers
11
 */
12
class SetupAutoloader extends AbstractBootstraper
13
{
14
    /**
15
     * Bootstrap the given application.
16
     *
17
     * @param Application $app
18
     * @return void
19
     */
20
    public function bootstrap(Application $app)
21
    {
22
        AutoLoader::registerHandler($app->getAutoLoader());
23
24
        $app->getAutoLoader()->setCachePath(
25
            $app->storagePath() . DIRECTORY_SEPARATOR
26
            . 'cache' . DIRECTORY_SEPARATOR . "autoloader" . DIRECTORY_SEPARATOR
27
        );
28
29
        $app->setupAutoLoaderPaths();
30
31
//        if ($this->getStaging()->getStage()->inTesting()) {
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
32
        $app->getAutoLoader()->getClassMapLoader()->setRetry(true);
33
//        }
34
    }
35
}
36