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 | 7 | public function handle(AddRoleToModuleCommand $command) |
|
20 | { |
||
21 | 7 | $role = $this->roleRepository->read($command->roleId); |
|
22 | 7 | $module = $this->moduleRepository->read($command->moduleId); |
|
23 | |||
24 | 7 | $this->moduleRepository->addRoleToModule($role, $module); |
|
25 | |||
26 | 7 | $module->addRole($role); |
|
27 | 7 | } |
|
29 |