8000 minor #59471 chore: PHP CS Fixer fixes (keradus) · symfony/symfony@f6312d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit f6312d3

Browse files
minor #59471 chore: PHP CS Fixer fixes (keradus)
This PR was merged into the 7.3 branch. Discussion ---------- chore: PHP CS Fixer fixes | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Fix CS <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT PHP CS Fixer constantly complaining about having a class called `TestKernel` as only class in file that is _not_ called that way. Maybe we can remove the class name in total, especially as it's test resource file, and other files in this folder already using anonymous classes? Commits ------- a900ca8 chore: PHP CS Fixer fixes
2 parents 7b33872 + a900ca8 commit f6312d3

File tree

1 file changed

+2
-5
lines changed
  • src/Symfony/Component/Runtime/Tests/phpt

1 file changed

+2
-5
lines changed

src/Symfony/Component/Runtime/Tests/phpt/kernel.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515

1616
require __DIR__.'/autoload.php';
1717

18-
class TestKernel implements HttpKernelInterface
19-
{
18+
return fn (array $context) => new class($context['APP_ENV'], $context['SOME_VAR']) implements HttpKernelInterface {
2019
private string $env;
2120
private string $var;
2221

@@ -30,6 +29,4 @@ public function handle(Request $request, $type = self::MAIN_REQUEST, $catch = tr
3029
{
3130
return new Response('OK Kernel (env='.$this->env.') '.$this->var);
3231
}
33-
}
34-
35-
return fn (array $context) => new TestKernel($context['APP_ENV'], $context['SOME_VAR']);
32+
};

0 commit comments

Comments
 (0)
0