Skip to content
Merged
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 tests/Phug/AbstractLexerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function filterTokenClass($className)
}
}

protected function assertTokens($expression, array $classNames, Lexer $lexer = null, &$tokens = [])
protected function assertTokens($expression, array $classNames, ?Lexer $lexer = null, &$tokens = [])
{
$lexer = $lexer ?: $this->lexer;
$tokens = iterator_to_array($lexer->lex($expression));
Expand Down
2 changes: 1 addition & 1 deletion tests/Phug/AbstractParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected function prepareTest()
$this->parser = new Parser();
}

protected function assertNodes($expression, $expected, Parser $parser = null)
protected function assertNodes($expression, $expected, ?Parser $parser = null)
{
if (is_array($expected)) {
$expected = implode("\n", $expected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class TestBlockNodeCompiler extends BlockNodeCompiler
{
public function compileNode(NodeInterface $node, ElementInterface $parent = null)
public function compileNode(NodeInterface $node, ?ElementInterface $parent = null)
{
$blocks = &$this->getCompiler()->getBlocksByName('foo');
$blocks[] = 'bar';
Expand Down
2 changes: 1 addition & 1 deletion tests/Phug/TestCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class TestCompiler extends Compiler
{
public function compileNode(NodeInterface $node, ElementInterface $parent = null)
public function compileNode(NodeInterface $node, ?ElementInterface $parent = null)
{
return 'foo';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Phug/TestState.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestState extends State
{
private static $lastOptions;

public function __construct(Parser $parser, \Generator $tokens, array $options = null)
public function __construct(Parser $parser, \Generator $tokens, ?array $options = null)
{
parent::__construct($parser, $tokens, $options);

Expand Down
2 changes: 1 addition & 1 deletion tests/Phug/Utils/MutedExceptionCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function throwException($message, $node = null, $code = 0, $previous = nu
// removed
}

public function compileNode(NodeInterface $node, ElementInterface $parent = null)
public function compileNode(NodeInterface $node, ?ElementInterface $parent = null)
{
return $this->forcedReturn ?: parent::compileNode($node, $parent);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Phug/Utils/TwigFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class TwigFormat extends XhtmlFormat
{
public function __construct(Formatter $formatter = null)
public function __construct(?Formatter $formatter = null)
{
parent::__construct($formatter);

Expand Down
Loading