Adds the ability for customers to update their passwords through a new action and input/output classes.
22 lines
524 B
PHP
22 lines
524 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Actions\Crm;
|
|
|
|
use App\Contracts\ActionInput;
|
|
use Webmozart\Assert\Assert;
|
|
|
|
final readonly class UpdateCustomerPasswordInput implements ActionInput
|
|
{
|
|
public function __construct(
|
|
#[\SensitiveParameter]
|
|
public string $currentPassword,
|
|
#[\SensitiveParameter]
|
|
public string $newPassword,
|
|
) {
|
|
Assert::notEmpty($currentPassword);
|
|
Assert::notEmpty($newPassword);
|
|
Assert::notSame($currentPassword, $newPassword);
|
|
}
|
|
}
|