Completed
Push — bridge-refactor ( 54fa11 )
by Sullivan
05:53
created

IsoCodesValidatorServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace SLLH\IsoCodesValidator\Provider;
4
5
use Silex\Application;
6
use Silex\ServiceProviderInterface;
7
8
/**
9
 * @author Sullivan Senechal <[email protected]>
10
 */
11
class IsoCodesValidatorServiceProvider implements ServiceProviderInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function register(Application $app)
17
    {
18
        if (isset($app['translator'])) {
19
            $file = __DIR__.'/../Resources/translations/validators.'.$app['locale'].'.xlf';
20
            if (file_exists($file)) {
21
                $app['translator']->addResource('xliff', $file, $app['locale'], 'validators');
22
            }
23
        }
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function boot(Application $app)
30
    {
31
    }
32
}
33