Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

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