Code Duplication    Length = 6-6 lines in 2 locations

src/Client/Cosapi.php 2 locations

@@ 419-424 (lines=6) @@
416
        }
417
        $data['pattern'] = $pattern;
418
419
        if ($order != 0 && $order != 1) {
420
            return [
421
                'code'    => ErrorCode::COSAPI_PARAMS_ERROR,
422
                'message' => 'parameter order invalid',
423
            ];
424
        }
425
        $data['order'] = $order;
426
427
        if ($num < 0 || $num > 199) {
@@ 427-432 (lines=6) @@
424
        }
425
        $data['order'] = $order;
426
427
        if ($num < 0 || $num > 199) {
428
            return [
429
                'code'    => ErrorCode::COSAPI_PARAMS_ERROR,
430
                'message' => 'parameter num invalid, num need less then 200',
431
            ];
432
        }
433
        $data['num'] = $num;
434
435
        if (isset($context)) {