Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 335-338 (lines=4) @@
332
        $fileIds = $vars['ids'];
333
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
334
335
        if (!count($files)) {
336
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
337
                ->addHeader('Content-Type', 'application/json');
338
        }
339
340
        if (!min(array_map(function (File $file) {
341
            return $file->canArchive();
@@ 1015-1018 (lines=4) @@
1012
        /** @var File $record */
1013
        $record = DataObject::get_by_id(File::class, $id);
1014
1015
        if (!$record) {
1016
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
1017
                ->addHeader('Content-Type', 'application/json');
1018
        }
1019
1020
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
1021
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))