Code Duplication    Length = 20-20 lines in 2 locations

app/Support/Tencent/XgPush/XingeApp.php 2 locations

@@ 483-502 (lines=20) @@
480
    /**
481
     * 按帐号大批量推送
482
     */
483
    public function PushAccountListMultiple($pushId, $accountList)
484
    {
485
        $pushId = intval($pushId);
486
        $ret = ['ret_code' => -1];
487
        if ($pushId <= 0) {
488
            $ret['err_msg'] = 'pushId not valid';
489
490
            return $ret;
491
        }
492
        if (! is_array($accountList) || empty($accountList)) {
493
            $ret['err_msg'] = 'accountList not valid';
494
495
            return $ret;
496
        }
497
        $params = [];
498
        $params['access_id'] = $this->accessId;
499
        $params['push_id'] = $pushId;
500
        $params['account_list'] = json_encode($accountList);
501
        $params['timestamp'] = time();
502
503
        return $this->callRestful(self::RESTAPI_PUSHACCOUNTLISTMULTIPLE, $params);
504
    }
505
@@ 509-528 (lines=20) @@
506
    /**
507
     * 按Token大批量推送
508
     */
509
    public function PushDeviceListMultiple($pushId, $deviceList)
510
    {
511
        $pushId = intval($pushId);
512
        $ret = ['ret_code' => -1];
513
        if ($pushId <= 0) {
514
            $ret['err_msg'] = 'pushId not valid';
515
516
            return $ret;
517
        }
518
        if (! is_array($deviceList) || empty($deviceList)) {
519
            $ret['err_msg'] = 'deviceList not valid';
520
521
            return $ret;
522
        }
523
        $params = [];
524
        $params['access_id'] = $this->accessId;
525
        $params['push_id'] = $pushId;
526
        $params['device_list'] = json_encode($deviceList);
527
        $params['timestamp'] = time();
528
529
        return $this->callRestful(self::RESTAPI_PUSHDEVICELISTMULTIPLE, $params);
530
    }
531