Application::__call()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 2
crap 2
1
<?php
2
/*
3
 * This file is part of the wannanbigpig/alipay-sdk-php.
4
 *
5
 * (c) wannanbigpig <[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 EasyAlipay\BaseService;
12
13
use EasyAlipay\Kernel\ServiceContainer;
14
15
/**
16
 * Class Application
17
 *
18
 * @author   liuml  <[email protected]>
19
 * @DateTime 2019-07-18  16:13
20
 *
21
 * @property Auth\Client $auth
22
 * @property User\Client $user
23
 *
24
 * @method mixed queryAppAuthToken(string $appAuthToken)
25
 */
26
class Application extends ServiceContainer
27
{
28
29
    /**
30
     * @var array
31
     */
32
    protected $providers = [
33
        'auth' => Auth\Client::class,
34
        'user' => User\Client::class,
35
    ];
36
37
    /**
38
     * __call.
39
     *
40
     * @param $name
41
     * @param $arguments
42
     *
43
     * @return mixed
44
     */
45
    public function __call($name, $arguments)
46
    {
47
        return call_user_func_array([$this['base'], $name], $arguments);
48
    }
49
}
50