Skip to content

Commit 13dabdf

Browse files
bonroyagederrabus
authored andcommitted
Code style change in @PER-CS2.0 affecting @Symfony (parentheses for anonymous classes)
1 parent 51cc3b3 commit 13dabdf

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Tests/CacheWarmer/ConfigBuilderCacheWarmerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public function testExtensionAddedInKernel()
189189
$kernel = new class($this->varDir) extends TestKernel {
190190
protected function build(ContainerBuilder $container): void
191191
{
192-
$container->registerExtension(new class() extends Extension implements ConfigurationInterface {
192+
$container->registerExtension(new class extends Extension implements ConfigurationInterface {
193193
public function load(array $configs, ContainerBuilder $container): void
194194
{
195195
}
@@ -276,7 +276,7 @@ protected function build(ContainerBuilder $container): void
276276
{
277277
/** @var TestSecurityExtension $extension */
278278
$extension = $container->getExtension('test_security');
279-
$extension->addAuthenticatorFactory(new class() implements TestAuthenticatorFactoryInterface {
279+
$extension->addAuthenticatorFactory(new class implements TestAuthenticatorFactoryInterface {
280280
public function getKey(): string
281281
{
282282
return 'token';
@@ -292,19 +292,19 @@ public function registerBundles(): iterable
292292
{
293293
yield from parent::registerBundles();
294294

295-
yield new class() extends Bundle {
295+
yield new class extends Bundle {
296296
public function getContainerExtension(): ExtensionInterface
297297
{
298298
return new TestSecurityExtension();
299299
}
300300
};
301301

302-
yield new class() extends Bundle {
302+
yield new class extends Bundle {
303303
public function build(ContainerBuilder $container): void
304304
{
305305
/** @var TestSecurityExtension $extension */
306306
$extension = $container->getExtension('test_security');
307-
$extension->addAuthenticatorFactory(new class() implements TestAuthenticatorFactoryInterface {
307+
$extension->addAuthenticatorFactory(new class implements TestAuthenticatorFactoryInterface {
308308
public function getKey(): string
309309
{
310310
return 'form-login';

Tests/DependencyInjection/Compiler/ProfilerPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function testValidCollector()
6666

6767
public static function provideValidCollectorWithTemplateUsingAutoconfigure(): \Generator
6868
{
69-
yield [new class() implements TemplateAwareDataCollectorInterface {
69+
yield [new class implements TemplateAwareDataCollectorInterface {
7070
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
7171
{
7272
}
@@ -86,7 +86,7 @@ public static function getTemplate(): string
8686
}
8787
}];
8888

89-
yield [new class() extends AbstractDataCollector {
89+
yield [new class extends AbstractDataCollector {
9090
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
9191
{
9292
}

Tests/Test/WebTestCaseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ private function getRequestTester(): WebTestCase
388388

389389
private function getTester(KernelBrowser $client): WebTestCase
390390
{
391-
$tester = new class() extends WebTestCase {
391+
$tester = new class extends WebTestCase {
392392
use WebTestAssertionsTrait {
393393
getClient as public;
394394
}

0 commit comments

Comments
 (0)