Skip to content

Commit

Permalink
Merge pull request #1309 from seb-jean/patch-1
Browse files Browse the repository at this point in the history
Apply `get_class_to_class_keyword` PHP-CS-Fixer rule
  • Loading branch information
jrushlow authored May 23, 2023
2 parents b1e6940 + a7b2328 commit f9faffb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Resources/skeleton/doctrine/Repository.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function remove(<?= $entity_class_name ?> $entity, bool $flush = false):
public function upgradePassword(<?= sprintf('%s ', $password_upgrade_user_interface->getShortName()); ?>$user, string $newHashedPassword): void
{
if (!$user instanceof <?= $entity_class_name ?>) {
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', \get_class($user)));
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', $user::class));
}

$user->setPassword($newHashedPassword);
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/skeleton/security/UserProvider.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function loadUserByUsername($username): UserInterface
public function refreshUser(UserInterface $user): UserInterface
{
if (!$user instanceof <?= $user_short_name ?>) {
throw new UnsupportedUserException(sprintf('Invalid user class "%s".', get_class($user)));
throw new UnsupportedUserException(sprintf('Invalid user class "%s".', $user::class));
}

// Return a User object after making sure its data is "fresh".
Expand Down

0 comments on commit f9faffb

Please sign in to comment.