Completed
Push — master ( 39c546...d78055 )
by Tobias
32:44 queued 31:26
created

AddLoaderToValidationBuilderPass   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 8
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Happyr\AnnotationWarmer\DependencyInjection\CompilerPass;
6
7
use Happyr\AnnotationWarmer\Loader\FakeValidatorLoader;
8
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
use Symfony\Component\DependencyInjection\Reference;
11
12
/**
13
 * @author Tobias Nyholm <[email protected]>
14
 */
15
final class AddLoaderToValidationBuilderPass implements CompilerPassInterface
16
{
17
    public function process(ContainerBuilder $container)
18
    {
19
        $validatorBuilder = $container->getDefinition('validator.builder');
20
        $validatorBuilder->addMethodCall('addLoader', [new Reference(FakeValidatorLoader::class)]);
21
    }
22
}
23