Completed
Push — master ( 0f15f1...06dce9 )
by Pavel
09:44
created

SymfonyFormsCompilerPass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 13
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 9 2
1
<?php
2
3
namespace ScayTrase\Api\Cruds\DependencyInjection\Compiler;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\DependencyInjection\Loader;
9
10
final class SymfonyFormsCompilerPass implements CompilerPassInterface
11
{
12
    /** {@inheritdoc} */
13 22
    public function process(ContainerBuilder $container)
14
    {
15 22
        if (!$container->has('form.factory')) {
16
            return;
17
        }
18
19 22
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../../Resources/config'));
20 22
        $loader->load('forms.yml');
21 22
    }
22
}
23