Passed
Push — master ( 8a12fc...8bc538 )
by Vsevolods
10:30
created

ConfigurationLoading   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 10 1
1
<?php declare(strict_types = 1);
2
3
namespace Venta\Framework\Kernel\Bootstrap;
4
5
use Venta\Contracts\Config\Config;
6
use Venta\Contracts\Config\ConfigFactory;
7
use Venta\Framework\Kernel\AbstractKernelBootstrap;
8
9
/**
10
 * Class ConfigurationLoading
11
 *
12
 * @package Venta\Framework\Kernel\Bootstrap
13
 */
14
class ConfigurationLoading extends AbstractKernelBootstrap
15
{
16
    /**
17
     * @inheritDoc
18
     */
19
    public function __invoke()
20
    {
21
        /** @var ConfigFactory $configFactory */
22
        $configFactory = $this->container->get(ConfigFactory::class);
23
24
        // todo: implement arbitrary config files loading.
25
        $config = $configFactory->createFromFile($this->kernel->getRootPath() . '/config/app.php');
26
27
        $this->container->bindInstance(Config::class, $config);
28
    }
29
}