| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | protected function createUserGroups(OutputInterface $output): void |
||
| 34 | { |
||
| 35 | $command = $this->getApplication()->find('user:create-group'); |
||
| 36 | |||
| 37 | // Iterate roles and create user group for each one |
||
| 38 | foreach ($this->getRolesService()->getRoles() as $role) { |
||
| 39 | $arguments = [ |
||
| 40 | 'command' => 'user:create-group', |
||
| 41 | '--name' => $this->getRolesService()->getRoleLabel($role), |
||
| 42 | '--role' => $role, |
||
| 43 | '-n' => true, |
||
| 44 | ]; |
||
| 45 | |||
| 46 | $input = new ArrayInput($arguments); |
||
| 47 | $input->setInteractive(false); |
||
| 48 | |||
| 49 | $command->run($input, $output); |
||
| 50 | } |
||
| 53 |