ShakeAround::getShakeInfo()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace EntWeChat\ShakeAround;
4
5
use EntWeChat\Core\AbstractAPI;
6
7
/**
8
 * Class ShakeAround.
9
 */
10
class ShakeAround extends AbstractAPI
11
{
12
    const API_GET_SHAKE_INFO = 'https://qyapi.weixin.qq.com/cgi-bin/shakearound/getshakeinfo';
13
14
    /**
15
     * Get shake info.
16
     *
17
     * @param string $ticket
18
     *
19
     * @return \EntWeChat\Support\Collection
20
     */
21
    public function getShakeInfo($ticket)
22
    {
23
        $params = [
24
            'ticket' => $ticket,
25
        ];
26
27
        return $this->parseJSON('json', [self::API_GET_SHAKE_INFO, $params]);
28
    }
29
}
30