DefaultExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 4
Bugs 1 Features 3
Metric Value
wmc 1
c 4
b 1
f 3
lcom 0
cbo 1
dl 0
loc 16
ccs 0
cts 9
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 10 1
1
<?php
2
3
/*
4
 * This file is part of the LaravelYaml package.
5
 *
6
 * (c) Théo FIDRY <[email protected]>
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 Fidry\LaravelYaml\DependencyInjection\Extension;
13
14
use Fidry\LaravelYaml\DependencyInjection\Builder\ContainerBuilder;
15
use Illuminate\Support\Facades\App;
16
17
/**
18
 * @author Théo FIDRY <[email protected]>
19
 */
20
final class DefaultExtension extends AbstractExtension
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function load(ContainerBuilder $container)
26
    {
27
        $loader = parent::load($container);
28
29
        $this
30
            ->loadResourceIfExist($loader, 'parameters.yml')
31
            ->loadResourceIfExist($loader, 'services.yml')
32
            ->loadResourceIfExist($loader, sprintf('parameters_%s.yml', App::environment()))
33
        ;
34
    }
35
}
36