twigphp / Twig

Twig, the flexible, fast, and secure template language for PHP
https://twig.symfony.com/
BSD 3-Clause "New" or "Revised" License
8.18k stars 1.25k forks source link

Use a more precise return type in AbstractTwigCallable #4325

Closed stof closed 1 month ago

stof commented 2 months ago

This method is not expected to change the type of callable.

As using it is the only way to configure arguments for a Twig callable (there is no constructor argument for them), it avoids getting static analysis errors in Extension::getFunctions() when using it.

fabpot commented 1 month ago

Thank you @stof.