Kernel   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 26
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A bootstrapping() 0 7 2
A setConfig() 0 5 1
A start() 0 5 1
1
<?php
2
namespace agoalofalife;
3
4
use Illuminate\Config\Repository;
5
6
class Kernel
7
{
8
    protected $bootstrapping = [
9
        'config' => Repository::class,
10
    ];
11
12 2
    private function bootstrapping() : void
13
    {
14 2
        foreach ($this->bootstrapping as $abstract => $concrete)
15
        {
16 2
            app()->instance($abstract, new $concrete());
17
        }
18 2
    }
19
20 2
    private function setConfig() : void
21
    {
22 2
        $configFile = require 'config.php';
23 2
        app('config')->set('geography', $configFile);
24 2
    }
25
26 2
    public function start() : void
27
    {
28 2
        $this->bootstrapping();
29 2
        $this->setConfig();
30
    }
31
}