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

ServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 2
1
<?php
2
3
namespace EasyWeChat\OpenWork\Corp;
4
5
use Pimple\Container;
6
use Pimple\ServiceProviderInterface;
7
8
class ServiceProvider implements ServiceProviderInterface
9
{
10
11
    /**
12
     * Registers services on the given container.
13
     *
14
     * This method should only be used to configure services and parameters.
15
     * It should not get services.
16
     *
17
     * @param Container $pimple A container instance
18
     */
19
    public function register(Container $app)
20
    {
21
        isset($app['corp']) || $app['corp'] = function ($app) {
22
            return new Client($app);
23
        };
24
    }
25
}