diff --git a/tests/Phug/AbstractLexerTest.php b/tests/Phug/AbstractLexerTest.php index eba9ccfc67a7fd7a214cf57530f1a45c64a4e5b9..91ff686c59a5690c653b67b782b8e8c4dcef5433 100644 --- a/tests/Phug/AbstractLexerTest.php +++ b/tests/Phug/AbstractLexerTest.php @@ -49,7 +49,7 @@ abstract class AbstractLexerTest extends TestCase } } - 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 8774e528cb7a61594574821984602b20c4e8361c..5816c7756cd8a7558ff51f829819ef2846b686c7 100644 --- a/tests/Phug/AbstractParserTest.php +++ b/tests/Phug/AbstractParserTest.php @@ -17,7 +17,7 @@ abstract class AbstractParserTest extends TestCase $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 015e1b7bdeec26f615ba80f8b3f48f1babe19a81..b13fa5a9ca4b8f400724c010baf1c02297ec6b5e 100644 --- a/tests/Phug/Compiler/NodeCompiler/BlockNodeCompilerTest/TestBlockNodeCompiler.php +++ b/tests/Phug/Compiler/NodeCompiler/BlockNodeCompilerTest/TestBlockNodeCompiler.php @@ -9,7 +9,7 @@ use Phug\Parser\NodeInterface; 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 63f848b71c1bf1e10b4c09d2f698a47d944e1017..b90ab72e3fc8175d83a20f1028677da42fcf94c1 100644 --- a/tests/Phug/TestCompiler.php +++ b/tests/Phug/TestCompiler.php @@ -8,7 +8,7 @@ use Phug\Parser\NodeInterface; 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 6f356ee89d845750eaa6f5bb67c7c694bcc1e125..7b9d5bf567c47b3f55ddf5fe2edbaf54719c8709 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 5efa7915d06dcce92a768444f6eb7c269180ccca..b8f17e3c6bc11785f2d31d0eb77449350ce735d0 100644 --- a/tests/Phug/Utils/MutedExceptionCompiler.php +++ b/tests/Phug/Utils/MutedExceptionCompiler.php @@ -15,7 +15,7 @@ class MutedExceptionCompiler extends Compiler // 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 0daf3e9b11d045618c9586a5214e0c5d5cc5bc30..fadefa0e1904e6e17311778cebac641ef23acf3b 100644 --- a/tests/Phug/Utils/TwigFormat.php +++ b/tests/Phug/Utils/TwigFormat.php @@ -8,7 +8,7 @@ use Phug\Formatter\Format\XhtmlFormat; class TwigFormat extends XhtmlFormat { - public function __construct(Formatter $formatter = null) + public function __construct(?Formatter $formatter = null) { parent::__construct($formatter);