Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Early Returns in Functions #475

Open
ashleyshaw opened this issue Jan 9, 2025 · 0 comments
Open

Use Early Returns in Functions #475

ashleyshaw opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels
[Type] Enhancement A suggestion for improvement
Milestone

Comments

@ashleyshaw
Copy link
Member

Description
Adopt early return statements in functions to reduce nested conditionals and improve readability.

Why This Matters

  • Early returns streamline function logic and reduce code complexity.
  • Helps prevent deeply nested if/else chains.

Tasks

  1. Identify functions with multiple nested conditionals.
  2. Refactor them to use early return patterns.
  3. Confirm the refactored code matches existing behavior.
@ashleyshaw ashleyshaw added the [Type] Enhancement A suggestion for improvement label Jan 9, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Tour Operator Jan 9, 2025
@ashleyshaw ashleyshaw added this to the 2.1.0 milestone Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement
Projects
Status: Needs Triage
Development

No branches or pull requests

2 participants