mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 12:08:47 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
@@ -46,7 +46,7 @@ class YamlReferenceDumper
|
||||
|
||||
foreach (explode('.', $path) as $step) {
|
||||
if (!$node instanceof ArrayNode) {
|
||||
throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
|
||||
throw new \UnexpectedValueException(\sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
|
||||
}
|
||||
|
||||
/** @var NodeInterface[] $children */
|
||||
@@ -60,7 +60,7 @@ class YamlReferenceDumper
|
||||
}
|
||||
}
|
||||
|
||||
throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
|
||||
throw new \UnexpectedValueException(\sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
|
||||
}
|
||||
|
||||
return $this->dumpNode($node);
|
||||
@@ -130,7 +130,7 @@ class YamlReferenceDumper
|
||||
// deprecated?
|
||||
if ($node instanceof BaseNode && $node->isDeprecated()) {
|
||||
$deprecation = $node->getDeprecation($node->getName(), $parentNode ? $parentNode->getPath() : $node->getPath());
|
||||
$comments[] = sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']);
|
||||
$comments[] = \sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']);
|
||||
}
|
||||
|
||||
// example
|
||||
@@ -142,12 +142,12 @@ class YamlReferenceDumper
|
||||
$comments = \count($comments) ? '# '.implode(', ', $comments) : '';
|
||||
|
||||
$key = $prototypedArray ? '-' : $node->getName().':';
|
||||
$text = rtrim(sprintf('%-21s%s %s', $key, $default, $comments), ' ');
|
||||
$text = rtrim(\sprintf('%-21s%s %s', $key, $default, $comments), ' ');
|
||||
|
||||
if ($node instanceof BaseNode && $info = $node->getInfo()) {
|
||||
$this->writeLine('');
|
||||
// indenting multi-line info
|
||||
$info = str_replace("\n", sprintf("\n%".($depth * 4).'s# ', ' '), $info);
|
||||
$info = str_replace("\n", \sprintf("\n%".($depth * 4).'s# ', ' '), $info);
|
||||
$this->writeLine('# '.$info, $depth * 4);
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ class YamlReferenceDumper
|
||||
$indent = \strlen($text) + $indent;
|
||||
$format = '%'.$indent.'s';
|
||||
|
||||
$this->reference .= sprintf($format, $text)."\n";
|
||||
$this->reference .= \sprintf($format, $text)."\n";
|
||||
}
|
||||
|
||||
private function writeArray(array $array, int $depth, bool $asComment = false): void
|
||||
@@ -208,7 +208,7 @@ class YamlReferenceDumper
|
||||
if ($isIndexed) {
|
||||
$this->writeLine($prefix.'- '.$val, $depth * 4);
|
||||
} else {
|
||||
$this->writeLine(sprintf('%s%-20s %s', $prefix, $key.':', $val), $depth * 4);
|
||||
$this->writeLine(\sprintf('%s%-20s %s', $prefix, $key.':', $val), $depth * 4);
|
||||
}
|
||||
|
||||
if (\is_array($value)) {
|
||||
|
||||
Reference in New Issue
Block a user