Passed
Push — master ( e5b474...40007f )
by wannanbigpig
02:47
created

Client   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 12
c 1
b 0
f 0
dl 0
loc 62
ccs 12
cts 12
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A certifyStart() 0 7 1
A certifyInitialize() 0 6 1
A getCertifyStatus() 0 7 1
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\User;
12
13
use EasyAlipay\Kernel\Support\Support;
14
15
class Client extends Support
16
{
17
    /**
18
     * alipay.user.certify.open.initialize(身份认证初始化服务).
19
     *
20
     * @param array $params
21
     *
22
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
23
     *
24
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
25
     * @throws \GuzzleHttp\Exception\GuzzleException
26
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
27
     */
28 2
    public function certifyInitialize(array $params)
29
    {
30 2
        $method = 'alipay.user.certify.open.initialize';
31
32 2
        return $this->request($method, [
33 2
            'biz_content' => $params,
34
        ]);
35
    }
36
37
    /**
38
     * alipay.user.certify.open.certify(身份认证开始认证).
39
     *
40
     * @param string $certifyId
41
     *
42
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
43
     *
44
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
45
     * @throws \GuzzleHttp\Exception\GuzzleException
46
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
47
     */
48 2
    public function certifyStart(string $certifyId)
49
    {
50 2
        $method = 'alipay.user.certify.open.certify';
51
52 2
        return $this->request($method, [
53
            'biz_content' => [
54 2
                'certify_id' => $certifyId,
55
            ],
56
        ]);
57
    }
58
59
    /**
60
     * alipay.user.certify.open.query(身份认证记录查询).
61
     *
62
     * @param string $certifyId
63
     *
64
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
65
     *
66
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
67
     * @throws \GuzzleHttp\Exception\GuzzleException
68
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
69
     */
70 2
    public function getCertifyStatus(string $certifyId)
71
    {
72 2
        $method = 'alipay.user.certify.open.query';
73
74 2
        return $this->request($method, [
75
            'biz_content' => [
76 2
                'certify_id' => $certifyId,
77
            ],
78
        ]);
79
    }
80
}
81