ServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 16 1
1
<?php
2
3
namespace EasyIM\TencentIM\Sns;
4
5
use Pimple\Container;
6
use Pimple\ServiceProviderInterface;
7
8
/**
9
 * Class ServiceProvider
10
 *
11
 * @property \EasyIM\TencentIM\Sns\Sns              $sns
12
 * @property \EasyIM\TencentIM\Sns\Client           $client
13
 * @property \EasyIM\TencentIM\Sns\GroupClient      $group
14
 * @property \EasyIM\TencentIM\Sns\BlackListClient  $black_list
15
 *
16
 * @package EasyIM\TencentIM\Sns
17
 * @author  longing <[email protected]>
18
 */
19
class ServiceProvider implements ServiceProviderInterface
20
{
21
    /**
22
     * {@inheritdoc}.
23
     */
24
    public function register(Container $app)
25
    {
26
        $app['sns'] = function ($app) {
27
            return new Sns($app);
28
        };
29
30
        $app['sns.client'] = function ($app) {
31
            return new Client($app);
32
        };
33
34
        $app['sns.group'] = function ($app) {
35
            return new GroupClient($app);
36
        };
37
38
        $app['sns.black_list'] = function ($app) {
39
            return new BlackListClient($app);
40
        };
41
    }
42
}
43