summaryrefslogtreecommitdiff
path: root/vendor/symfony/console/Descriptor/ApplicationDescription.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/console/Descriptor/ApplicationDescription.php')
-rw-r--r--vendor/symfony/console/Descriptor/ApplicationDescription.php18
1 files changed, 5 insertions, 13 deletions
diff --git a/vendor/symfony/console/Descriptor/ApplicationDescription.php b/vendor/symfony/console/Descriptor/ApplicationDescription.php
index 89961b9c..ef4c673b 100644
--- a/vendor/symfony/console/Descriptor/ApplicationDescription.php
+++ b/vendor/symfony/console/Descriptor/ApplicationDescription.php
@@ -24,15 +24,9 @@ class ApplicationDescription
{
const GLOBAL_NAMESPACE = '_global';
- /**
- * @var Application
- */
private $application;
-
- /**
- * @var null|string
- */
private $namespace;
+ private $showHidden;
/**
* @var array
@@ -50,15 +44,15 @@ class ApplicationDescription
private $aliases;
/**
- * Constructor.
- *
* @param Application $application
* @param string|null $namespace
+ * @param bool $showHidden
*/
- public function __construct(Application $application, $namespace = null)
+ public function __construct(Application $application, $namespace = null, $showHidden = false)
{
$this->application = $application;
$this->namespace = $namespace;
+ $this->showHidden = $showHidden;
}
/**
@@ -112,7 +106,7 @@ class ApplicationDescription
/** @var Command $command */
foreach ($commands as $name => $command) {
- if (!$command->getName()) {
+ if (!$command->getName() || (!$this->showHidden && $command->isHidden())) {
continue;
}
@@ -130,8 +124,6 @@ class ApplicationDescription
}
/**
- * @param array $commands
- *
* @return array
*/
private function sortCommands(array $commands)