Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 313-316 (lines=4) @@
310
        $fileIds = $vars['ids'];
311
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
312
313
        if (!count($files)) {
314
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
315
                ->addHeader('Content-Type', 'application/json');
316
        }
317
318
        if (!min(array_map(function (File $file) {
319
            return $file->canArchive();
@@ 971-974 (lines=4) @@
968
        /** @var File $record */
969
        $record = $this->getList()->filter('ID', $id)->first();
970
971
        if (!$record) {
972
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
973
                ->addHeader('Content-Type', 'application/json');
974
        }
975
976
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
977
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))