refactoring-code_smells-design_patterns icon indicating copy to clipboard operation
refactoring-code_smells-design_patterns copied to clipboard

Incorrect Logic in StatusFor(DateTime date)

Open EduardKrutii opened this issue 8 months ago • 0 comments

The StatusFor(DateTime date) method contains redundant checks and does not correctly handle cases where the given date matches the endDate. The unnecessary conditions make the logic harder to follow and can lead to incorrect status evaluations, potentially causing unexpected behavior in the system.

Link to file - https://github.com/CodelyTV/refactoring-code_smells-design_patterns/blob/main/examples/csharp/csharp-booking-01_base/src/Booking/Booking.cs

EduardKrutii avatar Feb 09 '25 20:02 EduardKrutii