Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 340-343 (lines=4) @@
337
        $fileIds = $vars['ids'];
338
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
339
340
        if (!count($files)) {
341
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
342
                ->addHeader('Content-Type', 'application/json');
343
        }
344
345
        if (!min(array_map(function (File $file) {
346
            return $file->canArchive();
@@ 1020-1023 (lines=4) @@
1017
        /** @var File $record */
1018
        $record = DataObject::get_by_id(File::class, $id);
1019
1020
        if (!$record) {
1021
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
1022
                ->addHeader('Content-Type', 'application/json');
1023
        }
1024
1025
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
1026
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))