Client::list()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 11
nc 1
nop 2
dl 0
loc 15
ccs 0
cts 14
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the docodeit/wechat.
5
 *
6
 * (c) docodeit <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace JinWeChat\OfficialAccount\Users;
13
14
use JinWeChat\Kernel\BaseClient;
15
16
class Client extends BaseClient
17
{
18
    /**
19
     * 用户管理列表.
20
     *
21
     * @param int $offset
22
     * @param int $limit
23
     *
24
     * @return \Psr\Http\Message\ResponseInterface
25
     */
26
    public function list($offset = 0, $limit = 10)
27
    {
28
        $query = [
29
            'query' => [
30
                'action' => 'get_user_list',
31
                'limit' => $limit,
32
                'offset' => $offset,
33
                'f' => 'json',
34
                'lang' => 'zh_CN',
35
                'ajax' => '1',
36
                'random' => $this->getMillisecond(),
37
            ],
38
        ];
39
40
        return $this->httpGet('cgi-bin/user_tag', $query);
41
    }
42
}
43