InfrastructureLoaderFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 8
cts 8
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Assimtech\Tempo\Factory;
4
5
use Assimtech\Tempo\Loader\InfrastructureLoader;
6
use Assimtech\Tempo\Factory;
7
use Symfony\Component\Yaml;
8
9
/**
10
 * Constructs an InfrastructureLoader
11
 */
12
class InfrastructureLoaderFactory
13
{
14
    /**
15
     * @return \Assimtech\Tempo\Loader\InfrastructureLoader
16
     */
17 1
    public static function create()
18
    {
19 1
        return new InfrastructureLoader(
20 1
            new Factory\InfrastructureFactory(
21 1
                new Factory\NodeFactory(),
22 1
                new Factory\EnvironmentFactory()
23 1
            ),
24 1
            new Yaml\Parser()
25 1
        );
26
    }
27
}
28