Skip to content

Commit

Permalink
Allows set command description via AsCommand attribute (#45117)
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhquochan authored Nov 28, 2022
1 parent b6b4a19 commit 15e1a54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ public function __construct()
// Once we have constructed the command, we'll set the description and other
// related properties of the command. If a signature wasn't used to build
// the command we'll set the arguments and the options on this command.
$this->setDescription((string) $this->description);
if (! isset($this->description)) {
$this->setDescription((string) static::getDefaultDescription());
} else {
$this->setDescription((string) $this->description);
}

$this->setHelp((string) $this->help);

Expand Down

0 comments on commit 15e1a54

Please sign in to comment.