| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function __invoke(RemoveMenuTranslationCommand $command) |
||
| 33 | { |
||
| 34 | $menu = $this->repository->menuOfId( |
||
| 35 | MenuId::generate( |
||
| 36 | $command->menuId() |
||
| 37 | ) |
||
| 38 | ); |
||
| 39 | if (!$menu instanceof Menu) { |
||
| 40 | throw new MenuDoesNotExistException(); |
||
| 41 | } |
||
| 42 | |||
| 43 | $menu->removeTranslation( |
||
| 44 | new Locale( |
||
| 45 | $command->locale() |
||
| 46 | ) |
||
| 47 | ); |
||
| 48 | $this->repository->persist($menu); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |