Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| LoginCommand | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Modules\User\Application\Command; |
| 6 | |
| 7 | /** |
| 8 | * User Login Command DTO. |
| 9 | * |
| 10 | * Encapsulates credentials and client metadata submitted from login form. |
| 11 | * |
| 12 | * @package App\Modules\User\Application\Command |
| 13 | */ |
| 14 | final readonly class LoginCommand |
| 15 | { |
| 16 | /** |
| 17 | * LoginCommand constructor. |
| 18 | * |
| 19 | * @param string $login User login or email address. |
| 20 | * @param string $password Submitted plain-text password. |
| 21 | * @param string $ipAddress Client IP address. |
| 22 | * @param string|null $userAgent Client User-Agent string. |
| 23 | * @param string|null $httpProtocol HTTP protocol version string. |
| 24 | */ |
| 25 | public function __construct( |
| 26 | public string $login, |
| 27 | public string $password, |
| 28 | public string $ipAddress = '127.0.0.1', |
| 29 | public ?string $userAgent = null, |
| 30 | public ?string $httpProtocol = null |
| 31 | ) { |
| 32 | } |
| 33 | } |