| 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 | 5 | public function handle(AddGroupToUserCommand $command) |
|
| 20 | { |
||
| 21 | 5 | $group = $this->groupRepository->read($command->groupId); |
|
| 22 | 5 | $user = $this->userRepository->read($command->userId); |
|
| 23 | |||
| 24 | 5 | $this->userRepository->addGroupToUser($group, $user); |
|
| 25 | |||
| 26 | 5 | $user->addGroup($group); |
|
| 27 | 5 | } |
|
| 29 |