Completed
Push — master ( 58aa96...ab5c23 )
by Jeroen
02:25
created

AbstractKernel::loadEnvironment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Protoku\Kernel;
4
5
use Dotenv\Dotenv;
6
use League\BooBoo\Formatter\JsonFormatter;
7
use League\BooBoo\Runner;
8
use League\Container\Container;
9
use League\Container\ContainerAwareTrait;
10
use League\Container\ReflectionContainer;
11
12
abstract class AbstractKernel
13
{
14
    use ContainerAwareTrait;
15
16
    /**
17
     * AbstractKernel constructor.
18
     */
19
    public function __construct()
20
    {
21
    	$this->createErrorHandler();
22
23
    	$this->createContainer();
24
25
    	$this->loadEnvironment();
26
    }
27
28
    private function createErrorHandler()
29
	{
30
		$runner = new Runner();
31
		$runner->pushFormatter(new JsonFormatter);
32
		$runner->register();asd
33
	}
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected '}'
Loading history...
34
35
    private function createContainer()
36
	{
37
		$container = new Container;
38
		$container->delegate(new ReflectionContainer);
39
		$this->setContainer($container);
40
	}
41
42
	private function loadEnvironment()
43
	{
44
		$environment = new Dotenv(getcwd() . '/../');
45
		$environment->load();
46
	}
47
}
48