mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 06:28:46 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
@@ -68,7 +68,7 @@ class DebugCommand extends Command
|
||||
->setDefinition([
|
||||
new InputArgument('name', InputArgument::OPTIONAL, 'The template name'),
|
||||
new InputOption('filter', null, InputOption::VALUE_REQUIRED, 'Show details for all entries matching this filter'),
|
||||
new InputOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), 'text'),
|
||||
new InputOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), 'text'),
|
||||
])
|
||||
->setHelp(<<<'EOF'
|
||||
The <info>%command.name%</info> command outputs a list of twig functions,
|
||||
@@ -101,13 +101,13 @@ EOF
|
||||
$filter = $input->getOption('filter');
|
||||
|
||||
if (null !== $name && [] === $this->getFilesystemLoaders()) {
|
||||
throw new InvalidArgumentException(sprintf('Argument "name" not supported, it requires the Twig loader "%s".', FilesystemLoader::class));
|
||||
throw new InvalidArgumentException(\sprintf('Argument "name" not supported, it requires the Twig loader "%s".', FilesystemLoader::class));
|
||||
}
|
||||
|
||||
match ($input->getOption('format')) {
|
||||
'text' => $name ? $this->displayPathsText($io, $name) : $this->displayGeneralText($io, $filter),
|
||||
'json' => $name ? $this->displayPathsJson($io, $name) : $this->displayGeneralJson($io, $filter),
|
||||
default => throw new InvalidArgumentException(sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))),
|
||||
default => throw new InvalidArgumentException(\sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))),
|
||||
};
|
||||
|
||||
return 0;
|
||||
@@ -132,7 +132,7 @@ EOF
|
||||
$io->section('Matched File');
|
||||
if ($file->valid()) {
|
||||
if ($fileLink = $this->getFileLink($file->key())) {
|
||||
$io->block($file->current(), 'OK', sprintf('fg=black;bg=green;href=%s', $fileLink), ' ', true);
|
||||
$io->block($file->current(), 'OK', \sprintf('fg=black;bg=green;href=%s', $fileLink), ' ', true);
|
||||
} else {
|
||||
$io->success($file->current());
|
||||
}
|
||||
@@ -142,9 +142,9 @@ EOF
|
||||
$io->section('Overridden Files');
|
||||
do {
|
||||
if ($fileLink = $this->getFileLink($file->key())) {
|
||||
$io->text(sprintf('* <href=%s>%s</>', $fileLink, $file->current()));
|
||||
$io->text(\sprintf('* <href=%s>%s</>', $fileLink, $file->current()));
|
||||
} else {
|
||||
$io->text(sprintf('* %s', $file->current()));
|
||||
$io->text(\sprintf('* %s', $file->current()));
|
||||
}
|
||||
$file->next();
|
||||
} while ($file->valid());
|
||||
@@ -169,7 +169,7 @@ EOF
|
||||
}
|
||||
}
|
||||
|
||||
$this->error($io, sprintf('Template name "%s" not found', $name), $alternatives);
|
||||
$this->error($io, \sprintf('Template name "%s" not found', $name), $alternatives);
|
||||
}
|
||||
|
||||
$io->section('Configured Paths');
|
||||
@@ -182,7 +182,7 @@ EOF
|
||||
if (FilesystemLoader::MAIN_NAMESPACE === $namespace) {
|
||||
$message = 'No template paths configured for your application';
|
||||
} else {
|
||||
$message = sprintf('No template paths configured for "@%s" namespace', $namespace);
|
||||
$message = \sprintf('No template paths configured for "@%s" namespace', $namespace);
|
||||
foreach ($this->getFilesystemLoaders() as $loader) {
|
||||
$namespaces = $loader->getNamespaces();
|
||||
foreach ($this->findAlternatives($namespace, $namespaces) as $namespace) {
|
||||
@@ -210,7 +210,7 @@ EOF
|
||||
$data['overridden_files'] = $files;
|
||||
}
|
||||
} else {
|
||||
$data['matched_file'] = sprintf('Template name "%s" not found', $name);
|
||||
$data['matched_file'] = \sprintf('Template name "%s" not found', $name);
|
||||
}
|
||||
$data['loader_paths'] = $paths;
|
||||
|
||||
@@ -375,7 +375,7 @@ EOF
|
||||
return '(unknown?)';
|
||||
}
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
return sprintf(' <error>%s</error>', $decorated ? OutputFormatter::escape($e->getMessage()) : $e->getMessage());
|
||||
return \sprintf(' <error>%s</error>', $decorated ? OutputFormatter::escape($e->getMessage()) : $e->getMessage());
|
||||
}
|
||||
|
||||
if ('globals' === $type) {
|
||||
@@ -385,7 +385,7 @@ EOF
|
||||
|
||||
$description = substr(@json_encode($meta), 0, 50);
|
||||
|
||||
return sprintf(' = %s', $decorated ? OutputFormatter::escape($description) : $description);
|
||||
return \sprintf(' = %s', $decorated ? OutputFormatter::escape($description) : $description);
|
||||
}
|
||||
|
||||
if ('functions' === $type) {
|
||||
@@ -432,14 +432,14 @@ EOF
|
||||
{
|
||||
$messages = [];
|
||||
foreach ($wrongBundles as $path => $alternatives) {
|
||||
$message = sprintf('Path "%s" not matching any bundle found', $path);
|
||||
$message = \sprintf('Path "%s" not matching any bundle found', $path);
|
||||
if ($alternatives) {
|
||||
if (1 === \count($alternatives)) {
|
||||
$message .= sprintf(", did you mean \"%s\"?\n", $alternatives[0]);
|
||||
$message .= \sprintf(", did you mean \"%s\"?\n", $alternatives[0]);
|
||||
} else {
|
||||
$message .= ", did you mean one of these:\n";
|
||||
foreach ($alternatives as $bundle) {
|
||||
$message .= sprintf(" - %s\n", $bundle);
|
||||
$message .= \sprintf(" - %s\n", $bundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -492,7 +492,7 @@ EOF
|
||||
{
|
||||
if (isset($name[0]) && '@' === $name[0]) {
|
||||
if (false === ($pos = strpos($name, '/')) || $pos === \strlen($name) - 1) {
|
||||
throw new InvalidArgumentException(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
|
||||
throw new InvalidArgumentException(\sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
|
||||
}
|
||||
|
||||
$namespace = substr($name, 1, $pos - 1);
|
||||
|
||||
Reference in New Issue
Block a user