SchulIT /
idp-exchange-models
| 1 | <?php |
||
| 2 | |||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 3 | namespace SchulIT\IdpExchange\Request\Builder; |
||
| 4 | |||
| 5 | use SchulIT\IdpExchange\Request\UserRequest; |
||
| 6 | |||
| 7 | class UserRequestBuilder { |
||
|
0 ignored issues
–
show
|
|||
| 8 | /** |
||
|
0 ignored issues
–
show
|
|||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | private $username; |
||
|
0 ignored issues
–
show
|
|||
| 12 | |||
| 13 | /** |
||
|
0 ignored issues
–
show
|
|||
| 14 | * @param string $username |
||
|
0 ignored issues
–
show
|
|||
| 15 | * @return UserRequestBuilder |
||
|
0 ignored issues
–
show
|
|||
| 16 | */ |
||
| 17 | 1 | public function setUsername(string $username): UserRequestBuilder { |
|
|
0 ignored issues
–
show
|
|||
| 18 | 1 | $this->username = $username; |
|
| 19 | 1 | return $this; |
|
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
|
0 ignored issues
–
show
|
|||
| 23 | * @return UserRequest |
||
| 24 | */ |
||
| 25 | 1 | public function build(): UserRequest { |
|
|
0 ignored issues
–
show
|
|||
| 26 | 1 | $request = new UserRequest(); |
|
| 27 | 1 | $request->username = $this->username; |
|
| 28 | 1 | return $request; |
|
| 29 | } |
||
| 30 | } |