Skip to content

Commit 5342b6f

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: Add missing dots at the end of exception messages
2 parents 28f08c4 + d54c2a8 commit 5342b6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Parser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private function doParse(string $value, int $flags)
153153
$isRef = $mergeNode = false;
154154
if ('-' === $this->currentLine[0] && self::preg_match('#^\-((?P<leadspaces>\s+)(?P<value>.+))?$#u', rtrim($this->currentLine), $values)) {
155155
if ($context && 'mapping' == $context) {
156-
throw new ParseException('You cannot define a sequence item when in a mapping', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
156+
throw new ParseException('You cannot define a sequence item when in a mapping.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
157157
}
158158
$context = 'sequence';
159159

@@ -199,7 +199,7 @@ private function doParse(string $value, int $flags)
199199
&& (false === strpos($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"]))
200200
) {
201201
if ($context && 'sequence' == $context) {
202-
throw new ParseException('You cannot define a mapping item when in a sequence', $this->currentLineNb + 1, $this->currentLine, $this->filename);
202+
throw new ParseException('You cannot define a mapping item when in a sequence.', $this->currentLineNb + 1, $this->currentLine, $this->filename);
203203
}
204204
$context = 'mapping';
205205

0 commit comments

Comments
 (0)