Completed
Pull Request — master (#7)
by frey
03:04
created

OAServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 12
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
namespace EntWeChat\Foundation\ServiceProviders;
4
5
use EntWeChat\OA\API;
6
use Pimple\Container;
7
use Pimple\ServiceProviderInterface;
8
9
/**
10
 * Class OAServiceProvider.
11
 */
12
class OAServiceProvider implements ServiceProviderInterface
13
{
14
    /**
15
     * {@inheritdoc}.
16
     */
17
    public function register(Container $pimple)
18
    {
19
        $pimple['oa'] = function ($pimple) {
20
            return new API($pimple['access_token']);
21
        };
22
    }
23
}
24