Code Duplication    Length = 18-19 lines in 2 locations

src/Card/Card.php 2 locations

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