Code Duplication    Length = 3-5 lines in 2 locations

src/Core/Tools.php 1 location

@@ 34-36 (lines=3) @@
31
        $timestamp = $_GET['timestamp'];
32
        $nonce     = $_GET['nonce'];
33
34
        if (!is_string($signature) || !is_numeric($timestamp) || $timestamp <= 0 || !is_string($nonce) || $nonce == '') {
35
            return false;
36
        }
37
38
        $tmpArr = [$token, $timestamp, $nonce];
39
        sort($tmpArr, SORT_STRING);

src/Decryption.php 1 location

@@ 25-29 (lines=5) @@
22
            return false;
23
        }
24
25
        if (!is_string($msg_signature) || $xml == '' || !is_numeric($timestamp) || $timestamp <= 0 || !is_string($nonce) || $nonce == '') {
26
            $this->setError('签名参数错误');
27
28
            return false;
29
        }
30
31
        $verify_signature = Tools::verifySignature($this->configs->component_app_token);
32