Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Exception/ParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ParseException extends \RuntimeException
* @param string|null $parsedFile The file name where the error occurred
* @param Exception $previous The previous exception
*/
public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Exception $previous = null)
public function __construct(string $message, int $parsedLine = -1, ?string $snippet = null, ?string $parsedFile = null, ?\Exception $previous = null)
{
$this->parsedFile = $parsedFile;
$this->parsedLine = $parsedLine;
Expand Down
2 changes: 1 addition & 1 deletion src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ private function unexpectedTokenError(Token $token, string $expectedMsg) : void
throw new SyntaxErrorException($msg);
}

private function syntaxError($msg, Token $token = null) : void
private function syntaxError($msg, ?Token $token = null) : void
{
if ($token !== null) {
$name = $token->getName();
Expand Down