updated composer
This commit is contained in:
@@ -80,7 +80,7 @@ class ApplicationDescription
|
||||
throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
|
||||
}
|
||||
|
||||
return isset($this->commands[$name]) ? $this->commands[$name] : $this->aliases[$name];
|
||||
return $this->commands[$name] ?? $this->aliases[$name];
|
||||
}
|
||||
|
||||
private function inspectApplication()
|
||||
|
||||
10
vendor/symfony/console/Descriptor/Descriptor.php
vendored
10
vendor/symfony/console/Descriptor/Descriptor.php
vendored
@@ -69,36 +69,26 @@ abstract class Descriptor implements DescriptorInterface
|
||||
|
||||
/**
|
||||
* Describes an InputArgument instance.
|
||||
*
|
||||
* @return string|mixed
|
||||
*/
|
||||
abstract protected function describeInputArgument(InputArgument $argument, array $options = []);
|
||||
|
||||
/**
|
||||
* Describes an InputOption instance.
|
||||
*
|
||||
* @return string|mixed
|
||||
*/
|
||||
abstract protected function describeInputOption(InputOption $option, array $options = []);
|
||||
|
||||
/**
|
||||
* Describes an InputDefinition instance.
|
||||
*
|
||||
* @return string|mixed
|
||||
*/
|
||||
abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []);
|
||||
|
||||
/**
|
||||
* Describes a Command instance.
|
||||
*
|
||||
* @return string|mixed
|
||||
*/
|
||||
abstract protected function describeCommand(Command $command, array $options = []);
|
||||
|
||||
/**
|
||||
* Describes an Application instance.
|
||||
*
|
||||
* @return string|mixed
|
||||
*/
|
||||
abstract protected function describeApplication(Application $application, array $options = []);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class JsonDescriptor extends Descriptor
|
||||
*/
|
||||
protected function describeApplication(Application $application, array $options = [])
|
||||
{
|
||||
$describedNamespace = isset($options['namespace']) ? $options['namespace'] : null;
|
||||
$describedNamespace = $options['namespace'] ?? null;
|
||||
$description = new ApplicationDescription($application, $describedNamespace, true);
|
||||
$commands = [];
|
||||
|
||||
@@ -95,7 +95,7 @@ class JsonDescriptor extends Descriptor
|
||||
*/
|
||||
private function writeData(array $data, array $options)
|
||||
{
|
||||
$flags = isset($options['json_encoding']) ? $options['json_encoding'] : 0;
|
||||
$flags = $options['json_encoding'] ?? 0;
|
||||
|
||||
$this->write(json_encode($data, $flags));
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
*/
|
||||
protected function describeApplication(Application $application, array $options = [])
|
||||
{
|
||||
$describedNamespace = isset($options['namespace']) ? $options['namespace'] : null;
|
||||
$describedNamespace = $options['namespace'] ?? null;
|
||||
$description = new ApplicationDescription($application, $describedNamespace);
|
||||
$title = $this->getApplicationTitle($application);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class TextDescriptor extends Descriptor
|
||||
$default = '';
|
||||
}
|
||||
|
||||
$totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName());
|
||||
$totalWidth = $options['total_width'] ?? Helper::strlen($argument->getName());
|
||||
$spacingWidth = $totalWidth - \strlen($argument->getName());
|
||||
|
||||
$this->writeText(sprintf(' <info>%s</info> %s%s%s',
|
||||
@@ -71,7 +71,7 @@ class TextDescriptor extends Descriptor
|
||||
}
|
||||
}
|
||||
|
||||
$totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions([$option]);
|
||||
$totalWidth = $options['total_width'] ?? $this->calculateTotalWidthForOptions([$option]);
|
||||
$synopsis = sprintf('%s%s',
|
||||
$option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ',
|
||||
sprintf('--%s%s', $option->getName(), $value)
|
||||
@@ -117,7 +117,7 @@ class TextDescriptor extends Descriptor
|
||||
|
||||
$this->writeText('<comment>Options:</comment>', $options);
|
||||
foreach ($definition->getOptions() as $option) {
|
||||
if (\strlen($option->getShortcut()) > 1) {
|
||||
if (\strlen($option->getShortcut() ?? '') > 1) {
|
||||
$laterOptions[] = $option;
|
||||
continue;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ class TextDescriptor extends Descriptor
|
||||
*/
|
||||
protected function describeApplication(Application $application, array $options = [])
|
||||
{
|
||||
$describedNamespace = isset($options['namespace']) ? $options['namespace'] : null;
|
||||
$describedNamespace = $options['namespace'] ?? null;
|
||||
$description = new ApplicationDescription($application, $describedNamespace);
|
||||
|
||||
if (isset($options['raw_text']) && $options['raw_text']) {
|
||||
@@ -296,7 +296,7 @@ class TextDescriptor extends Descriptor
|
||||
}
|
||||
|
||||
/**
|
||||
* @param (Command|string)[] $commands
|
||||
* @param array<Command|string> $commands
|
||||
*/
|
||||
private function getColumnWidth(array $commands): int
|
||||
{
|
||||
|
||||
@@ -151,7 +151,7 @@ class XmlDescriptor extends Descriptor
|
||||
*/
|
||||
protected function describeApplication(Application $application, array $options = [])
|
||||
{
|
||||
$this->writeDocument($this->getApplicationDocument($application, isset($options['namespace']) ? $options['namespace'] : null));
|
||||
$this->writeDocument($this->getApplicationDocument($application, $options['namespace'] ?? null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,7 +200,7 @@ class XmlDescriptor extends Descriptor
|
||||
|
||||
$dom->appendChild($objectXML = $dom->createElement('option'));
|
||||
$objectXML->setAttribute('name', '--'.$option->getName());
|
||||
$pos = strpos($option->getShortcut(), '|');
|
||||
$pos = strpos($option->getShortcut() ?? '', '|');
|
||||
if (false !== $pos) {
|
||||
$objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
|
||||
$objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut()));
|
||||
|
||||
Reference in New Issue
Block a user