Skip to content

Commit f1b28f4

Browse files
committed
Fixed CS
1 parent bb9f496 commit f1b28f4

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function setUser($user)
100100
}
101101

102102
if (!$user instanceof UserInterface) {
103-
trigger_deprecation('symfony/security-core', '5.4', 'Using an object that is not an instance of "%s" as $user in "%s" is deprecated.', UserInterface::class, \get_class($this));
103+
trigger_deprecation('symfony/security-core', '5.4', 'Using an object that is not an instance of "%s" as $user in "%s" is deprecated.', UserInterface::class, static::class);
104104
}
105105

106106
// @deprecated since Symfony 5.4, remove the whole block if/elseif/else block in 6.0

src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct($user, /*string*/ $firewallName, /*array*/ $roles =
3535

3636
$credentials = $firewallName;
3737
$firewallName = $roles;
38-
$roles = \func_num_args() > 3 ? \func_get_arg(3) : [];
38+
$roles = \func_num_args() > 3 ? func_get_arg(3) : [];
3939
}
4040

4141
parent::__construct($roles);
@@ -44,7 +44,6 @@ public function __construct($user, /*string*/ $firewallName, /*array*/ $roles =
4444
throw new \InvalidArgumentException('$firewallName must not be empty.');
4545
}
4646

47-
4847
$this->setUser($user);
4948
$this->credentials = $credentials ?? null;
5049
$this->firewallName = $firewallName;

src/Symfony/Component/Security/Core/Authentication/Token/SwitchUserToken.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Security\Core\User\UserInterface;
1515

16-
1716
/**
1817
* Token representing a user who temporarily impersonates another one.
1918
*

src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class UsernamePasswordToken extends AbstractToken
3232
public function __construct($user, /*string*/ $firewallName, /*array*/ $roles = [])
3333
{
3434
if (\is_string($roles)) {
35-
trigger_deprecation('symfony/security-core', '5.4', 'The $credentials argument of "%s" is deprecated.', \get_class($this).'::__construct');
35+
trigger_deprecation('symfony/security-core', '5.4', 'The $credentials argument of "%s" is deprecated.', static::class.'::__construct');
3636

3737
$credentials = $firewallName;
3838
$firewallName = $roles;

src/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testEraseCredentials()
5656
{
5757
$token = new PreAuthenticatedToken('foo', 'bar', 'key');
5858
$token->eraseCredentials();
59-
$this->assertEquals(null, $token->getCredentials());
59+
$this->assertNull($token->getCredentials());
6060
}
6161

6262
/**

0 commit comments

Comments
 (0)