Skip to content
/ lexer Public

Commit bf89242

Browse files
committed
Merge remote-tracking branch 'origin/master'
split: 5b726dc15ef2bacbe76a8e2f20731238f5a7ecfe
1 parent 612dc82 commit bf89242

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Lexer/AbstractToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ abstract class AbstractToken implements TokenInterface, HandleTokenInterface
1313
private $indentation;
1414
private $handled = false;
1515

16-
public function __construct(SourceLocationInterface $sourceLocation = null, $level = null, $indentation = null)
16+
public function __construct(?SourceLocationInterface $sourceLocation = null, $level = null, $indentation = null)
1717
{
1818
$this->sourceLocation = $sourceLocation;
1919
$this->level = $level ?: 0;

Lexer/Scanner/AttributeScanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private function isExpressionPartial(Reader $reader, $expression)
103103
$this->isTruncatedValue($expression);
104104
}
105105

106-
private function getAttributeValue(Reader $reader, array $chars = null)
106+
private function getAttributeValue(Reader $reader, ?array $chars = null)
107107
{
108108
$chars = $chars ?: [
109109
' ', "\t", "\n", ',', ')', '//',

Lexer/Scanner/IndentationScanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function formatIndentChar(State $state, $indentChar)
5353
return $indentChar;
5454
}
5555

56-
public function getIndentLevel(State $state, $maxLevel = INF, callable $getIndentChar = null)
56+
public function getIndentLevel(State $state, $maxLevel = INF, ?callable $getIndentChar = null)
5757
{
5858
if ($maxLevel <= 0) {
5959
return 0;

Lexer/TokenInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
interface TokenInterface
88
{
9-
public function __construct(SourceLocationInterface $sourceLocation = null, $level = null, $indentation = null);
9+
public function __construct(?SourceLocationInterface $sourceLocation = null, $level = null, $indentation = null);
1010

1111
/**
1212
* @return SourceLocationInterface|null

0 commit comments

Comments
 (0)