Skip to content

Commit 8347ac1

Browse files
Enable "native_constant_invocation" CS rule
1 parent 54bf96a commit 8347ac1

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

Authentication/Token/AbstractToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function __toString()
233233
protected function doSerialize($serialized, $isCalledFromOverridingMethod)
234234
{
235235
if (null === $isCalledFromOverridingMethod) {
236-
$trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 3);
236+
$trace = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 3);
237237
$isCalledFromOverridingMethod = isset($trace[2]['function'], $trace[2]['object']) && 'serialize' === $trace[2]['function'] && $this === $trace[2]['object'];
238238
}
239239

Authorization/AccessDecisionManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct($voters = [], $strategy = self::STRATEGY_AFFIRMATIVE
6262
*/
6363
public function setVoters(array $voters)
6464
{
65-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Pass the voters to the constructor instead.', __METHOD__), E_USER_DEPRECATED);
65+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Pass the voters to the constructor instead.', __METHOD__), \E_USER_DEPRECATED);
6666

6767
$this->voters = $voters;
6868
}
@@ -191,7 +191,7 @@ private function vote($voter, TokenInterface $token, $subject, $attributes)
191191
}
192192

193193
if (method_exists($voter, 'vote')) {
194-
@trigger_error(sprintf('Calling vote() on an voter without %1$s is deprecated as of 3.4 and will be removed in 4.0. Implement the %1$s on your voter.', VoterInterface::class), E_USER_DEPRECATED);
194+
@trigger_error(sprintf('Calling vote() on an voter without %1$s is deprecated as of 3.4 and will be removed in 4.0. Implement the %1$s on your voter.', VoterInterface::class), \E_USER_DEPRECATED);
195195

196196
// making the assumption that the signature matches
197197
return $voter->vote($token, $subject, $attributes);

Authorization/TraceableAccessDecisionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function decide(TokenInterface $token, array $attributes, $object = null)
6767
*/
6868
public function setVoters(array $voters)
6969
{
70-
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Pass voters to the decorated AccessDecisionManager instead.', __METHOD__), E_USER_DEPRECATED);
70+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Pass voters to the decorated AccessDecisionManager instead.', __METHOD__), \E_USER_DEPRECATED);
7171

7272
if (!method_exists($this->manager, 'setVoters')) {
7373
return;

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

Encoder/BCryptPasswordEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function encodePassword($raw, $salt)
7171
// Ignore $salt, the auto-generated one is always the best
7272
}
7373

74-
return password_hash($raw, PASSWORD_BCRYPT, $options);
74+
return password_hash($raw, \PASSWORD_BCRYPT, $options);
7575
}
7676

7777
/**

Exception/AuthenticationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function serialize()
6060
protected function doSerialize($serialized, $isCalledFromOverridingMethod)
6161
{
6262
if (null === $isCalledFromOverridingMethod) {
63-
$trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 3);
63+
$trace = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 3);
6464
$isCalledFromOverridingMethod = isset($trace[2]['function'], $trace[2]['object']) && 'serialize' === $trace[2]['function'] && $this === $trace[2]['object'];
6565
}
6666

Exception/NonceExpiredException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Security\Core\Exception;
1313

14-
@trigger_error(sprintf('The %s class and the whole HTTP digest authentication system is deprecated since Symfony 3.4 and will be removed in 4.0.', NonceExpiredException::class), E_USER_DEPRECATED);
14+
@trigger_error(sprintf('The %s class and the whole HTTP digest authentication system is deprecated since Symfony 3.4 and will be removed in 4.0.', NonceExpiredException::class), \E_USER_DEPRECATED);
1515

1616
/**
1717
* NonceExpiredException is thrown when an authentication is rejected because

0 commit comments

Comments
 (0)