Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 2423baf

Browse files
committed
Fix CS
1 parent d82fa1e commit 2423baf

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Core/Authentication/Token/AbstractToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function setAttribute($name, $value)
216216
*/
217217
public function __toString()
218218
{
219-
$class = \get_class($this);
219+
$class = static::class;
220220
$class = substr($class, strrpos($class, '\\') + 1);
221221

222222
$roles = [];

Core/Encoder/Argon2iPasswordEncoder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static function isSupported()
2626
return true;
2727
}
2828

29-
return version_compare(\extension_loaded('sodium') ? \SODIUM_LIBRARY_VERSION : phpversion('libsodium'), '1.0.9', '>=');
29+
return version_compare(\extension_loaded('sodium') ? SODIUM_LIBRARY_VERSION : phpversion('libsodium'), '1.0.9', '>=');
3030
}
3131

3232
/**
@@ -79,15 +79,15 @@ public function isPasswordValid($encoded, $raw, $salt)
7979

8080
private function encodePasswordNative($raw)
8181
{
82-
return password_hash($raw, \PASSWORD_ARGON2I);
82+
return password_hash($raw, PASSWORD_ARGON2I);
8383
}
8484

8585
private function encodePasswordSodiumFunction($raw)
8686
{
8787
$hash = sodium_crypto_pwhash_str(
8888
$raw,
89-
\SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE,
90-
\SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE
89+
SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE,
90+
SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE
9191
);
9292
sodium_memzero($raw);
9393

Guard/AbstractGuardAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ abstract class AbstractGuardAuthenticator implements AuthenticatorInterface
2727
*/
2828
public function supports(Request $request)
2929
{
30-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0. Implement the "%s::supports()" method in class "%s" instead.', __METHOD__, AuthenticatorInterface::class, \get_class($this)), E_USER_DEPRECATED);
30+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0. Implement the "%s::supports()" method in class "%s" instead.', __METHOD__, AuthenticatorInterface::class, static::class), E_USER_DEPRECATED);
3131

3232
return true;
3333
}

Guard/Authenticator/AbstractFormLoginAuthenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
6161
*/
6262
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
6363
{
64-
@trigger_error(sprintf('The AbstractFormLoginAuthenticator::onAuthenticationSuccess() implementation was deprecated in Symfony 3.1 and will be removed in Symfony 4.0. You should implement this method yourself in %s and remove getDefaultSuccessRedirectUrl().', \get_class($this)), E_USER_DEPRECATED);
64+
@trigger_error(sprintf('The AbstractFormLoginAuthenticator::onAuthenticationSuccess() implementation was deprecated in Symfony 3.1 and will be removed in Symfony 4.0. You should implement this method yourself in %s and remove getDefaultSuccessRedirectUrl().', static::class), E_USER_DEPRECATED);
6565

6666
if (!method_exists($this, 'getDefaultSuccessRedirectUrl')) {
67-
throw new \Exception(sprintf('You must implement onAuthenticationSuccess() or getDefaultSuccessRedirectUrl() in %s.', \get_class($this)));
67+
throw new \Exception(sprintf('You must implement onAuthenticationSuccess() or getDefaultSuccessRedirectUrl() in %s.', static::class));
6868
}
6969

7070
$targetPath = null;

Http/Logout/LogoutUrlGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function registerListener($key, $logoutPath, $csrfTokenId, $csrfParameter
5252
if (\func_num_args() >= 6) {
5353
$context = func_get_arg(5);
5454
} else {
55-
if (__CLASS__ !== \get_class($this)) {
55+
if (__CLASS__ !== static::class) {
5656
$r = new \ReflectionMethod($this, __FUNCTION__);
5757
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
5858
@trigger_error(sprintf('The "%s()" method will have a 6th `string $context = null` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);

0 commit comments

Comments
 (0)