Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 310-313 (lines=4) @@
307
        $fileIds = $vars['ids'];
308
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
309
310
        if (!count($files)) {
311
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
312
                ->addHeader('Content-Type', 'application/json');
313
        }
314
315
        if (!min(array_map(function (File $file) {
316
            return $file->canArchive();
@@ 887-890 (lines=4) @@
884
        /** @var File $record */
885
        $record = $this->getList()->filter('ID', $id)->first();
886
887
        if (!$record) {
888
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
889
                ->addHeader('Content-Type', 'application/json');
890
        }
891
892
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
893
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))