Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 358-361 (lines=4) @@
355
        $fileIds = $vars['ids'];
356
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
357
358
        if (!count($files)) {
359
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
360
                ->addHeader('Content-Type', 'application/json');
361
        }
362
363
        if (!min(array_map(function (File $file) {
364
            return $file->canArchive();
@@ 1031-1034 (lines=4) @@
1028
        /** @var File $record */
1029
        $record = $this->getList()->filter('ID', $id)->first();
1030
1031
        if (!$record) {
1032
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
1033
                ->addHeader('Content-Type', 'application/json');
1034
        }
1035
1036
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
1037
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))