| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | final class CreateUser implements CommandProtocol |
||
| 21 | { |
||
| 22 | private NameField $username; |
||
| 23 | private EmailField $email; |
||
| 24 | private string $password; |
||
| 25 | private array $roles; |
||
| 26 | |||
| 27 | public function __construct( |
||
| 28 | NameField $username, |
||
| 29 | EmailField $email, |
||
| 30 | string $password, |
||
| 31 | array $roles = [] |
||
| 32 | ) { |
||
| 33 | $this->username = $username; |
||
| 34 | $this->email = $email; |
||
| 35 | $this->password = $password; |
||
| 36 | $this->roles = $roles; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function username(): NameField |
||
| 40 | { |
||
| 41 | return $this->username; |
||
| 42 | } |
||
| 43 | |||
| 44 | public function email(): EmailField |
||
| 45 | { |
||
| 46 | return $this->email; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function password(): string |
||
| 52 | } |
||
| 53 | |||
| 54 | public function roles(): array |
||
| 57 | } |
||
| 58 | } |
||
| 59 |