mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 23:50:09 +00:00
Refresh notes in various actions.
This commit is contained in:
@@ -31,26 +31,24 @@ class ActionExpressionLanguageProvider implements ExpressionFunctionProviderInte
|
||||
{
|
||||
public function getFunctions(): array
|
||||
{
|
||||
|
||||
return [
|
||||
|
||||
new ExpressionFunction('constant', function ($str): string {
|
||||
return sprintf('(is_string(%1$s) ? strtolower(%1$s) : %1$s)', $str . '!');
|
||||
return sprintf('(is_string(%1$s) ? strtolower(%1$s) : %1$s)', $str.'!');
|
||||
}, function ($arguments, $str): string {
|
||||
if (!is_string($str)) {
|
||||
return $str;
|
||||
}
|
||||
|
||||
return strtolower($str . '!');
|
||||
return strtolower($str.'!');
|
||||
}),
|
||||
new ExpressionFunction('enum', function ($str): string {
|
||||
return sprintf('(is_string(%1$s) ? strtolower(%1$s) : %1$s)', $str . '?');
|
||||
return sprintf('(is_string(%1$s) ? strtolower(%1$s) : %1$s)', $str.'?');
|
||||
}, function ($arguments, $str): string {
|
||||
if (!is_string($str)) {
|
||||
return $str;
|
||||
}
|
||||
|
||||
return strtolower($str) . '?';
|
||||
return strtolower($str).'?';
|
||||
}),
|
||||
|
||||
ExpressionFunction::fromPhp('substr'),
|
||||
|
||||
Reference in New Issue
Block a user