Completed
Pull Request — master (#31)
by Tom
02:19
created

Configurator::getServiceProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace TomPHP\ConfigServiceProvider\League;
4
5
use TomPHP\ConfigServiceProvider\ApplicationConfig;
6
use TomPHP\ConfigServiceProvider\ContainerConfigurator;
7
use TomPHP\ConfigServiceProvider\InflectorConfig;
8
use TomPHP\ConfigServiceProvider\ServiceConfig;
9
10
final class Configurator implements ContainerConfigurator
11
{
12
    public function addApplicationConfig($container, ApplicationConfig $config, $prefix = 'config')
13
    {
14
        $container->addServiceProvider(new ApplicationConfigServiceProvider($config, $prefix));
15
    }
16
17
    public function addServiceConfig($container, ServiceConfig $config)
18
    {
19
        $container->addServiceProvider(new ServiceServiceProvider($config));
20
    }
21
22
    public function addInflectorConfig($container, InflectorConfig $config)
23
    {
24
        $container->addServiceProvider(new InflectorServiceProvider($config));
25
    }
26
}
27