diff --git a/src/Kiota.Builder/Refiners/PhpRefiner.cs b/src/Kiota.Builder/Refiners/PhpRefiner.cs index d3b3c7f242..95985de135 100644 --- a/src/Kiota.Builder/Refiners/PhpRefiner.cs +++ b/src/Kiota.Builder/Refiners/PhpRefiner.cs @@ -32,7 +32,7 @@ public override Task Refine(CodeNamespace generatedCode, CancellationToken cance Name = "BaseRequestBuilder", Declaration = new CodeType { - Name = $@"{AbstractionsNamespaceName}\Serialization", + Name = $@"{AbstractionsNamespaceName}", IsExternal = true } }, AccessModifier.Public); @@ -47,7 +47,7 @@ public override Task Refine(CodeNamespace generatedCode, CancellationToken cance _configuration.UsesBackingStore, static s => s, false, - AbstractionsNamespaceName, + $@"{AbstractionsNamespaceName}\Serialization", "ComposedTypeWrapper" ); ReplaceReservedNames(generatedCode, new PhpReservedNamesProvider(), reservedWord => $"Escaped{reservedWord.ToFirstCharacterUpperCase()}", new HashSet { typeof(CodeEnumOption) }); diff --git a/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs index 7aea844e06..8b8c870165 100644 --- a/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs @@ -868,7 +868,7 @@ private void WriteModelFactoryMethodBody(CodeMethod codeElement, CodeClass paren if (parentClass.DiscriminatorInformation.ShouldWriteDiscriminatorForInheritedType) WriteFactoryMethodBodyForInheritedModel(parentClass.DiscriminatorInformation.DiscriminatorMappings, writer, codeElement); - else if (parentClass.DiscriminatorInformation is { ShouldWriteDiscriminatorForUnionType: true, HasBasicDiscriminatorInformation: true}) + else if (parentClass.DiscriminatorInformation is { ShouldWriteDiscriminatorForUnionType: true, HasBasicDiscriminatorInformation: true }) WriteFactoryMethodBodyForUnionModelForDiscriminatedTypes(codeElement, parentClass, writer); else if (parentClass.DiscriminatorInformation.ShouldWriteDiscriminatorForIntersectionType) WriteFactoryMethodBodyForIntersectionModel(codeElement, parentClass, writer);