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

ConfigServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 14
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 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