Skip to content

Commit

Permalink
minor EasyCorp#6425 Fix PHP code syntax (javiereguiluz)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.x branch.

Discussion
----------

Fix PHP code syntax

Commits
-------

27b0661 Fix PHP code syntax
  • Loading branch information
javiereguiluz committed Aug 27, 2024
2 parents b471069 + 27b0661 commit 8f17e48
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/Dto/CrudDtoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function testGetEntityLabelInSingular($setLabel, ?string $expectedGetLabe
$crudDto->setEntityLabelInPlural($setLabel);
}

$entityInstance = new class() {
$entityInstance = new class {
public function getPrimaryKeyValue()
{
return '42';
Expand Down
2 changes: 1 addition & 1 deletion tests/EventListener/AdminRouterSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function controllerDataProvider(): iterable
yield ['Some\\Class::method'];
yield ['Some\\Class'];
yield [['Some\\Class', 'method']];
yield [new class() {
yield [new class {
public function __invoke()
{
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Field/AbstractFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private function getEntityDto(): EntityDto
$entityDtoMock
->expects($this->any())
->method('getInstance')
->willReturn(new class() {});
->willReturn(new class {});

return $this->entityDto = $entityDtoMock;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Twig/TwigFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testNonLazyLoadedFilter(): void
public function testLazyLoadedFilter(): void
{
$loader = new FactoryRuntimeLoader([
'EATests\MyLazyFilterRuntime' => fn () => new class() {
'EATests\MyLazyFilterRuntime' => fn () => new class {
public function myFilter($number, int $decimals, string $decPoint, string $thousandsSep)
{
return number_format($number, $decimals, $decPoint, $thousandsSep);
Expand Down Expand Up @@ -98,7 +98,7 @@ public function testClassMethodNotFound(): void
$this->expectExceptionMessage('Unable to load runtime for filter: "my_filter"');

$loader = new FactoryRuntimeLoader([
'EATests\MyLazyFilterRuntime' => fn () => new class() {},
'EATests\MyLazyFilterRuntime' => fn () => new class {},
]);

$this->twig->addRuntimeLoader($loader);
Expand Down

0 comments on commit 8f17e48

Please sign in to comment.