MAPG-191 don't create separate variable for data where not necessary

This commit is contained in:
bence committed 2020-07-05 00:58:03 +02:00
1 parent e17cf68007
commit 6db6208896
8 files changed
+170 -132

No files matched your search

+4 -2
View File
@@ -46,8 +46,10 @@ class MapsController
}
$user = $this->request->user();
$data = ['maps' => $maps, 'isAdmin' => $user !== null && $user->hasPermission(IUser::PERMISSION_ADMIN)];
return new HtmlContent('maps', $data);
return new HtmlContent('maps', [
'maps' => $maps,
'isAdmin' => $user !== null && $user->hasPermission(IUser::PERMISSION_ADMIN)
]);
}
private function formatMapAreaForHuman(float $area): array