Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

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