Skip to content

Commit 9303d80

Browse files
committed
Simplified skipXml logic
It's unclear if we still need `skipXml` and we should probably reevaluate it as part of v5.0.0. For this version, however, it remains part of the interace. While we have it, we should follow Ignia's coding standards and use braces when dealing with `if`/`then` conditions. Or, better yet, just streamline it into a single line using the ternary operator.
1 parent bc0c1c7 commit 9303d80

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

OnTopic.Data.Sql/SqlTopicRepository.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,7 @@ private static string PersistRelations(Topic topic, SqlConnection connection, bo
715715
/*------------------------------------------------------------------------------------------------------------------------
716716
| Return the relationship attributes to append to the XML attributes (unless skipXml is set to true)
717717
\-----------------------------------------------------------------------------------------------------------------------*/
718-
if (skipXml) return "";
719-
else return CreateRelationshipsXml(topic);
718+
return skipXml? "" : CreateRelationshipsXml(topic);
720719

721720
}
722721

0 commit comments

Comments
 (0)