Code Duplication    Length = 12-12 lines in 2 locations

src/Client/Cosapi.php 2 locations

@@ 213-224 (lines=12) @@
210
     *
211
     * @return array
212
     */
213
    public static function delFolder($bucket, $folder)
214
    {
215
        if (empty($bucket) || empty($folder)) {
216
            return [
217
                'code'    => ErrorCode::COSAPI_PARAMS_ERROR,
218
                'message' => 'bucket or path is empty', ];
219
        }
220
221
        $folder = self::normalizerPath($folder, true);
222
223
        return self::delBase($bucket, $folder);
224
    }
225
226
    /**
227
     * 更新文件.
@@ 272-283 (lines=12) @@
269
     *
270
     * @return array
271
     */
272
    public static function delFile($bucket, $path)
273
    {
274
        if (empty($bucket) || empty($path)) {
275
            return [
276
                'code'    => ErrorCode::COSAPI_PARAMS_ERROR,
277
                'message' => 'path is empty', ];
278
        }
279
280
        $path = self::normalizerPath($path);
281
282
        return self::delBase($bucket, $path);
283
    }
284
285
    /**
286
     * 内部方法, 上传文件.