Skip to content

Commit

Permalink
Ensured that parameter passed to getCollectionOfPrimitiveValues is a …
Browse files Browse the repository at this point in the history
…string
  • Loading branch information
Microsoft Graph DevX Tooling authored and Microsoft Graph DevX Tooling committed Nov 28, 2024
1 parent 803e377 commit 0f05da2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,11 @@ private string GetDeserializationMethodName(CodeTypeBase propType, CodeMethod me
// };
if (currentType.TypeDefinition == null)
{
parseNodeMethod = $"getCollectionOfPrimitiveValues([{conventions.TranslateType(propType)}::class, '{CreateDiscriminatorMethodName}'])";
parseNodeMethod = $"getCollectionOfPrimitiveValues('{CreateDiscriminatorMethodName}')";
}
else if (conventions.PrimitiveTypes.Contains(currentType.TypeDefinition.Name.ToLowerInvariant()))
{
parseNodeMethod = $"getCollectionOfPrimitiveValues([{conventions.TranslateType(propType)}::class, '{CreateDiscriminatorMethodName}'])";
parseNodeMethod = $"getCollectionOfPrimitiveValues('{CreateDiscriminatorMethodName}')";
}
else if (currentType.TypeDefinition is CodeEnum)
{
Expand Down

0 comments on commit 0f05da2

Please sign in to comment.