Code Duplication    Length = 18-19 lines in 2 locations

src/Card/Card.php 2 locations

@@ 670-687 (lines=18) @@
667
     *
668
     * @return array
669
     */
670
    public function createSubMerchant(array $info = [])
671
    {
672
        $params = [
673
            'info' => Arr::only($info, [
674
                    'brand_name',
675
                    'logo_url',
676
                    'protocol',
677
                    'end_time',
678
                    'primary_category_id',
679
                    'secondary_category_id',
680
                    'agreement_media_id',
681
                    'operator_media_id',
682
                    'app_id',
683
                ]),
684
        ];
685
686
        return $this->parseJSON('json', [self::API_CREATE_SUB_MERCHANT, $params]);
687
    }
688
689
    /**
690
     * 更新子商户.
@@ 697-715 (lines=19) @@
694
     *
695
     * @return array
696
     */
697
    public function updateSubMerchant($merchantId, array $info = [])
698
    {
699
        $params = [
700
            'info' => array_merge(['merchant_id' => $merchantId],
701
                Arr::only($info, [
702
                    'brand_name',
703
                    'logo_url',
704
                    'protocol',
705
                    'end_time',
706
                    'primary_category_id',
707
                    'secondary_category_id',
708
                    'agreement_media_id',
709
                    'operator_media_id',
710
                    'app_id',
711
                ])),
712
        ];
713
714
        return $this->parseJSON('json', [self::API_UPDATE_SUB_MERCHANT, $params]);
715
    }
716
717
    /**
718
     * 获取子商户信息.