Skip to content

Commit f0267ab

Browse files
bonroyagederrabus
authored andcommitted
Code style change in @PER-CS2.0 affecting @Symfony (parentheses for anonymous classes)
1 parent 9c4dd53 commit f0267ab

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Tests/Authorization/AccessDecisionManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testVoterCalls()
3939
$this->getUnexpectedVoter(),
4040
];
4141

42-
$strategy = new class() implements AccessDecisionStrategyInterface {
42+
$strategy = new class implements AccessDecisionStrategyInterface {
4343
public function decide(\Traversable $results): bool
4444
{
4545
$i = 0;

Tests/Authorization/Voter/AuthenticatedVoterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function getToken($authenticated)
9090
$user = new InMemoryUser('wouter', '', ['ROLE_USER']);
9191

9292
if ('fully' === $authenticated) {
93-
$token = new class() extends AbstractToken {
93+
$token = new class extends AbstractToken {
9494
public function getCredentials()
9595
{
9696
}

Tests/Authorization/Voter/VoterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static function getTests(): array
4141

4242
[$voter, ['DELETE'], VoterInterface::ACCESS_ABSTAIN, new \stdClass(), 'ACCESS_ABSTAIN if no attribute is supported'],
4343

44-
[$voter, ['EDIT'], VoterInterface::ACCESS_ABSTAIN, new class() {}, 'ACCESS_ABSTAIN if class is not supported'],
44+
[$voter, ['EDIT'], VoterInterface::ACCESS_ABSTAIN, new class {}, 'ACCESS_ABSTAIN if class is not supported'],
4545

4646
[$voter, ['EDIT'], VoterInterface::ACCESS_ABSTAIN, null, 'ACCESS_ABSTAIN if object is null'],
4747

0 commit comments

Comments
 (0)