ConfigurationFactory::createFromArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 10
ccs 8
cts 8
cp 1
rs 9.4285
cc 1
eloc 7
nc 1
nop 1
crap 1
1
<?php
2
3
namespace ivol\Config;
4
5
6
use Symfony\Component\Config\Definition\Processor;
7
8
class ConfigurationFactory
9
{
10 12
    public static function createFromArray($params = array())
11
    {
12 12
        $processor = new Processor();
13 12
        $configuration = new ExecWrapperConfiguration();
14 12
        $processedConfiguration = $processor->processConfiguration(
15 12
            $configuration,
16 12
            array($params)
17 12
        );
18 12
        return $processedConfiguration;
19
    }
20
}