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

ContainerFactory::createWithConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 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