Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 292-295 (lines=4) @@
289
        $fileIds = $vars['ids'];
290
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
291
292
        if (!count($files)) {
293
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
294
                ->addHeader('Content-Type', 'application/json');
295
        }
296
297
        if (!min(array_map(function (File $file) {
298
            return $file->canArchive();
@@ 754-757 (lines=4) @@
751
        /** @var File $record */
752
        $record = $this->getList()->filter('ID', $id)->first();
753
754
        if (!$record) {
755
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
756
                ->addHeader('Content-Type', 'application/json');
757
        }
758
759
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
760
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))