Skip to content

Commit

Permalink
Fix PHPStan reported errors
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Jul 25, 2020
1 parent 1d70005 commit 6abb2b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Bridges/TexyLatte/TexyModeMacro.php
Expand Up @@ -61,9 +61,10 @@ public function finalize(): array
* New node is found. Returns FALSE to reject.
*
* @param MacroNode $node
* @return bool|null
* @throws Latte\CompileException
*/
public function nodeOpened(MacroNode $node): void
public function nodeOpened(MacroNode $node): ?bool
{
if ($node->modifiers !== '') {
throw new Latte\CompileException("Modifiers are not allowed in {{$node->name}}.");
Expand All @@ -84,6 +85,7 @@ public function nodeOpened(MacroNode $node): void
$node->tokenizer->reset();
$node->openingCode = Latte\PhpWriter::using($node)
->write('<?php $this->global->texyModeStack[] = $this->global->texy->getMode(); $this->global->texy->setMode(%node.word); ?>');
return null;
}

/**
Expand Down

0 comments on commit 6abb2b0

Please sign in to comment.