Completed
Pull Request — master (#697)
by
unknown
02:52
created

ClearQuota::clear()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 9
ccs 0
cts 7
cp 0
crap 2
rs 9.6666
1
<?php 
2
3
/*
4
 * This file is part of the overtrue/wechat.
5
 *
6
 * (c) overtrue <[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
/**
13
 * Broadcast.php.
14
 *
15
 * @author    overtrue <[email protected]>
16
 * @copyright 2015 overtrue <[email protected]>
17
 *
18
 * @see      https://github.com/overtrue
19
 * @see      http://overtrue.me
20
 */
21
22
namespace EasyWeChat\ClearQuota;
23
24
use EasyWeChat\Core\AbstractAPI;
25
26
class ClearQuota extends AbstractAPI
27
{
28
    const API_CLEAR = 'https://api.weixin.qq.com/cgi-bin/clear_quota';
29
30
    public function clear()
31
    {
32
        // appId defaults to the current appId
33
        $options = [
34
            'appid' => $this->getAccessToken()->getAppId()
35
        ];
36
37
        return $this->parseJSON('json', [self::API_CLEAR, $options]);
38
    }
39
}
40