Completed
Pull Request — master (#1275)
by
unknown
03:05
created

ServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 8 2
1
<?php
2
/*
3
 * This file is part of the keacefull/wechat.
4
 *
5
 * (c) xiaomin <[email protected]>
6
 *
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
namespace EasyWeChat\OpenWork\SuiteAuth;
11
12
13
use Pimple\Container;
14
use Pimple\ServiceProviderInterface;
15
16
class ServiceProvider implements ServiceProviderInterface
17
{
18
    /**
19
     * {@inheritdoc}.
20
     */
21
    public function register(Container $app)
22
    {
23
        $app['suite_ticket'] = function ($app) {
24
            return new SuiteTicket($app);
25
        };
26
27
        isset($app['suite_access_token']) || $app['suite_access_token'] = function ($app) {
28
            return new AccessToken($app);
29
        };
30
    }
31
}