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

ClearQuota   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 14
ccs 0
cts 7
cp 0
rs 10
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A clear() 0 9 1
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