Completed
Pull Request — master (#31)
by Tom
02:48
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 League\Container\ServiceProvider\ServiceProviderInterface;
6
use TomPHP\ConfigServiceProvider\ApplicationConfig;
7
use TomPHP\ConfigServiceProvider\ContainerConfigurator;
8
use TomPHP\ConfigServiceProvider\InflectorConfig;
9
use TomPHP\ConfigServiceProvider\ServiceConfig;
10
11
final class Configurator implements ContainerConfigurator
12
{
13
    public function addApplicationConfig($container, ApplicationConfig $config, $prefix = 'config')
14
    {
15
        $container->addServiceProvider(new ApplicationConfigServiceProvider($config, $prefix));
16
    }
17
18
    public function addServiceConfig($container, ServiceConfig $config)
19
    {
20
        $container->addServiceProvider(new ServiceServiceProvider($config));
21
    }
22
23
    public function addInflectorConfig($container, InflectorConfig $config)
24
    {
25
        $container->addServiceProvider(new InflectorServiceProvider($config));
26
    }
27
}
28