It was easy to trick ModifierReused for a false positive when using an early return. With these changes, that's harder now. I also had the chance to rewrite this part of the code to make it simpler to understand, and more robust -- so win/win I guess?
It was easy to trick ModifierReused for a false positive when using an early return. With these changes, that's harder now. I also had the chance to rewrite this part of the code to make it simpler to understand, and more robust -- so win/win I guess?
Added some unit tests as the cherry on top.