Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Anomaly\UsersModule\User\Register\Command; |
||
40 | public function handle() |
||
41 | { |
||
42 | /* @var UserInterface $user */ |
||
43 | $user = $this->builder->getFormEntry(); |
||
44 | |||
45 | foreach ($this->builder->getRoles() as $role) { |
||
46 | if ($role = $this->dispatch(new GetRole($role))) { |
||
47 | $user->attachRole($role); |
||
48 | } |
||
49 | } |
||
50 | } |
||
51 | } |
||
52 |