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.

CLI.php ➔ boot()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 47

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
nc 4
nop 0
dl 0
loc 47
rs 9.1563
c 0
b 0
f 0
1
<?php
2
3
namespace App;
4
5
/**
6
 * Load, configure, run application
7
 */
8
function boot()
9
{
10
    if (session_status() == PHP_SESSION_NONE) {
11
        ini_set('session.auto_start', 'Off');
12
    } else {
13
        ini_set('session.lazy_write', 'On');
14
    }
15
16
    chdir(realpath(__DIR__ . '/../../'));
17
    require_once '../lib/autoload.php';
18
19
    // bootstrap initial environment
20
    $f3 = \Base::instance();
21
22
    if (empty($f3->get('CLI'))) {
23
        die('This can only be executed in CLI mode.');
24
    }
25
26
    \FFMVC\App::start();
27
    $f3->set('UNLOAD', function () {
28
        \FFMVC\App::finish();
29
    });
30
31
    // load dependency injection container
32
    $dice = new \Dice\Dice;
33
34
    // logging for application
35
    $logfile = $f3->get('log.file');
36
    $dice->addRule('Log', ['shared' => true, 'constructParams' => [$logfile]]);
37
38
    // database connection used by app
39
    $dbConfig = $f3->get('db');
40
    $dice->addRule('DB\\SQL', ['shared' => true, 'constructParams' => [
41
        \FFMVC\Helpers\DB::createDbDsn($dbConfig),
42
        $dbConfig['user'],
43
        $dbConfig['pass'],
44
        [\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION],
45
    ]]);
46
47
    // auto-create database if options set
48
    \App\Setup::database($dice);
49
50
    // run the main application
51
    require_once 'lib/App/App.php';
52
    $app = $dice->create('App\\App');
53
    $app->Main();
54
}
55
56
// run the application
57
boot();
58