Skip to content

Commit f28c925

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

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Tests/Service/ServiceMethodsSubscriberTraitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testParentNotCalledIfHasMagicCall()
4646
$container = new class([]) implements ContainerInterface {
4747
use ServiceLocatorTrait;
4848
};
49-
$service = new class() extends ParentWithMagicCall {
49+
$service = new class extends ParentWithMagicCall {
5050
use ServiceMethodsSubscriberTrait;
5151
};
5252

@@ -59,7 +59,7 @@ public function testParentNotCalledIfNoParent()
5959
$container = new class([]) implements ContainerInterface {
6060
use ServiceLocatorTrait;
6161
};
62-
$service = new class() {
62+
$service = new class {
6363
use ServiceMethodsSubscriberTrait;
6464
};
6565

Tests/Service/ServiceSubscriberTraitTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testParentNotCalledIfHasMagicCall()
5454
$container = new class([]) implements ContainerInterface {
5555
use ServiceLocatorTrait;
5656
};
57-
$service = new class() extends ParentWithMagicCall {
57+
$service = new class extends ParentWithMagicCall {
5858
use ServiceSubscriberTrait;
5959
};
6060

@@ -67,7 +67,7 @@ public function testParentNotCalledIfNoParent()
6767
$container = new class([]) implements ContainerInterface {
6868
use ServiceLocatorTrait;
6969
};
70-
$service = new class() {
70+
$service = new class {
7171
use ServiceSubscriberTrait;
7272
};
7373

@@ -82,7 +82,7 @@ public function testSetContainerCalledFirstOnParent()
8282
};
8383
$container2 = clone $container1;
8484

85-
$testService = new class() extends LegacyParentTestService2 implements ServiceSubscriberInterface {
85+
$testService = new class extends LegacyParentTestService2 implements ServiceSubscriberInterface {
8686
use ServiceSubscriberTrait;
8787
};
8888
$this->assertNull($testService->setContainer($container1));

Translation/Test/TranslatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function tearDown(): void
4545

4646
public function getTranslator(): TranslatorInterface
4747
{
48-
return new class() implements TranslatorInterface {
48+
return new class implements TranslatorInterface {
4949
use TranslatorTrait;
5050
};
5151
}
@@ -366,7 +366,7 @@ protected function validateMatrix(string $nplural, array $matrix, bool $expectSu
366366

367367
protected function generateTestData($langCodes)
368368
{
369-
$translator = new class() {
369+
$translator = new class {
370370
use TranslatorTrait {
371371
getPluralizationRule as public;
372372
}

0 commit comments

Comments
 (0)