Code Duplication    Length = 7-7 lines in 3 locations

src/Client/Cosapi.php 3 locations

@@ 353-359 (lines=7) @@
350
                continue;
351
            }
352
353
            if ($tryCount === self::MAX_RETRY_TIMES - 1) {
354
                return [
355
                    'code'       => $sliceUploading->getLastErrorCode(),
356
                    'message'    => $sliceUploading->getLastErrorMessage(),
357
                    'request_id' => $sliceUploading->getRequestId(),
358
                ];
359
            }
360
        }
361
362
        if (!$sliceUploading->performUploading()) {
@@ 362-368 (lines=7) @@
359
            }
360
        }
361
362
        if (!$sliceUploading->performUploading()) {
363
            return [
364
                'code'       => $sliceUploading->getLastErrorCode(),
365
                'message'    => $sliceUploading->getLastErrorMessage(),
366
                'request_id' => $sliceUploading->getRequestId(),
367
            ];
368
        }
369
370
        if (!$sliceUploading->finishUploading()) {
371
            return [
@@ 370-376 (lines=7) @@
367
            ];
368
        }
369
370
        if (!$sliceUploading->finishUploading()) {
371
            return [
372
                'code'       => $sliceUploading->getLastErrorCode(),
373
                'message'    => $sliceUploading->getLastErrorMessage(),
374
                'request_id' => $sliceUploading->getRequestId(),
375
            ];
376
        }
377
378
        return [
379
            'code'       => 0,