File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Symfony/Component/ExpressionLanguage Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -110,14 +110,14 @@ public function parse($expression, $names)
110
110
* @param callable $compiler A callable able to compile the function
111
111
* @param callable $evaluator A callable able to evaluate the function
112
112
*
113
- * @throws \LogicException when register a function after calling evaluate/compilate the first time
113
+ * @throws \LogicException when register a function after calling evaluate(), compile() or parse() the first time
114
114
*
115
115
* @see ExpressionFunction
116
116
*/
117
117
public function register ($ name , $ compiler , $ evaluator )
118
118
{
119
- if ($ this ->parser ) {
120
- throw new \LogicException ('It \' s impossible to register function after calling evaluate/compilate the first time . ' );
119
+ if (null !== $ this ->parser ) {
120
+ throw new \LogicException ('Registering functions after calling evaluate(), compile() or parse() is not supported . ' );
121
121
}
122
122
123
123
$ this ->functions [$ name ] = array ('compiler ' => $ compiler , 'evaluator ' => $ evaluator );
You can’t perform that action at this time.
0 commit comments