Skip to content

Commit e827b52

Browse files
authored
Merge pull request #36 from uresu/fixing-terminated-typo
Update JsonParser.php
2 parents 249040c + 27e6f5d commit e827b52

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Seld/JsonLint/JsonParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function parse($input, $flags = 0)
203203
} elseif (preg_match('{".+?(\\\\[^"bfnrt/\\\\u])}', $this->lexer->getUpcomingInput(), $match)) {
204204
$message .= ", it appears you have an unescaped backslash at: ".$match[1];
205205
} elseif (preg_match('{"(?:[^"]+|\\\\")*$}m', $this->lexer->getUpcomingInput())) {
206-
$message .= ", it appears you forgot to terminated the string, or attempted to write a multiline string which is invalid";
206+
$message .= ", it appears you forgot to terminate a string, or attempted to write a multiline string which is invalid";
207207
}
208208
}
209209

tests/JsonParserTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function testErrorOnUnterminatedString()
9999
$parser->parse('{"bar": "foo}');
100100
$this->fail('Invalid unterminated string should be detected');
101101
} catch (ParsingException $e) {
102-
$this->assertContains('Invalid string, it appears you forgot to terminated the string, or attempted to write a multiline string which is invalid', $e->getMessage());
102+
$this->assertContains('Invalid string, it appears you forgot to terminate a string, or attempted to write a multiline string which is invalid', $e->getMessage());
103103
}
104104
}
105105

@@ -111,7 +111,7 @@ public function testErrorOnMultilineString()
111111
bar"}');
112112
$this->fail('Invalid multi-line string should be detected');
113113
} catch (ParsingException $e) {
114-
$this->assertContains('Invalid string, it appears you forgot to terminated the string, or attempted to write a multiline string which is invalid', $e->getMessage());
114+
$this->assertContains('Invalid string, it appears you forgot to terminate a string, or attempted to write a multiline string which is invalid', $e->getMessage());
115115
}
116116
}
117117

0 commit comments

Comments
 (0)