Skip to content

Improve readability as a follow up to e302692 - #7107

Merged
aortiz-msft merged 2 commits into
devfrom
dev-aortiz-followups
Feb 6, 2026
Merged

aortiz-msft merged 2 commits into
devfrom
dev-aortiz-followups

Conversation

@aortiz-msft

Copy link
Copy Markdown
Contributor

Bug

Description

Fixes: Improves readability of as a follow-up to e302692

When choosing between using two if's vs an if-else, one consideration should be whether the order of the if statements can be swapped. If they can be swapped, use two if's. If the order matters, use if-else. In this case, the order does matter, so using if-else makes more sense. In order words, the if-else structure codifies the fact that order of the check matters.

Also refactored the code to return from a single point except for obvious error conditions at the top, in accordance with coding conventions.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@aortiz-msft
aortiz-msft requested a review from a team as a code owner February 6, 2026 02:10
Nigusu-Allehu
Nigusu-Allehu previously approved these changes Feb 6, 2026
@aortiz-msft
aortiz-msft merged commit 025cba2 into dev Feb 6, 2026
16 checks passed
@aortiz-msft
aortiz-msft deleted the dev-aortiz-followups branch February 6, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants