| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 9 | public function handle(AddUserToGroupCommand $command) |
|
| 20 | { |
||
| 21 | 9 | $user = $this->userRepository->read($command->userId); |
|
| 22 | 9 | $group = $this->groupRepository->read($command->groupId); |
|
| 23 | |||
| 24 | 9 | $this->groupRepository->addUserToGroup($user, $group); |
|
| 25 | |||
| 26 | 9 | $group->addUser($user); |
|
| 27 | //$user->addGroup($group); //TODO: Here or in $group->addUser($user) itself? One or two events must be raised? Infinite loop? |
||
| 30 |