Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 332-335 (lines=4) @@
329
        $fileIds = $vars['ids'];
330
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
331
332
        if (!count($files)) {
333
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
334
                ->addHeader('Content-Type', 'application/json');
335
        }
336
337
        if (!min(array_map(function (File $file) {
338
            return $file->canArchive();
@@ 945-948 (lines=4) @@
942
        /** @var File $record */
943
        $record = $this->getList()->filter('ID', $id)->first();
944
945
        if (!$record) {
946
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
947
                ->addHeader('Content-Type', 'application/json');
948
        }
949
950
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
951
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))