minor #40924 [Yaml] make fabbot happy (xabbuh)
This PR was merged into the 4.4 branch.
Discussion
----------
[Yaml] make fabbot happy
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
9826c05928
make fabbot happy
This commit is contained in:
commit
6c7abd1380
@ -227,7 +227,7 @@ class Parser
|
||||
}
|
||||
|
||||
if (!\is_string($key) && !\is_int($key)) {
|
||||
throw new ParseException(sprintf('%s keys are not supported. Quote your evaluable mapping keys instead.', is_numeric($key) ? 'Numeric' : 'Non-string'), $this->getRealCurrentLineNb() + 1, $this->currentLine);
|
||||
throw new ParseException((is_numeric($key) ? 'Numeric' : 'Non-string').' keys are not supported. Quote your evaluable mapping keys instead.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
|
||||
}
|
||||
|
||||
// Convert float keys to strings, to avoid being converted to integers by PHP
|
||||
@ -242,7 +242,7 @@ class Parser
|
||||
$refName = substr(rtrim($values['value']), 1);
|
||||
if (!\array_key_exists($refName, $this->refs)) {
|
||||
if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) {
|
||||
throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $refName, $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename);
|
||||
throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$refName])), $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename);
|
||||
}
|
||||
|
||||
throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
|
||||
@ -724,7 +724,7 @@ class Parser
|
||||
|
||||
if (!\array_key_exists($value, $this->refs)) {
|
||||
if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) {
|
||||
throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $value, $value), $this->currentLineNb + 1, $this->currentLine, $this->filename);
|
||||
throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$value])), $value), $this->currentLineNb + 1, $this->currentLine, $this->filename);
|
||||
}
|
||||
|
||||
throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename);
|
||||
@ -1217,7 +1217,7 @@ class Parser
|
||||
}
|
||||
} while ($this->moveToNextLine());
|
||||
|
||||
throw new ParseException('Malformed inline YAML string');
|
||||
throw new ParseException('Malformed inline YAML string.');
|
||||
}
|
||||
|
||||
private function lexUnquotedString(int &$cursor): string
|
||||
@ -1288,7 +1288,7 @@ class Parser
|
||||
}
|
||||
} while ($this->moveToNextLine());
|
||||
|
||||
throw new ParseException('Malformed inline YAML string');
|
||||
throw new ParseException('Malformed inline YAML string.');
|
||||
}
|
||||
|
||||
private function consumeWhitespaces(int &$cursor): bool
|
||||
|
Reference in New Issue
Block a user