Soter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A verify() 0 10 1
1
<?php
2
3
namespace YEntWeChat\Soter;
4
5
use YEntWeChat\Core\AbstractAPI;
6
7
/**
8
 * Class Soter.
9
 */
10
class Soter extends AbstractAPI
11
{
12
    const API_VERIFY_SIGNATURE = 'https://qyapi.weixin.qq.com/cgi-bin/soter/verify_signature';
13
14
    /**
15
     * Verify signature.
16
     *
17
     * @param string $openid
18
     * @param string $jsonString
19
     * @param string $jsonSignature
20
     *
21
     * @return \EntWeChat\Support\Collection
22
     */
23
    public function verify($openid, $jsonString, $jsonSignature)
24
    {
25
        $params = [
26
            'openid'         => $openid,
27
            'json_string'    => $jsonString,
28
            'json_signature' => $jsonSignature,
29
        ];
30
31
        return $this->parseJSON('json', [self::API_VERIFY_SIGNATURE, $params]);
32
    }
33
}
34