composer update

This commit is contained in:
2019-12-01 06:37:45 +00:00
parent fa199eef05
commit 3115ab75a5
3650 changed files with 72361 additions and 147137 deletions

View File

@@ -50,10 +50,7 @@ class ApplicationDescription
$this->showHidden = $showHidden;
}
/**
* @return array
*/
public function getNamespaces()
public function getNamespaces(): array
{
if (null === $this->namespaces) {
$this->inspectApplication();
@@ -65,7 +62,7 @@ class ApplicationDescription
/**
* @return Command[]
*/
public function getCommands()
public function getCommands(): array
{
if (null === $this->commands) {
$this->inspectApplication();
@@ -75,13 +72,9 @@ class ApplicationDescription
}
/**
* @param string $name
*
* @return Command
*
* @throws CommandNotFoundException
*/
public function getCommand($name)
public function getCommand(string $name): Command
{
if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) {
throw new CommandNotFoundException(sprintf('Command %s does not exist.', $name));

View File

@@ -23,9 +23,7 @@ interface DescriptorInterface
/**
* Describes an object if supported.
*
* @param OutputInterface $output
* @param object $object
* @param array $options
* @param object $object
*/
public function describe(OutputInterface $output, $object, array $options = []);
}

View File

@@ -92,8 +92,6 @@ class JsonDescriptor extends Descriptor
/**
* Writes data as json.
*
* @return array|string
*/
private function writeData(array $data, array $options)
{
@@ -102,10 +100,7 @@ class JsonDescriptor extends Descriptor
$this->write(json_encode($data, $flags));
}
/**
* @return array
*/
private function getInputArgumentData(InputArgument $argument)
private function getInputArgumentData(InputArgument $argument): array
{
return [
'name' => $argument->getName(),
@@ -116,10 +111,7 @@ class JsonDescriptor extends Descriptor
];
}
/**
* @return array
*/
private function getInputOptionData(InputOption $option)
private function getInputOptionData(InputOption $option): array
{
return [
'name' => '--'.$option->getName(),
@@ -132,10 +124,7 @@ class JsonDescriptor extends Descriptor
];
}
/**
* @return array
*/
private function getInputDefinitionData(InputDefinition $definition)
private function getInputDefinitionData(InputDefinition $definition): array
{
$inputArguments = [];
foreach ($definition->getArguments() as $name => $argument) {
@@ -150,10 +139,7 @@ class JsonDescriptor extends Descriptor
return ['arguments' => $inputArguments, 'options' => $inputOptions];
}
/**
* @return array
*/
private function getCommandData(Command $command)
private function getCommandData(Command $command): array
{
$command->getSynopsis();
$command->mergeApplicationDefinition(false);

View File

@@ -167,7 +167,7 @@ class MarkdownDescriptor extends Descriptor
}
}
private function getApplicationTitle(Application $application)
private function getApplicationTitle(Application $application): string
{
if ('UNKNOWN' !== $application->getName()) {
if ('UNKNOWN' !== $application->getVersion()) {

View File

@@ -250,7 +250,7 @@ class TextDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
private function writeText($content, array $options = [])
private function writeText(string $content, array $options = [])
{
$this->write(
isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content,

View File

@@ -26,10 +26,7 @@ use Symfony\Component\Console\Input\InputOption;
*/
class XmlDescriptor extends Descriptor
{
/**
* @return \DOMDocument
*/
public function getInputDefinitionDocument(InputDefinition $definition)
public function getInputDefinitionDocument(InputDefinition $definition): \DOMDocument
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->appendChild($definitionXML = $dom->createElement('definition'));
@@ -47,10 +44,7 @@ class XmlDescriptor extends Descriptor
return $dom;
}
/**
* @return \DOMDocument
*/
public function getCommandDocument(Command $command)
public function getCommandDocument(Command $command): \DOMDocument
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->appendChild($commandXML = $dom->createElement('command'));
@@ -80,13 +74,7 @@ class XmlDescriptor extends Descriptor
return $dom;
}
/**
* @param Application $application
* @param string|null $namespace
*
* @return \DOMDocument
*/
public function getApplicationDocument(Application $application, $namespace = null)
public function getApplicationDocument(Application $application, string $namespace = null): \DOMDocument
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->appendChild($rootXml = $dom->createElement('symfony'));
@@ -179,8 +167,6 @@ class XmlDescriptor extends Descriptor
/**
* Writes DOM document.
*
* @return \DOMDocument|string
*/
private function writeDocument(\DOMDocument $dom)
{