mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-26 17:58:43 +00:00
feature #2965 Change false to null to allow for type hinting (fabpot)
This PR was merged into the 3.x branch.
Discussion
----------
Change false to null to allow for type hinting
Commits
-------
75333805 changed false to null to allow for type hinting
This commit is contained in:
@@ -665,7 +665,7 @@ class ExpressionParser
|
||||
|
||||
private function getFunctionNodeClass(string $name, int $line): string
|
||||
{
|
||||
if (false === $function = $this->env->getFunction($name)) {
|
||||
if (!$function = $this->env->getFunction($name)) {
|
||||
$e = new SyntaxError(sprintf('Unknown "%s" function.', $name), $line, $this->parser->getStream()->getSourceContext());
|
||||
$e->addSuggestions($name, array_keys($this->env->getFunctions()));
|
||||
|
||||
@@ -691,7 +691,7 @@ class ExpressionParser
|
||||
|
||||
private function getFilterNodeClass(string $name, int $line): string
|
||||
{
|
||||
if (false === $filter = $this->env->getFilter($name)) {
|
||||
if (!$filter = $this->env->getFilter($name)) {
|
||||
$e = new SyntaxError(sprintf('Unknown "%s" filter.', $name), $line, $this->parser->getStream()->getSourceContext());
|
||||
$e->addSuggestions($name, array_keys($this->env->getFilters()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user