Completed
Branch custom_translations (7e9ce6)
by Antonio
08:29
created

PublicServiceCompilerPass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
4
namespace Flagbit\Bundle\TableAttributeBundle\Test\Kernel;
5
6
7
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
10
class PublicServiceCompilerPass implements CompilerPassInterface
11
{
12
13
    /**
14
     * @var array
15
     */
16
    private $serviceIds;
17
18
    public function __construct(array $serviceIds)
19
    {
20
21
        $this->serviceIds = $serviceIds;
22
    }
23
24
    public function process(ContainerBuilder $container)
25
    {
26
        foreach ($this->serviceIds as $serviceId) {
27
            $container->getDefinition($serviceId)->setPublic(true);
28
        }
29
    }
30
}