The expression return array(new Twig_Si...this, 'handleOutput'))) returns the type array<integer,Twig_SimpleFunction> which is incompatible with the documented return type void.
Loading history...
14
16
new Twig_SimpleFunction('handleOutput', [$this, 'handleOutput']),
15
];
16
}
17
18
3
public function handleOutput($output, $outputHtml, $nullHtml) {
It is not recommended to use PHP's closing tag ?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended
as you might accidentally add whitespace after the closing tag which would then
be output by PHP. This can cause severe problems, for example headers cannot be
sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and
it also has no negative effects whatsoever.