Completed
Pull Request — master (#34)
by Eric
10:19
created

ReplaceBase64FileExtensionPass::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Lug package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Lug\Bundle\ResourceBundle\DependencyInjection\Compiler;
13
14
use Lug\Bundle\ResourceBundle\Form\Extension\Base64FileExtension;
15
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
16
use Symfony\Component\DependencyInjection\ContainerBuilder;
17
use Symfony\Component\DependencyInjection\Reference;
18
19
/**
20
 * @author GeLo <[email protected]>
21
 */
22
class ReplaceBase64FileExtensionPass implements CompilerPassInterface
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27 1
    public function process(ContainerBuilder $container)
28
    {
29
        $container
30 1
            ->getDefinition('ivory.base64_file.form.extension')
31 1
            ->setClass(Base64FileExtension::class)
32 1
            ->addArgument(new Reference('lug.resource.routing.parameter_resolver'));
33 1
    }
34
}
35