[CS][DX] Refactor

This commit is contained in:
Sylius Bot 2024-10-18 02:27:31 +00:00 committed by GitHub
parent 5dd143f736
commit cb825fac1f
3 changed files with 2 additions and 3 deletions

View file

@ -96,7 +96,7 @@ final class ChangeAdminPasswordContext implements Context
Assert::same(
$adminUser->getPassword(),
$this->userPasswordHasher->hashPassword($adminUser, $adminUser->getPlainPassword())
$this->userPasswordHasher->hashPassword($adminUser, $adminUser->getPlainPassword()),
);
}
}

View file

@ -23,7 +23,6 @@ use Sylius\Component\User\Security\Generator\GeneratorInterface;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
use Symfony\Component\Security\Core\User\UserInterface;
use Webmozart\Assert\Assert;
final readonly class UserRegistrationListener

View file

@ -33,7 +33,7 @@ final class PasswordUpdaterSpec extends ObjectBehavior
function it_updates_user_profile_with_hashed_password(
UserPasswordHasherInterface $userPasswordHasher,
UserInterface $user
UserInterface $user,
): void {
$user->getPlainPassword()->willReturn('topSecretPlainPassword');
$userPasswordHasher->hashPassword($user, 'topSecretPlainPassword')->willReturn('topSecretHashedPassword');