Completed
Push — master ( 17133d...0e5556 )
by wannanbigpig
05:19 queued 10s
created

Application::__call()   A

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 3
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
 * @method mixed getAccessToken(string $code, string $grantType = 'authorization_code')
22
 * @method mixed getAuthorizationUrl(string $redirectUri, string $scope = 'auth_base', string $state = null)
23
 * @method mixed getUserInfo(string $authToken)
24
 * @method mixed loginAuthorization(string $state, string $scopes = 'auth_base', string $returnUrl = null)
25
 * @method mixed certifyInitialize(array $params)
26
 * @method mixed certifyStart(string $certifyId)
27
 * @method mixed getCertifyStatus(string $certifyId)
28
 */
29
class Application extends ServiceContainer
30
{
31
32
    /**
33
     * @var array
34
     */
35
    protected $providers = [
36
        'auth' => Auth\Client::class,
37
        'user' => User\Client::class,
38
    ];
39
40
    /**
41
     * __call.
42
     *
43
     * @param $name
44
     * @param $arguments
45
     *
46
     * @return mixed
47
     */
48
    public function __call($name, $arguments)
49
    {
50
        return call_user_func_array([$this['base'], $name], $arguments);
51
    }
52
}
53