Code Duplication    Length = 18-19 lines in 2 locations

src/Card/Card.php 2 locations

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