Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
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 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Modules\User\Application\Command; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | /** |
| 12 | * User Login Command DTO. |
| 13 | * |
| 14 | * Encapsulates credentials and client metadata submitted from login form. |
| 15 | * |
| 16 | * @package App\Modules\User\Application\Command |
| 17 | */ |
| 18 | final readonly class LoginCommand |
| 19 | { |
| 20 | /** |
| 21 | * LoginCommand constructor. |
| 22 | * |
| 23 | * @param string $login User login or email address. |
| 24 | * @param string $password Submitted plain-text password. |
| 25 | * @param string $ipAddress Client IP address. |
| 26 | * @param string|null $userAgent Client User-Agent string. |
| 27 | * @param string|null $httpProtocol HTTP protocol version string. |
| 28 | */ |
| 29 | public function __construct( |
| 30 | public string $login, |
| 31 | public string $password, |
| 32 | public string $ipAddress = '127.0.0.1', |
| 33 | public ?string $userAgent = null, |
| 34 | public ?string $httpProtocol = null, |
| 35 | public ?string $requestId = null, |
| 36 | ) { |
| 37 | } |
| 38 | } |