Passed
Pull Request — master (#1252)
by Keal
02:21
created

Application::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 2
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
/*
3
 * This file is part of the overtrue/wechat.
4
 *
5
 * (c) overtrue <[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
11
namespace EasyWeChat\Work\MiniProgram;
12
13
use EasyWeChat\Kernel\ServiceContainer;
14
15
/**
16
 * Class Application.
17
 *
18
 * @author Caikeal <[email protected]>
19
 *
20
 * @property \EasyWeChat\Work\MiniProgram\Auth\Client $auth
21
 */
22
class Application extends ServiceContainer
23
{
24
    /**
25
     * Application constructor.
26
     *
27
     * @param array $config
28
     * @param array $prepends
29
     */
30
    public function __construct(array $config = [], array $prepends = [])
31
    {
32
        parent::__construct($config, $prepends);
33
34
        $providers = [
35
            Auth\ServiceProvider::class,
36
        ];
37
38
        foreach ($providers as $provider) {
39
            $this->register(new $provider());
40
        }
41
    }
42
}
43