Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | final class FleetWarpSplit implements ActionControllerInterface |
||
16 | { |
||
17 | public const ACTION_IDENTIFIER = 'B_FLEET_WARP_SPLIT'; |
||
18 | |||
19 | private ActivatorDeactivatorHelperInterface $helper; |
||
20 | |||
21 | private ShipLoaderInterface $shipLoader; |
||
22 | |||
23 | public function __construct( |
||
29 | } |
||
30 | |||
31 | public function handle(GameControllerInterface $game): void |
||
32 | { |
||
33 | $this->helper->setWarpSplitFleet(request::indInt('id'), $game); |
||
34 | |||
35 | $userId = $game->getUser()->getId(); |
||
36 | |||
37 | $ship = $this->shipLoader->getByIdAndUser( |
||
38 | request::indInt('id'), |
||
39 | $userId |
||
40 | ); |
||
41 | |||
42 | if ($ship->isDestroyed()) { |
||
43 | return; |
||
44 | } |
||
45 | |||
46 | $game->setView(ShowShip::VIEW_IDENTIFIER); |
||
47 | } |
||
48 | |||
49 | public function performSessionCheck(): bool |
||
52 | } |
||
53 | } |
||
54 |