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 -4
View File
@@ -21,15 +21,15 @@ class GameController
public function getGame(): IContent
{
$mapId = (int) $this->request->query('mapId');
$data = $this->prepareGame($mapId);
return new HtmlContent('game', $data);
return new HtmlContent('game', $this->prepareGame($mapId));
}
public function getGameJson(): IContent
{
$mapId = (int) $this->request->query('mapId');
$data = $this->prepareGame($mapId);
return new JsonContent($data);
return new JsonContent($this->prepareGame($mapId));
}
private function prepareGame(int $mapId)