Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 303-306 (lines=4) @@
300
        $fileIds = $vars['ids'];
301
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
302
303
        if (!count($files)) {
304
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
305
                ->addHeader('Content-Type', 'application/json');
306
        }
307
308
        if (!min(array_map(function (File $file) {
309
            return $file->canArchive();
@@ 873-876 (lines=4) @@
870
        /** @var File $record */
871
        $record = $this->getList()->filter('ID', $id)->first();
872
873
        if (!$record) {
874
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
875
                ->addHeader('Content-Type', 'application/json');
876
        }
877
878
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
879
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))