Completed
Pull Request — master (#10)
by Tomáš
31:42
created

ConfigurationResolverFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 19
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
A getAllFixers() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of Symplify
5
 * Copyright (c) 2016 Tomas Votruba (http://tomasvotruba.cz).
6
 */
7
8
namespace Symplify\MultiCodingStandard\PhpCsFixer\Configuration;
9
10
use Symfony\CS\ConfigurationResolver;
11
use Symfony\CS\Fixer;
12
use Symfony\CS\FixerInterface;
13
14
final class ConfigurationResolverFactory
15
{
16
    public function create() : ConfigurationResolver
17
    {
18
        $configurationResolver = new ConfigurationResolver();
19
        $configurationResolver->setAllFixers($this->getAllFixers());
20
        return $configurationResolver;
21
    }
22
23
    /**
24
     * @return FixerInterface[]
25
     */
26
    private function getAllFixers() : array
27
    {
28
        $fixer = new Fixer();
29
        $fixer->registerBuiltInFixers();
30
        return $fixer->getFixers();
31
    }
32
}
33