8000 [Console] do not make the getHelp() method smart · symfony/symfony@169fad1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 169fad1

Browse files
committed
[Console] do not make the getHelp() method smart
1 parent 3765d8a commit 169fad1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/Console/Command/Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ public function setHelp($help)
491491
*/
492492
public function getHelp()
493493
{
494-
return $this->help ?: $this->description;
494+
return $this->help;
495495
}
496496

497497
/**
@@ -513,7 +513,7 @@ public function getProcessedHelp()
513513
$_SERVER['PHP_SELF'].' '.$name,
514514
);
515515

516-
return str_replace($placeholders, $replacements, $this->getHelp());
516+
return str_replace($placeholders, $replacements, $this->getHelp() ? $this->getHelp() : $this->getDescription());
517517
}
518518

519519
/**

src/Symfony/Component/Console/Tests/Command/CommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function testGetSetHelp()
132132
$this->assertEquals($command, $ret, '->setHelp() implements a fluent interface');
133133
$this->assertEquals('help1', $command->getHelp(), '->setHelp() sets the help');
134134
$command->setHelp('');
135-
$this->assertEquals('description', $command->getHelp(), '->getHelp() fallback to the description');
135+
$this->assertEquals('', $command->getHelp(), '->getHelp() does not fall back to the description');
136136
}
137137

138138
public function testGetProcessedHelp()

0 commit comments

Comments
 (0)
0