Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
remove Yoda condition #5381
Yoda conditions : a questionable best practice that makes code less error-prone, but also harder to read for people that don't share the same grammar rules as people from Dagobah. Anyway, they are useful when you want to avoid confusing assignment and equality operators, but I doubt people often write
This is perfectly fine here. This is comparing a constant and the return value of a method call, so the Yoda condition does not add benefit here.