Skip to content

Commit 2972a51

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

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Tests/Caster/CasterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public function testAnonymousClass()
178178

179179
public function testTypeErrorInDebugInfo()
180180
{
181-
$this->assertDumpMatchesFormat('class@anonymous {}', new class() {
181+
$this->assertDumpMatchesFormat('class@anonymous {}', new class {
182182
public function __debugInfo(): array
183183
{
184184
return ['class' => \get_class(null)];

Tests/Caster/StubCasterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function testClassStubWithNotExistingMethod()
206206

207207
public function testClassStubWithAnonymousClass()
208208
{
209-
$var = [new ClassStub((new class() extends \Exception {
209+
$var = [new ClassStub((new class extends \Exception {
210210
})::class)];
211211

212212
$cloner = new VarCloner();

Tests/Dumper/ServerDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testDump()
4949
$cloner = new VarCloner();
5050
$data = $cloner->cloneVar('foo');
5151
$dumper = new ServerDumper(self::VAR_DUMPER_SERVER, $wrappedDumper, [
52-
'foo_provider' => new class() implements ContextProviderInterface {
52+
'foo_provider' => new class implements ContextProviderInterface {
5353
public function getContext(): ?array
5454
{
5555
return ['foo'];

Tests/Server/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testDump()
3131
$cloner = new VarCloner();
3232
$data = $cloner->cloneVar('foo');
3333
$connection = new Connection(self::VAR_DUMPER_SERVER, [
34-
'foo_provider' => new class() implements ContextProviderInterface {
34+
'foo_provider' => new class implements ContextProviderInterface {
3535
public function getContext(): ?array
3636
{
3737
return ['foo'];

0 commit comments

Comments
 (0)