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.

HandleExceptions::bootstrap()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 20
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 7
nc 2
nop 1
dl 0
loc 20
ccs 0
cts 7
cp 0
crap 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\Application\Bootstrap\Bootstrapers;
4
5
use Nip\Application;
6
use Nip\Debug\Debug;
7
8
/**
9
 * Class HandleExceptions
10
 * @package Nip\Application\Bootstrap\Bootstrapers
11
 */
12
class HandleExceptions 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
        $this->setApp($app);
23
24
        error_reporting(-1);
25
26
        if (config('app.debug')) {
27
            Debug::enable(E_ALL, false);
28
        } else {
29
            Debug::enable(-1, false);
30
        }
31
32
//        $handler = set_error_handler('var_dump');
0 ignored issues
show
Unused Code Comprehensibility introduced by
53% 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...
33
//        $handler = is_array($handler) ? $handler[0] : null;
34
//        restore_error_handler();
35
//
36
//        if ($handler instanceof ErrorHandler) {
37
//            $app->getContainer()->share(ErrorHandler::class, $handler);
38
//        }
39
    }
40
}
41