Completed
Pull Request — master (#2)
by Tomáš
02:53
created

ContainerFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 4
Bugs 1 Features 2
Metric Value
wmc 2
c 4
b 1
f 2
lcom 0
cbo 1
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A createWithConfig() 0 8 1
1
<?php
2
3
namespace Symplify\MultiCodingStandard\Tests;
4
5
use Nette\Configurator;
6
use Nette\DI\Container;
7
8
final class ContainerFactory
9
{
10
    /**
11
     * @return Container
12
     */
13
    public function create()
14
    {
15
        return $this->createWithConfig(__DIR__.'/../src/config/config.neon');
16
    }
17
18
    /**
19
     * @return Container
20
     */
21
    public function createWithConfig($config)
22
    {
23
        $configurator = new Configurator();
24
        $configurator->setTempDirectory(TEMP_DIR);
25
        $configurator->addConfig($config);
26
27
        return $configurator->createContainer();
28
    }
29
}
30