Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

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