Passed
Pull Request — master (#3)
by Vincent
08:42
created

IgnorePrimeAnnotationsPass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 9
ccs 3
cts 4
cp 0.75
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 7 2
1
<?php
2
3
namespace Bdf\PrimeBundle\DependencyInjection\Compiler;
4
5
use Doctrine\Common\Annotations\AnnotationReader;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
/**
10
 * Ignore all annotations from the bdf serializer and used by prime
11
 */
12
class IgnorePrimeAnnotationsPass implements CompilerPassInterface
13
{
14 6
    public function process(ContainerBuilder $container)
15
    {
16 6
        if (!class_exists(AnnotationReader::class)) {
17
            return;
18
        }
19
20 6
        AnnotationReader::addGlobalIgnoredName('SerializeIgnore');
21 6
    }
22
}
23