Code Duplication    Length = 18-19 lines in 2 locations

src/Card/Card.php 2 locations

@@ 685-702 (lines=18) @@
682
     *
683
     * @return array
684
     */
685
    public function createSubMerchant(array $info = [])
686
    {
687
        $params = [
688
            'info' => Arr::only($info, [
689
                    'brand_name',
690
                    'logo_url',
691
                    'protocol',
692
                    'end_time',
693
                    'primary_category_id',
694
                    'secondary_category_id',
695
                    'agreement_media_id',
696
                    'operator_media_id',
697
                    'app_id',
698
                ]),
699
        ];
700
701
        return $this->parseJSON('json', [self::API_CREATE_SUB_MERCHANT, $params]);
702
    }
703
704
    /**
705
     * 更新子商户.
@@ 712-730 (lines=19) @@
709
     *
710
     * @return array
711
     */
712
    public function updateSubMerchant($merchantId, array $info = [])
713
    {
714
        $params = [
715
            'info' => array_merge(['merchant_id' => $merchantId],
716
                Arr::only($info, [
717
                    'brand_name',
718
                    'logo_url',
719
                    'protocol',
720
                    'end_time',
721
                    'primary_category_id',
722
                    'secondary_category_id',
723
                    'agreement_media_id',
724
                    'operator_media_id',
725
                    'app_id',
726
                ])),
727
        ];
728
729
        return $this->parseJSON('json', [self::API_UPDATE_SUB_MERCHANT, $params]);
730
    }
731
732
    /**
733
     * 获取子商户信息.