Skip to content

Commit add0c4e

Browse files
authored
Merge pull request #120 from phug-php/analysis-l7RxOd
Apply fixes from StyleCI
2 parents 481e515 + 1628378 commit add0c4e

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

tests/Phug/AbstractLexerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function filterTokenClass($className)
4949
}
5050
}
5151

52-
protected function assertTokens($expression, array $classNames, Lexer $lexer = null, &$tokens = [])
52+
protected function assertTokens($expression, array $classNames, ?Lexer $lexer = null, &$tokens = [])
5353
{
5454
$lexer = $lexer ?: $this->lexer;
5555
$tokens = iterator_to_array($lexer->lex($expression));

tests/Phug/AbstractParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protected function prepareTest()
1717
$this->parser = new Parser();
1818
}
1919

20-
protected function assertNodes($expression, $expected, Parser $parser = null)
20+
protected function assertNodes($expression, $expected, ?Parser $parser = null)
2121
{
2222
if (is_array($expected)) {
2323
$expected = implode("\n", $expected);

tests/Phug/Compiler/NodeCompiler/BlockNodeCompilerTest/TestBlockNodeCompiler.php

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

1010
class TestBlockNodeCompiler extends BlockNodeCompiler
1111
{
12-
public function compileNode(NodeInterface $node, ElementInterface $parent = null)
12+
public function compileNode(NodeInterface $node, ?ElementInterface $parent = null)
1313
{
1414
$blocks = &$this->getCompiler()->getBlocksByName('foo');
1515
$blocks[] = 'bar';

tests/Phug/TestCompiler.php

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

99
class TestCompiler extends Compiler
1010
{
11-
public function compileNode(NodeInterface $node, ElementInterface $parent = null)
11+
public function compileNode(NodeInterface $node, ?ElementInterface $parent = null)
1212
{
1313
return 'foo';
1414
}

tests/Phug/TestState.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class TestState extends State
99
{
1010
private static $lastOptions;
1111

12-
public function __construct(Parser $parser, \Generator $tokens, array $options = null)
12+
public function __construct(Parser $parser, \Generator $tokens, ?array $options = null)
1313
{
1414
parent::__construct($parser, $tokens, $options);
1515

tests/Phug/Utils/MutedExceptionCompiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function throwException($message, $node = null, $code = 0, $previous = nu
1515
// removed
1616
}
1717

18-
public function compileNode(NodeInterface $node, ElementInterface $parent = null)
18+
public function compileNode(NodeInterface $node, ?ElementInterface $parent = null)
1919
{
2020
return $this->forcedReturn ?: parent::compileNode($node, $parent);
2121
}

tests/Phug/Utils/TwigFormat.php

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

99
class TwigFormat extends XhtmlFormat
1010
{
11-
public function __construct(Formatter $formatter = null)
11+
public function __construct(?Formatter $formatter = null)
1212
{
1313
parent::__construct($formatter);
1414

0 commit comments

Comments
 (0)