Application::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 8
rs 10
ccs 7
cts 7
cp 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the overtrue/wechat.
5
 *
6
 * (c) overtrue <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace EasyWeChat\Work\MiniProgram;
13
14
use EasyWeChat\MiniProgram\Application as MiniProgram;
15
use EasyWeChat\Work\Auth\AccessToken;
16
use EasyWeChat\Work\MiniProgram\Auth\Client;
17
18
/**
19
 * Class Application.
20
 *
21
 * @author Caikeal <[email protected]>
22
 *
23
 * @property \EasyWeChat\Work\MiniProgram\Auth\Client $auth
24
 */
25
class Application extends MiniProgram
26
{
27
    /**
28
     * Application constructor.
29
     *
30
     * @param array $config
31
     * @param array $prepends
32
     */
33 1
    public function __construct(array $config = [], array $prepends = [])
34
    {
35 1
        parent::__construct($config, $prepends + [
36 1
            'access_token' => function ($app) {
37 1
                return new AccessToken($app);
38 1
            },
39 1
            'auth' => function ($app) {
40 1
                return new Client($app);
41 1
            },
42
        ]);
43 1
    }
44
}
45