Skip to content

Commit

Permalink
Only call setHidden() if value is true. (#299)
Browse files Browse the repository at this point in the history
the problem is that hasAnnotation() is true even if the value of $hidden is false.
  • Loading branch information
weitzman authored Mar 29, 2023
1 parent 7f5dd1a commit 6e113e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Attributes/Help.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public static function handle(\ReflectionAttribute $attribute, CommandInfo $comm
if ($instance->synopsis) {
$commandInfo->setHelp($instance->synopsis);
}
$commandInfo->setHidden($instance->hidden);
if ($instance->hidden) {
$commandInfo->setHidden($instance->hidden);
}
}
}

0 comments on commit 6e113e7

Please sign in to comment.