Test Failed
Push — master ( 90f1e5...8cd561 )
by Jim
02:25
created

ConfigServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: lenovo
5
 * Date: 6/15/2018
6
 * Time: 12:05 AM
7
 */
8
9
namespace TimSDK\Foundation\ServiceProviders;
10
11
use Pimple\Container;
12
use TimSDK\Foundation\Config;
13
14
class ConfigServiceProvider extends ServiceProvider
15
{
16
    /**
17
     * Registers services on the given container.
18
     *
19
     * This method should only be used to configure services and parameters.
20
     * It should not get services.
21
     *
22
     * @param Container $pimple A container instance
23
     */
24
    public function register(Container $pimple)
25
    {
26
        $pimple['config'] = $pimple[Config::class] = $pimple['config'] = function ($app) {
27
            return new Config($app->getConfig());
28
        };
29
    }
30
}
31