Completed
Push — master ( 83c5eb...11f8c0 )
by Carlos
07:01 queued 02:45
created

Client   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A verifySignature() 0 6 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
namespace EasyWeChat\MiniProgram\Soter;
13
14
use EasyWeChat\Kernel\BaseClient;
15
16
/**
17
 * Class Client.
18
 *
19
 * @author her-cat <[email protected]>
20
 */
21
class Client extends BaseClient
22
{
23
    /**
24
     * @param string $openid
25
     * @param string $json
26
     * @param string $signature
27
     *
28
     * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
29
     *
30
     * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
31
     */
32 1
    public function verifySignature(string $openid, string $json, string $signature)
33
    {
34 1
        return $this->httpPostJson('cgi-bin/soter/verify_signature', [
35 1
            'openid' => $openid,
36 1
            'json_string' => $json,
37 1
            'json_signature' => $signature,
38
        ]);
39
    }
40
}