Code Duplication    Length = 6-6 lines in 2 locations

src/Client/Cosapi.php 2 locations

@@ 442-447 (lines=6) @@
439
        }
440
        $data['pattern'] = $pattern;
441
442
        if ($order != 0 && $order != 1) {
443
            return [
444
                'code'    => ErrorCode::COSAPI_PARAMS_ERROR,
445
                'message' => 'parameter order invalid',
446
            ];
447
        }
448
        $data['order'] = $order;
449
450
        if ($num < 0 || $num > 199) {
@@ 450-455 (lines=6) @@
447
        }
448
        $data['order'] = $order;
449
450
        if ($num < 0 || $num > 199) {
451
            return [
452
                'code'    => ErrorCode::COSAPI_PARAMS_ERROR,
453
                'message' => 'parameter num invalid, num need less then 200',
454
            ];
455
        }
456
        $data['num'] = $num;
457
458
        if (isset($context)) {