Completed
Push — master ( 0b2d09...6fed26 )
by Guilh
14:08 queued 04:12
created

JMSFormErrorHandlerPass::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the FOSRestBundle package.
5
 *
6
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace FOS\RestBundle\DependencyInjection\Compiler;
13
14
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
use FOS\RestBundle\Serializer\Normalizer\FormErrorHandler;
17
18
/**
19
 * Changes the JMS FormError handler.
20
 *
21
 * @author Guilhem Niot <[email protected]>
22
 *
23
 * @internal
24
 */
25
final class JMSFormErrorHandlerPass implements CompilerPassInterface
26
{
27
    public function process(ContainerBuilder $container)
28
    {
29
        $container->setParameter('jms_serializer.form_error_handler.class', FormErrorHandler::class);
30
    }
31
}
32