Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 310-313 (lines=4) @@
307
        $fileIds = $vars['ids'];
308
        $files = $this->getList()->filter("ID", $fileIds)->toArray();
309
310
        if (!count($files)) {
311
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
312
                ->addHeader('Content-Type', 'application/json');
313
        }
314
315
        if (!min(array_map(function (File $file) {
316
            return $file->canArchive();
@@ 968-971 (lines=4) @@
965
        /** @var File $record */
966
        $record = $this->getList()->filter('ID', $id)->first();
967
968
        if (!$record) {
969
            return (new HTTPResponse(json_encode(['status' => 'error']), 404))
970
                ->addHeader('Content-Type', 'application/json');
971
        }
972
973
        if (!$record->canEdit() || ($doPublish && !$record->canPublish())) {
974
            return (new HTTPResponse(json_encode(['status' => 'error']), 401))