8000 Various CS fix for consistency · symfony/symfony@7558269 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7558269

Browse files
Various CS fix for consistency
1 parent 22213fc commit 7558269

File tree

10 files changed

+14
-14
lines changed

10 files changed

+14
-14
lines changed

src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public function enterNode(Node $node, Environment $env): Node
5959

6060
if (class_exists(Nodes::class)) {
6161
return new SetNode(false, new Nodes([$name]), new Nodes([$node->getNode('expr')]), $node->getTemplateLine());
62-
} else {
63-
return new SetNode(false, new Node([$name]), new Node([$node->getNode('expr')]), $node->getTemplateLine());
64-
}
62+
}
63+
64+
return new SetNode(false, new Node([$name]), new Node([$node->getNode('expr')]), $node->getTemplateLine());
6565
}
6666

6767
if (!$this->scope->has('domain')) {

src/Symfony/Component/Console/Tests/Fixtures/application_signalable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
require $vendor.'/vendor/autoload.php';
1414

15-
(new class() extends SingleCommandApplication implements SignalableCommandInterface {
15+
(new class extends SingleCommandApplication implements SignalableCommandInterface {
1616
public function getSubscribedSignals(): array
1717
{
1818
return [SIGINT];

src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/closure.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
44

5-
return new class() {
5+
return new class {
66
public function __invoke(ContainerConfigurator $c)
77
{
88
$c->services()

src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/from_callable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
44

5-
return new class() {
5+
return new class {
66
public function __invoke(ContainerConfigurator $c)
77
{
88
$c->services()

src/Symfony/Component/DependencyInjection/Tests/Fixtures/config/object.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use App\BarService;
66

7-
return new class() {
7+
return new class {
88
public function __invoke(ContainerConfigurator $c)
99
{
1010
$s = $c->services()->defaults()->public();

src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Fixtures/long_receiver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
$eventDispatcher = new EventDispatcher();
3535
$eventDispatcher->addSubscriber(new DispatchPcntlSignalListener());
3636

37-
$worker = new Worker(['the_receiver' => $receiver], new class() implements MessageBusInterface {
37+
$worker = new Worker(['the_receiver' => $receiver], new class implements MessageBusInterface {
3838
public function dispatch($envelope, array $stamps = []): Envelope
3939
{
4040
echo 'Get envelope with message: '.$envelope->getMessage()::class."\n";

src/Symfony/Component/Routing/Tests/Fixtures/php_object_dsl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Symfony\Component\Routing\Loader\Configurator;
44

5-
return new class() {
5+
return new class {
66
public function __invoke(RoutingConfigurator $routes)
77
{
88
$routes

src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ public static function provideDenormalizeWithFilterBoolData(): array
12301230

12311231
public function testDenormalizeArrayObject()
12321232
{
1233-
$normalizer = new class() extends AbstractObjectNormalizerDummy {
1233+
$normalizer = new class extends AbstractObjectNormalizerDummy {
12341234
public function __construct()
12351235
{
12361236
parent::__construct(null, null, new PhpDocExtractor());

src/Symfony/Component/Translation/Dumper/PoFileDumper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ private function getStandardRules(string $id): array
100100
if (preg_match($intervalRegexp, $part)) {
101101
// Explicit rule is not a standard rule.
102102
return [];
103-
} else {
104-
$standardRules[] = $part;
105-
}
103+
}
104+
105+
$standardRules[] = $part;
106106
}
107107

108108
return $standardRules;

src/Symfony/Contracts/Tests/Service/LegacyTestService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function withAttribute(): ?Service2
5454

5555
class LegacyChildTestService extends LegacyTestService
5656
{
57-
#[SubscribedService()]
57+
#[SubscribedService]
5858
public function aChildService(): LegacyService3
5959
{
6060
return $this->container->get(__METHOD__);

0 commit comments

Comments
 (0)
0