RemoveOverwrittenServicesCompilerPass::process()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Faecie\Bundle\JsonApiErrorResponseBundle\DependencyInjection\Compiler;
6
7
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
10
class RemoveOverwrittenServicesCompilerPass implements CompilerPassInterface
11
{
12 2
    public function process(ContainerBuilder $container)
13
    {
14 2
        $servicesToRemove = ['fos_rest.serializer.exception_normalizer.jms'];
15
16 2
        foreach ($servicesToRemove as $serviceId) {
17 2
            $container->removeDefinition($serviceId);
18
        }
19 2
    }
20
}
21