Completed
Push — master ( 058da3...8d02ae )
by Carlos
05:22 queued 02:18
created

ShakeAroundServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

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
 * UserServiceProvider.php.
14
 *
15
 * Part of Overtrue\WeChat.
16
 *
17
 * For the full copyright and license information, please view the LICENSE
18
 * file that was distributed with this source code.
19
 *
20
 * @author    allen05ren <[email protected]>
21
 * @copyright 2016 overtrue <[email protected]>
22
 *
23
 * @see       https://github.com/overtrue/wechat
24
 * @see       http://overtrue.me
25
 */
26
27
namespace EasyWeChat\Foundation\ServiceProviders;
28
29
use EasyWeChat\ShakeAround\ShakeAround;
30
use Pimple\Container;
31
use Pimple\ServiceProviderInterface;
32
33
/**
34
 * Class ShakeAroundServiceProvider.
35
 */
36
class ShakeAroundServiceProvider implements ServiceProviderInterface
37
{
38
    /**
39
     * Registers services on the given container.
40
     *
41
     * This method should only be used to configure services and parameters.
42
     * It should not get services.
43
     *
44
     * @param Container $pimple A container instance
45
     */
46
    public function register(Container $pimple)
47
    {
48
        $pimple['shakearound'] = function ($pimple) {
49
            return new ShakeAround($pimple['access_token']);
50
        };
51
    }
52
}
53