Passed
Push — master ( c11190...b979a3 )
by ma
03:25
created

Unionpay   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __call() 0 5 1
1
<?php
2
namespace tinymeng\Chinaums\Provider;
3
4
use tinymeng\Chinaums\Tools\Str;
5
6
/**
7
 * Unionpay
8
 * @method static \tinymeng\Chinaums\Service\Alipay\App App(array $params) App支付
9
 * @method static \tinymeng\Chinaums\Service\Alipay\Close Close(array $params) 关闭支付
10
 * @method static \tinymeng\Chinaums\Service\Alipay\H5 H5(array $params) H5支付
11
 * @method static \tinymeng\Chinaums\Service\Alipay\Mini Mini(array $params) 小程序支付
12
 * @method static \tinymeng\Chinaums\Service\Alipay\Pos Pos(array $params) 刷卡支付
13
 * @method static \tinymeng\Chinaums\Service\Alipay\PosRefund PosRefund(array $params) 刷卡退款
14
 * @method static \tinymeng\Chinaums\Service\Alipay\Query Query(array $params) 查询订单
15
 * @method static \tinymeng\Chinaums\Service\Alipay\Refund Refund(array $params) 退款
16
 * @method static \tinymeng\Chinaums\Service\Alipay\RefundQuery RefundQuery(array $params) 退款查询
17
 */
18
class Unionpay extends BaseProvider
19
{
20
21
    /**
22
     * @param string $shortcut
23
     * @param array $params
24
     * @return mixed
25
     */
26
    public function __call(string $shortcut, array $params)
27
    {
28
        $class = '\\tinymeng\\Chinaums\\Service\\Unionpay\\' . Str::studly($shortcut);
29
        $service = new $class($this->config);
30
        return $service->request($params);
31
    }
32
33
}
34