Code Duplication    Length = 18-19 lines in 2 locations

src/Card/Card.php 2 locations

@@ 723-740 (lines=18) @@
720
     *
721
     * @return \EasyWeChat\Support\Collection
722
     */
723
    public function createSubMerchant(array $info = [])
724
    {
725
        $params = [
726
            'info' => Arr::only($info, [
727
                'brand_name',
728
                'logo_url',
729
                'protocol',
730
                'end_time',
731
                'primary_category_id',
732
                'secondary_category_id',
733
                'agreement_media_id',
734
                'operator_media_id',
735
                'app_id',
736
            ]),
737
        ];
738
739
        return $this->parseJSON('json', [self::API_CREATE_SUB_MERCHANT, $params]);
740
    }
741
742
    /**
743
     * 更新子商户.
@@ 750-768 (lines=19) @@
747
     *
748
     * @return \EasyWeChat\Support\Collection
749
     */
750
    public function updateSubMerchant($merchantId, array $info = [])
751
    {
752
        $params = [
753
            'info' => array_merge(['merchant_id' => $merchantId],
754
                Arr::only($info, [
755
                    'brand_name',
756
                    'logo_url',
757
                    'protocol',
758
                    'end_time',
759
                    'primary_category_id',
760
                    'secondary_category_id',
761
                    'agreement_media_id',
762
                    'operator_media_id',
763
                    'app_id',
764
                ])),
765
        ];
766
767
        return $this->parseJSON('json', [self::API_UPDATE_SUB_MERCHANT, $params]);
768
    }
769
770
    /**
771
     * 获取子商户信息.