Code Duplication    Length = 13-17 lines in 3 locations

src/API/CardApi.php 3 locations

@@ 512-528 (lines=17) @@
509
     *
510
     * @return array
511
     */
512
    public function cardGet($card_id)
513
    {
514
        if (empty($card_id)) {
515
            $this->setError('缺少card_id');
516
517
            return false;
518
        }
519
520
        $queryStr            = [];
521
        $queryStr['card_id'] = $card_id;
522
523
        $this->apitype = 'card';
524
        $this->module  = 'get';
525
        $res           = $this->_post('', $queryStr);
526
527
        return $res;
528
    }
529
530
    /**
531
     * 批量查询卡列表
@@ 607-619 (lines=13) @@
604
     *
605
     * @return bool|array
606
     */
607
    public function paycellSet($card_id, $is_open = true)
608
    {
609
        $queryStr            = [];
610
        $queryStr['card_id'] = $card_id;
611
        $queryStr['is_open'] = $is_open;
612
613
        $this->apitype = 'card';
614
        $this->module  = 'paycell';
615
616
        $res = $this->_post('set', $queryStr);
617
618
        return $res;
619
    }
620
621
    /**
622
     * 修改库存接口
@@ 691-707 (lines=17) @@
688
     *
689
     * @return
690
     */
691
    public function cardDelete($card_id)
692
    {
693
        if (empty($card_id)) {
694
            $this->setError('缺少错误');
695
696
            return false;
697
        }
698
699
        $queryStr            = [];
700
        $queryStr['card_id'] = $card_id;
701
702
        $this->apitype = 'card';
703
        $this->module  = 'delete';
704
        $res           = $this->_post('', $queryStr);
705
706
        return $res;
707
    }
708
709
    /**
710
     * 设置卡券失效