BroadcastServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace EntWeChat\Foundation\ServiceProviders;
4
5
use EntWeChat\Broadcast\Broadcast;
6
use Pimple\Container;
7
use Pimple\ServiceProviderInterface;
8
9
/**
10
 * Class BroadcastServiceProvider.
11
 */
12
class BroadcastServiceProvider implements ServiceProviderInterface
13
{
14
    /**
15
     * Registers services on the given container.
16
     *
17
     * This method should only be used to configure services and parameters.
18
     * It should not get services.
19
     *
20
     * @param Container $pimple A container instance
21
     */
22
    public function register(Container $pimple)
23
    {
24
        $pimple['broadcast'] = function ($pimple) {
25
            return new Broadcast($pimple['access_token']);
26
        };
27
    }
28
}
29