| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class GenerateEmptySystems implements ActionControllerInterface |
||
| 14 | { |
||
| 15 | public const ACTION_IDENTIFIER = 'GENERATE_EMPTY_SYSTEMS'; |
||
| 16 | |||
| 17 | private GenerateEmptySystemsInterface $generateEmptySystems; |
||
| 18 | |||
| 19 | public function __construct( |
||
| 20 | GenerateEmptySystemsInterface $generateEmptySystems, |
||
| 21 | ) { |
||
| 22 | $this->generateEmptySystems = $generateEmptySystems; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function handle(GameControllerInterface $game): void |
||
| 26 | { |
||
| 27 | $game->setView(ShowMapEditor::VIEW_IDENTIFIER); |
||
| 28 | |||
| 29 | $count = $this->generateEmptySystems->generate(request::getInt('layerid')); |
||
| 30 | |||
| 31 | $game->addInformation(sprintf('Es wurden %d Systeme generiert.', $count)); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function performSessionCheck(): bool |
||
| 37 | } |
||
| 38 | } |
||
| 39 |