ConfigServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 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] = function ($app) {
27
            return new Config($app->getConfig());
28
        };
29
    }
30
}
31