Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 314-317 (lines=4) @@
311
        $fileIds = $vars['ids'];
312
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
313
314
        if (!count($files)) {
315
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
316
                ->addHeader('Content-Type', 'application/json');
317
        }
318
319
        if (!min(array_map(function (File $file) {
320
            return $file->canArchive();
@@ 936-939 (lines=4) @@
933
        /** @var File $record */
934
        $record = $this->getList()->filter('ID', $id)->first();
935
936
        if (!$record) {
937
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
938
                ->addHeader('Content-Type', 'application/json');
939
        }
940
941
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
942
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))