diff --git a/internal/tlcodegen/type_rw_maybe_php.go b/internal/tlcodegen/type_rw_maybe_php.go index 2d7dabb..958b781 100644 --- a/internal/tlcodegen/type_rw_maybe_php.go +++ b/internal/tlcodegen/type_rw_maybe_php.go @@ -61,7 +61,7 @@ func (trw *TypeRWMaybe) PhpReadMethodCall(targetName string, bare bool, initIfDe initIfDefault = false } bodyReader := trw.element.t.trw.PhpReadMethodCall(targetName, trw.element.bare, initIfDefault, args) - for i, _ := range bodyReader { + for i := range bodyReader { bodyReader[i] = " " + bodyReader[i] } result = append(result, bodyReader...) @@ -91,7 +91,7 @@ func (trw *TypeRWMaybe) PhpWriteMethodCall(targetName string, bare bool, args *T } { bodyWriter := trw.element.t.trw.PhpWriteMethodCall(targetName, trw.element.bare, args) - for i, _ := range bodyWriter { + for i := range bodyWriter { bodyWriter[i] = " " + bodyWriter[i] } result = append(result, bodyWriter...) diff --git a/internal/tlcodegen/type_rw_struct_php.go b/internal/tlcodegen/type_rw_struct_php.go index 666aa46..d6dd3ed 100644 --- a/internal/tlcodegen/type_rw_struct_php.go +++ b/internal/tlcodegen/type_rw_struct_php.go @@ -65,7 +65,7 @@ func (trw *TypeRWStruct) phpGetFieldArgsTree(currentType *TypeRWWrapper, current tree.CloneValuesFrom((*genericsToTrees)[generic]) return } - for i, _ := range currentType.origTL[0].TemplateArguments { + for i := range currentType.origTL[0].TemplateArguments { actualArg := currentType.arguments[i] actualArgRef := currentTypeRef.Args[i] if actualArg.isNat { @@ -93,7 +93,6 @@ func (trw *TypeRWStruct) phpGetFieldArgsTree(currentType *TypeRWWrapper, current } } } - return } func (trw *TypeRWStruct) PhpClassNameReplaced() bool {