Application::__call()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the dingtalk.
4
 * User: Ilham Tahir <[email protected]>
5
 * This source file is subject to the MIT license that is bundled
6
 * with this source code in the file LICENSE.
7
 */
8
9
namespace Aplisin\DingTalk;
10
11
use Aplisin\DingTalk\Kernel\ServiceContainer;
12
13
/**
14
 * Class Application
15
 * @property \Aplisin\DingTalk\Auth\AccessToken $access_token
16
 * @property \Aplisin\DingTalk\Department\Client $department
17
 * @property \Aplisin\DingTalk\User\Client $user
18
 */
19
class Application extends ServiceContainer
20
{
21
    protected $providers = [
22
        Auth\ServiceProvider::class,
23
        Department\ServiceProvider::class,
24
        User\ServiceProvider::class
25
    ];
26
27
    protected $defaultConfig = [
28
        // http://docs.guzzlephp.org/en/stable/request-options.html
29
        'http' => [
30
            'base_uri' => 'https://oapi.dingtalk.com/',
31
        ],
32
    ];
33
34
    public function __call($method, $arguments)
35
    {
36
        return $this['base']->$method(...$arguments);
37
    }
38
}
39