8000 Executed rector · symfony/symfony@24b4a1e · GitHub
[go: up one dir, main page]

Skip to content

Commit 24b4a1e

Browse files
committed
Executed rector
1 parent e3be578 commit 24b4a1e

11 files changed

+18
-18
lines changed

src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function decide(\Traversable $results): bool
7272
$manager->decide($token, ['ROLE_FOO']);
7373
}
7474

75-
public function provideBadVoterResults(): array
75+
public static function provideBadVoterResults(): array
7676
{
7777
return [
7878
[3],

src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function testIsGranted($decide)
117117
$this->assertSame($decide, $this->authorizationChecker->isGranted('ROLE_FOO'));
118118
}
119119

120-
public function isGrantedProvider()
120+
public static function isGrantedProvider()
121121
{
122122
return [[true], [false]];
123123
}

src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testIsAuthenticated($token, $expression, $result)
4545
$this->assertEquals($result, $expressionLanguage->evaluate($expression, $context));
4646
}
4747

48-
public function provider()
48+
public static function provider()
4949
{
5050
$roles = ['ROLE_USER', 'ROLE_ADMIN'];
5151
$user = new InMemoryUser('username', 'password', $roles);
@@ -85,7 +85,7 @@ public function testLegacyIsAuthenticated($token, $expression, $result)
8585
/**
8686
* @group legacy
8787
*/
88-
public function legacyProvider()
88+
public static function legacyProvider()
8989
{
9090
$roles = ['ROLE_USER', 'ROLE_ADMIN'];
9191
$user = new InMemoryUser('username', 'password', $roles);

src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testVote($authenticated, $attributes, $expected)
3333
$this->assertSame($expected, $voter->vote($this->getToken($authenticated), null, $attributes));
3434
}
3535

36-
public function getVoteTests()
36+
public static function getVoteTests()
3737
{
3838
return [
3939
['fully', [], VoterInterface::ACCESS_ABSTAIN],
@@ -62,7 +62,7 @@ public function testLegacyVote($authenticated, $attributes, $expected)
6262
$this->testVote($authenticated, $attributes, $expected);
6363
}
6464

65-
public function getLegacyVoteTests()
65+
public static function getLegacyVoteTests()
6666
{
6767
return [
6868
['anonymously', [], VoterInterface::ACCESS_ABSTAIN],
@@ -93,7 +93,7 @@ public function testSupportsAttribute(string $attribute, bool $expected)
9393
$this->assertSame($expected, $voter->supportsAttribute($attribute));
9494
}
9595

96-
public function provideAttributes()
96+
public static function provideAttributes()
9797
{
9898
yield [AuthenticatedVoter::IS_AUTHENTICATED_FULLY, true];
9999
yield [AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED, true];

src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testVoteUsingTokenThatReturnsRoleNames($roles, $attributes, $exp
2727
$this->assertSame($expected, $voter->vote($this->getTokenWithRoleNames($roles), null, $attributes));
2828
}
2929

30-
public function getVoteTests()
30+
public static function getVoteTests()
3131
{
3232
return array_merge(parent::getVoteTests(), [
3333
[['ROLE_FOO'], ['ROLE_FOOBAR'], VoterInterface::ACCESS_GRANTED],
@@ -44,7 +44,7 @@ public function testVoteWithEmptyHierarchyUsingTokenThatReturnsRoleNames($roles,
4444
$this->assertSame($expected, $voter->vote($this->getTokenWithRoleNames($roles), null, $attributes));
4545
}
4646

47-
public function getVoteWithEmptyHierarchyTests()
47+
public static function getVoteWithEmptyHierarchyTests()
4848
{
4949
return parent::getVoteTests();
5050
}

src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testVoteUsingTokenThatReturnsRoleNames($roles, $attributes, $exp
3333
$this->assertSame($expected, $voter->vote($this->getTokenWithRoleNames($roles), null, $attributes));
3434
}
3535

36-
public function getVoteTests()
36+
public static function getVoteTests()
3737
{
3838
return [
3939
[[], [], VoterInterface::ACCESS_ABSTAIN],
@@ -70,7 +70,7 @@ public function testSupportsAttribute(string $prefix, string $attribute, bool $e
7070
$this->assertSame($expected, $voter->supportsAttribute($attribute));
7171
}
7272

73-
public function provideAttributes()
73+
public static function provideAttributes()
7474
{
7575
yield ['ROLE_', 'ROLE_foo', true];
7676
yield ['ROLE_', 'ROLE_', true];

src/Symfony/Component/Security/Core/Tests/Encoder/NativePasswordEncoderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testCostInRange($cost)
4040
$this->assertInstanceOf(NativePasswordEncoder::class, new NativePasswordEncoder(null, null, $cost));
4141
}
4242

43-
public function validRangeData()
43+
public static function validRangeData()
4444
{
4545
$costs = range(4, 31);
4646
array_walk($costs, function (&$cost) { $cost = [$cost]; });

src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testTranslationFileIsValidWithoutEntityLoader($filePath)
4545
$this->assertCount(0, $errors, sprintf('"%s" is invalid:%s', $filePath, \PHP_EOL.implode(\PHP_EOL, array_column($errors, 'message'))));
4646
}
4747

48-
public function provideTranslationFiles()
48+
public static function provideTranslationFiles()
4949
{
5050
return array_map(
5151
function ($filePath) { return (array) $filePath; },

src/Symfony/Component/Security/Core/Tests/SecurityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testGetUser($userInToken, $expectedUser)
5959
$this->assertSame($expectedUser, $security->getUser());
6060
}
6161

62-
public function getUserTests()
62+
public static function getUserTests()
6363
{
6464
yield [null, null];
6565

@@ -70,7 +70,7 @@ public function getUserTests()
7070
/**
7171
* @group legacy
7272
*/
73-
public function getLegacyUserTests()
73+
public static function getLegacyUserTests()
7474
{
7575
yield ['string_username', null];
7676

src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testValidatedByService(UserPassword $constraint)
3333
self::assertSame('my_service', $constraint->validatedBy());
3434
}
3535

36-
public function provideServiceValidatedConstraints(): iterable
36+
public static function provideServiceValidatedConstraints(): iterable
3737
{
3838
yield 'Doctrine style' => [new UserPassword(['service' => 'my_service'])];
3939

src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function testPasswordIsNotValid(UserPassword $constraint)
9090
->assertRaised();
9191
}
9292

93-
public function provideConstraints(): iterable
93+
public static function provideConstraints(): iterable
9494
{
9595
yield 'Doctrine style' => [new UserPassword(['message' => 'myMessage'])];
9696

@@ -114,7 +114,7 @@ public function testEmptyPasswordsAreNotValid($password)
114114
->assertRaised();
115115
}
116116

117-
public function emptyPasswordData()
117+
public static function emptyPasswordData()
118118
{
119119
return [
120120
[null],

0 commit comments

Comments
 (0)
0