Code Duplication    Length = 18-19 lines in 2 locations

src/Card/Card.php 2 locations

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