Skip to content

Commit 6911173

Browse files
committed
minor #9764 [ExpressionLanguage] Add missing argument in example code (kevin-verschaeve, javiereguiluz)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #9764). Discussion ---------- [ExpressionLanguage] Add missing argument in example code Like the docs says just below > Both the compiler and evaluator are passed an arguments variable as their first argument The example was missing the `$arguments` for the `compiler` method Commits ------- 280c23c Reword 3ce4089 [ExpressionLanguage] Add missing argument in example code
2 parents 3b43503 + 280c23c commit 6911173

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/expression_language/extending.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ This method has 3 arguments:
4545
});
4646
4747
var_dump($expressionLanguage->evaluate('lowercase("HELLO")'));
48+
// this will print: hello
4849
49-
This will print ``hello``. Both the **compiler** and **evaluator** are passed
50-
an ``arguments`` variable as their first argument, which is equal to the
51-
second argument to ``evaluate()`` or ``compile()`` (e.g. the "values" when
52-
evaluating or the "names" if compiling).
50+
In addition to the custom function arguments, the **evaluator** is passed an
51+
``arguments`` variable as its first argument, which is equal to the second
52+
argument of ``compile()`` (e.g. the "values" when evaluating an expression).
5353

5454
.. _components-expression-language-provider:
5555

0 commit comments

Comments
 (0)