diff options
Diffstat (limited to 'vendor/symfony/console/Descriptor/XmlDescriptor.php')
-rw-r--r-- | vendor/symfony/console/Descriptor/XmlDescriptor.php | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/vendor/symfony/console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Descriptor/XmlDescriptor.php index b5676beb..f05756ca 100644 --- a/vendor/symfony/console/Descriptor/XmlDescriptor.php +++ b/vendor/symfony/console/Descriptor/XmlDescriptor.php @@ -27,8 +27,6 @@ use Symfony\Component\Console\Input\InputOption; class XmlDescriptor extends Descriptor { /** - * @param InputDefinition $definition - * * @return \DOMDocument */ public function getInputDefinitionDocument(InputDefinition $definition) @@ -50,8 +48,6 @@ class XmlDescriptor extends Descriptor } /** - * @param Command $command - * * @return \DOMDocument */ public function getCommandDocument(Command $command) @@ -64,6 +60,7 @@ class XmlDescriptor extends Descriptor $commandXML->setAttribute('id', $command->getName()); $commandXML->setAttribute('name', $command->getName()); + $commandXML->setAttribute('hidden', $command->isHidden() ? 1 : 0); $commandXML->appendChild($usagesXML = $dom->createElement('usages')); @@ -94,16 +91,16 @@ class XmlDescriptor extends Descriptor $dom = new \DOMDocument('1.0', 'UTF-8'); $dom->appendChild($rootXml = $dom->createElement('symfony')); - if ($application->getName() !== 'UNKNOWN') { + if ('UNKNOWN' !== $application->getName()) { $rootXml->setAttribute('name', $application->getName()); - if ($application->getVersion() !== 'UNKNOWN') { + if ('UNKNOWN' !== $application->getVersion()) { $rootXml->setAttribute('version', $application->getVersion()); } } $rootXml->appendChild($commandsXML = $dom->createElement('commands')); - $description = new ApplicationDescription($application, $namespace); + $description = new ApplicationDescription($application, $namespace, true); if ($namespace) { $commandsXML->setAttribute('namespace', $namespace); @@ -172,9 +169,6 @@ class XmlDescriptor extends Descriptor /** * Appends document children to parent node. - * - * @param \DOMNode $parentNode - * @param \DOMNode $importedParent */ private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent) { @@ -186,8 +180,6 @@ class XmlDescriptor extends Descriptor /** * Writes DOM document. * - * @param \DOMDocument $dom - * * @return \DOMDocument|string */ private function writeDocument(\DOMDocument $dom) @@ -197,8 +189,6 @@ class XmlDescriptor extends Descriptor } /** - * @param InputArgument $argument - * * @return \DOMDocument */ private function getInputArgumentDocument(InputArgument $argument) @@ -223,8 +213,6 @@ class XmlDescriptor extends Descriptor } /** - * @param InputOption $option - * * @return \DOMDocument */ private function getInputOptionDocument(InputOption $option) |