| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function handle(GameControllerInterface $game): void |
||
| 23 | { |
||
| 24 | $colonyScan = $this->colonyScanRepository->find(request::getIntFatal('id')); |
||
| 25 | |||
| 26 | if ( |
||
| 27 | $colonyScan === null |
||
| 28 | || $colonyScan->getUser() !== $game->getUser() |
||
| 29 | ) { |
||
| 30 | return; |
||
| 31 | } |
||
| 32 | |||
| 33 | $this->colonyScanRepository->delete($colonyScan); |
||
| 34 | $game->setView(Noop::VIEW_IDENTIFIER); |
||
| 35 | } |
||
| 42 |