Fixed indents
This commit is contained in:
parent
7624fa7e27
commit
0f8e26f39b
|
|
@ -1,9 +1,9 @@
|
|||
{%- import '../../macroses/common.utils.twig' as utils -%}
|
||||
|
||||
{%- if fields is not empty -%}
|
||||
{%- for field in fields -%}
|
||||
{%- if field.nullable or field.optional -%}
|
||||
{{ field.name }}: Bool = false{%- if not (loop.last) %}, {% endif %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- for field in fields -%}
|
||||
{%- if field.nullable or field.optional -%}
|
||||
{{ field.name }}: Bool = false{%- if not (loop.last) %}, {% endif %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{%- import '../../macroses/common.utils.twig' as utils -%}
|
||||
|
||||
func copy{%- if hasChilds -%}{{ type.baseTypeName }}{%- endif -%}With({%- include '../class/nullable-parameters-fields.twig' with { fields: allFieldsOrdered } -%}) -> {{ type.baseTypeName }} {
|
||||
return {{ type.baseTypeName }}({% include '../class/fields-optional-initialization.twig' with { fields: allFieldsOrdered } %})
|
||||
}
|
||||
func copy{%- if hasChilds -%}{{ type.baseTypeName }}{%- endif -%}With({%- include '../class/nullable-parameters-fields.twig' with { fields: allFieldsOrdered } -%}) -> {{ type.baseTypeName }} {
|
||||
return {{ type.baseTypeName }}({% include '../class/fields-optional-initialization.twig' with { fields: allFieldsOrdered } %})
|
||||
}
|
||||
|
||||
{%- set containsOptionalFields = false -%}
|
||||
{%- if allFieldsOrdered is not empty -%}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
{%- if fields is not empty -%}
|
||||
{%- for field in fields -%}
|
||||
{%- if field.nullable or field.optional -%}
|
||||
{{ field.name }}: {{ field.name }} ? nil : self.{{ field.name }}{%- if not (loop.last) %}, {% endif %}
|
||||
{%- if field.nullable or field.optional -%}
|
||||
{{ field.name }}: {{ field.name }} ? nil : self.{{ field.name }}{%- if not (loop.last) %}, {% endif %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
Loading…
Reference in New Issue