Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function setTemplateVariables( |
||
23 | PlanetFieldHostInterface $host, |
||
24 | GameControllerInterface $game |
||
25 | ): void { |
||
26 | |||
27 | foreach (BuildMenuEnum::BUILDMENU_IDS as $id) { |
||
28 | $menus[$id]['buildings'] = $this->buildingRepository->getByColonyAndUserAndBuildMenu( |
||
29 | $host, |
||
30 | $game->getUser()->getId(), |
||
31 | $id, |
||
32 | 0 |
||
33 | ); |
||
34 | |||
35 | $menus[$id]['name'] = BuildMenuEnum::getDescription($id); |
||
36 | } |
||
37 | |||
38 | $game->setTemplateVar('BUILD_MENUS', $menus); |
||
|
|||
39 | } |
||
41 |