Completed
Push — master ( 5ddcc0...9e0ead )
by Carlos
42s
created

StatsServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the overtrue/wechat.
5
 *
6
 * (c) overtrue <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
/**
13
 * StatsServiceProvider.php.
14
 *
15
 * This file is part of the wechat.
16
 *
17
 * (c) overtrue <[email protected]>
18
 *
19
 * This source file is subject to the MIT license that is bundled
20
 * with this source code in the file LICENSE.
21
 */
22
namespace EasyWeChat\Foundation\ServiceProviders;
23
24
use EasyWeChat\Stats\Stats;
25
use Pimple\Container;
26
use Pimple\ServiceProviderInterface;
27
28
/**
29
 * Class StatsServiceProvider.
30
 */
31
class StatsServiceProvider implements ServiceProviderInterface
32
{
33
    /**
34
     * Registers services on the given container.
35
     *
36
     * This method should only be used to configure services and parameters.
37
     * It should not get services.
38
     *
39
     * @param Container $pimple A container instance
40
     */
41
    public function register(Container $pimple)
42
    {
43
        $pimple['stats'] = function ($pimple) {
44
            return new Stats($pimple['access_token']);
45
        };
46
    }
47
}
48