8000 minor #35106 Use spaces correctly to display options in DebugCommand … · symfony/symfony@8855082 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8855082

Browse files
minor #35106 Use spaces correctly to display options in DebugCommand (ruudk)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead. Discussion ---------- Use spaces correctly to display options in DebugCommand | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT Messenger ships with a DebugCommand. It doesn't properly place spaces for every option. ```diff - handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1, option2=2) + handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1, option2=2) ``` Commits ------- 1c92e9e Use spaces correctly to display options in DebugCommand
2 parents dfa118f + 1c92e9e commit 8855082

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Symfony/Component/Messenger/Command/DebugCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ private function formatConditions(array $options): string
108108

109109
$optionsMapping = [];
110110
foreach ($options as $key => $value) {
111-
$optionsMapping[] = ' '.$key.'='.$value;
111+
$optionsMapping[] = $key.'='.$value;
112112
}
113113

114-
return ' (when'.implode(', ', $optionsMapping).')';
114+
return ' (when '.implode(', ', $optionsMapping).')';
115115
}
116116
}

src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testOutput()
4040
{
4141
$command = new DebugCommand([
4242
'command_bus' => [
43-
DummyCommand::class => [[DummyCommandHandler::class, []]],
43+
DummyCommand::class => [[DummyCommandHandler::class, ['option1' => '1', 'option2' => '2']]],
4444
MultipleBusesMessage::class => [[MultipleBusesMessageHandler::class, []]],
4545
],
4646
'query_bus' => [
@@ -62,12 +62,12 @@ public function testOutput()
6262
6363
The following messages can be dispatched:
6464
65-
---------------------------------------------------------------------------------------
66-
Symfony\Component\Messenger\Tests\Fixtures\DummyCommand
67-
handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler
68-
Symfony\Component\Messenger\Tests\Fixtures\MultipleBusesMessage
69-
handled by Symfony\Component\Messenger\Tests\Fixtures\MultipleBusesMessageHandler
70-
---------------------------------------------------------------------------------------
65+
-----------------------------------------------------------------------------------------------------------
66+
Symfony\Component\Messenger\Tests\Fixtures\DummyCommand
67+
handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1, option2=2)
68+
Symfony\Component\Messenger\Tests\Fixtures\MultipleBusesMessage
69+
handled by Symfony\Component\Messenger\Tests\Fixtures\MultipleBusesMessageHandler
70+
-----------------------------------------------------------------------------------------------------------
7171
7272
query_bus
7373
---------

0 commit comments

Comments
 (0)
0