Skip to content

Commit

Permalink
Fix formating issue and wrong import.
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasKenneth committed May 29, 2024
1 parent 490289c commit 13787c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Kiota.Builder/Refiners/PhpRefiner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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<Type> { typeof(CodeEnumOption) });
Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 13787c0

Please sign in to comment.