Fixed indents

This commit is contained in:
Ivan Babkin 2019-04-26 16:27:47 +03:00
parent 7624fa7e27
commit 0f8e26f39b
3 changed files with 10 additions and 10 deletions

View File

@ -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 -%}

View File

@ -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 -%}

View File

@ -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 -%}