Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 315-318 (lines=4) @@
312
        $fileIds = $vars['ids'];
313
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
314
315
        if (!count($files)) {
316
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
317
                ->addHeader('Content-Type', 'application/json');
318
        }
319
320
        if (!min(array_map(function (File $file) {
321
            return $file->canArchive();
@@ 988-991 (lines=4) @@
985
        /** @var File $record */
986
        $record = $this->getList()->filter('ID', $id)->first();
987
988
        if (!$record) {
989
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
990
                ->addHeader('Content-Type', 'application/json');
991
        }
992
993
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
994
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))