Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

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