From 3ffb69342bce7e4317987e9080a08771de59d947 Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Fri, 1 Nov 2024 16:11:31 -0400 Subject: [PATCH] - Fixed a bug within FunctionToken control structure where multiple definition were runned if a view was loaded more than once --- src/ControlStructure/FunctionToken.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ControlStructure/FunctionToken.php b/src/ControlStructure/FunctionToken.php index 523ace4..61ea545 100644 --- a/src/ControlStructure/FunctionToken.php +++ b/src/ControlStructure/FunctionToken.php @@ -33,7 +33,9 @@ class FunctionToken implements ControlStructure { protected function printFunction($context, ?string $arguments) : string { - return ""; + $name = trim(explode('(', $arguments, 2)[0]); + + return ""; } protected function printReturn($context, ?string $arguments) : string @@ -43,6 +45,6 @@ class FunctionToken implements ControlStructure { protected function printEndFunction($context) : string { - return ""; + return ""; } } \ No newline at end of file