Apply suggestions from code review

Co-authored-by: Fabien Potencier <fabien@potencier.org>
This commit is contained in:
Lorenz Schäfer
2025-01-09 08:01:12 +01:00
committed by Fabien Potencier
parent 2b95bd6092
commit dacbe51b3a
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -1,11 +1,11 @@
``invoke``
=======
==========
The ``invoke`` filter invokes an arrow function with the given arguments:
.. code-block:: twig
{% set person = {first: "Bob", last: "Smith"} %}
{% set person = { first: "Bob", last: "Smith" } %}
{% set func = p => "#{p.first} #{p.last}" %}
{{ func|invoke(person) }}
@@ -16,4 +16,4 @@ Note that the arrow function has access to the current context.
Arguments
---------
All given arguments are passed to the arrow function
All given arguments are passed to the arrow function.
+2 -2
View File
@@ -1018,9 +1018,9 @@ The following operators don't fit into any of the other categories:
Arrow function support for functions, macros, and method calls was added in
Twig 3.15 (filters and tests were already supported).
Arrow functions can be invoked using the ``invoke`` filter.
Arrow functions can be called using the ``invoke`` filter:
.. versionadded:: 3.19
.. versionadded:: 3.19
The ``invoke`` filter has been added in Twig 3.19.