| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | protected function execute(InputInterface $input, OutputInterface $output): int |
||
| 34 | { |
||
| 35 | $playerName = $input->getArgument('player'); |
||
| 36 | assert(is_string($playerName)); |
||
| 37 | |||
| 38 | $playerIO = new PlayerIO(new SymfonyStyle($input, $output)); |
||
| 39 | |||
| 40 | try { |
||
| 41 | $player = $this->playerState->load($playerName); |
||
|
|
|||
| 42 | } catch (PlayerStateException $exception) { |
||
| 43 | $playerIO->note("Player {$playerName} doesn't exist."); |
||
| 44 | return Command::FAILURE; |
||
| 45 | } |
||
| 46 | |||
| 47 | return Command::SUCCESS; |
||
| 48 | } |
||
| 50 |