From c923ad53c540ec7ebdd5515574c8559f19aa8e89 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 25 Feb 2025 17:04:26 +0300 Subject: [PATCH] Simplifying codegen for fields initialization --- tpl/macro.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/macro.twig b/tpl/macro.twig index 903bacb..2028607 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -221,7 +221,7 @@ array_merge(parent::CLASS_FIELDS_PROPS(), [] {%- elseif f.type is instanceof('\\mtgBuiltinType') ~%} {%- if has_token(f, 'default') -%} - \metagen_php\val_{{f.type}}({{apply_value_filters(f.name, f.tokens, token(f, 'default')|default_value, false)}}) + {{token(f, 'default')|default_value}} {%- elseif f.type.isstring -%} '' {%- else -%}