Find the best Rector rule to solve your problem. Searching through 675 rules.
Found 1 rule. That's the one:
Change TwigExtension function/filter magic closures to inlined and clear callables
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
final class TerminologyExtension extends AbstractExtension
{
public function getFunctions(): array
{
return [
- new TwigFunction('resolve', [$this, 'resolve']);
+ new TwigFunction('resolve', $this->resolve(...)),
];
}
private function resolve($value)
{
return $value + 100;
}
}