diff --git a/tests/Phug/AbstractLexerTest.php b/tests/Phug/AbstractLexerTest.php index eba9ccfc..91ff686c 100644 --- a/tests/Phug/AbstractLexerTest.php +++ b/tests/Phug/AbstractLexerTest.php @@ -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)); diff --git a/tests/Phug/AbstractParserTest.php b/tests/Phug/AbstractParserTest.php index 8774e528..5816c775 100644 --- a/tests/Phug/AbstractParserTest.php +++ b/tests/Phug/AbstractParserTest.php @@ -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); diff --git a/tests/Phug/Compiler/NodeCompiler/BlockNodeCompilerTest/TestBlockNodeCompiler.php b/tests/Phug/Compiler/NodeCompiler/BlockNodeCompilerTest/TestBlockNodeCompiler.php index 015e1b7b..b13fa5a9 100644 --- a/tests/Phug/Compiler/NodeCompiler/BlockNodeCompilerTest/TestBlockNodeCompiler.php +++ b/tests/Phug/Compiler/NodeCompiler/BlockNodeCompilerTest/TestBlockNodeCompiler.php @@ -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'; diff --git a/tests/Phug/TestCompiler.php b/tests/Phug/TestCompiler.php index 63f848b7..b90ab72e 100644 --- a/tests/Phug/TestCompiler.php +++ b/tests/Phug/TestCompiler.php @@ -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'; } diff --git a/tests/Phug/TestState.php b/tests/Phug/TestState.php index 6f356ee8..7b9d5bf5 100644 --- a/tests/Phug/TestState.php +++ b/tests/Phug/TestState.php @@ -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); diff --git a/tests/Phug/Utils/MutedExceptionCompiler.php b/tests/Phug/Utils/MutedExceptionCompiler.php index 5efa7915..b8f17e3c 100644 --- a/tests/Phug/Utils/MutedExceptionCompiler.php +++ b/tests/Phug/Utils/MutedExceptionCompiler.php @@ -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); } diff --git a/tests/Phug/Utils/TwigFormat.php b/tests/Phug/Utils/TwigFormat.php index 0daf3e9b..fadefa0e 100644 --- a/tests/Phug/Utils/TwigFormat.php +++ b/tests/Phug/Utils/TwigFormat.php @@ -8,7 +8,7 @@ class TwigFormat extends XhtmlFormat { - public function __construct(Formatter $formatter = null) + public function __construct(?Formatter $formatter = null) { parent::__construct($formatter);