Code Duplication    Length = 8-10 lines in 5 locations

src/Card/Card.php 5 locations

@@ 227-235 (lines=9) @@
224
     *
225
     * @return \EntWeChat\Support\Collection
226
     */
227
    public function checkCode($cardId, $code)
228
    {
229
        $params = [
230
            'card_id' => $cardId,
231
            'code'    => $code,
232
        ];
233
234
        return $this->parseJSON('json', [self::API_CHECK_CODE, $params]);
235
    }
236
237
    /**
238
     * 查询Code接口.
@@ 246-255 (lines=10) @@
243
     *
244
     * @return \EntWeChat\Support\Collection
245
     */
246
    public function getCode($code, $checkConsume, $cardId)
247
    {
248
        $params = [
249
            'code'          => $code,
250
            'check_consume' => $checkConsume,
251
            'card_id'       => $cardId,
252
        ];
253
254
        return $this->parseJSON('json', [self::API_GET_CODE, $params]);
255
    }
256
257
    /**
258
     * 核销Code接口.
@@ 289-296 (lines=8) @@
286
     *
287
     * @return \EntWeChat\Support\Collection
288
     */
289
    public function getHtml($cardId)
290
    {
291
        $params = [
292
            'card_id' => $cardId,
293
        ];
294
295
        return $this->parseJSON('json', [self::API_GET_HTML, $params]);
296
    }
297
298
    /**
299
     * 查看卡券详情.
@@ 305-312 (lines=8) @@
302
     *
303
     * @return \EntWeChat\Support\Collection
304
     */
305
    public function getCard($cardId)
306
    {
307
        $params = [
308
            'card_id' => $cardId,
309
        ];
310
311
        return $this->parseJSON('json', [self::API_GET_CARD, $params]);
312
    }
313
314
    /**
315
     * 批量查询卡列表.
@@ 387-394 (lines=8) @@
384
     *
385
     * @return \EntWeChat\Support\Collection
386
     */
387
    public function delete($cardId)
388
    {
389
        $params = [
390
            'card_id' => $cardId,
391
        ];
392
393
        return $this->parseJSON('json', [self::API_DELETE_CARD, $params]);
394
    }
395
396
    /**
397
     * Set cache manager.