@@ -14,19 +14,20 @@ public function getFunctions(): array
14
14
return [
15
15
ExpressionFunction::fromPhp ('sprintf ' , 'format ' ),
16
16
ExpressionFunction::fromPhp ('trim ' , 'trim ' ),
17
- ExpressionFunction:: fromPhp ( ' ucfirst ' , 'capitalize ' ),
18
- ExpressionFunction:: fromPhp ( ' strtolower ' , 'toLowerCase ' ),
17
+ new Capitalize ( 'capitalize ' ),
18
+ new ToLowerCase ( 'toLowerCase ' ),
19
19
ExpressionFunction::fromPhp ('mb_substr ' , 'search ' ),
20
- ExpressionFunction:: fromPhp ( ' strtoupper ' , 'toUpperCase ' ),
20
+ new ToUpperCase ( 'toUpperCase ' ),
21
21
ExpressionFunction::fromPhp ('number_format ' , 'formatNumber ' ),
22
22
ExpressionFunction::fromPhp ('strpos ' , 'indexOf ' ),
23
23
ExpressionFunction::fromPhp ('str_replace ' , 'replace ' ),
24
24
ExpressionFunction::fromPhp ('strip_tags ' , 'stripHtml ' ),
25
25
ExpressionFunction::fromPhp ('json_decode ' , 'decode ' ),
26
26
ExpressionFunction::fromPhp ('preg_replace ' , 'replaceByExpression ' ),
27
- ExpressionFunction:: fromPhp ( ' ucwords ' , 'capitalizeWords ' ),
27
+ new CapitalizeWords ( 'capitalizeWords ' ),
28
28
ExpressionFunction::fromPhp ('rtrim ' , 'removeWhitespaces ' ),
29
29
ExpressionFunction::fromPhp ('explode ' , 'splitIntoArray ' ),
30
+ new Truncate ('truncate ' ),
30
31
new FileName ('fileName ' ),
31
32
new DateTime ('dateTime ' ),
32
33
new FormatDate ('formatDate ' ),
0 commit comments