Closed IanDelMar closed 1 month ago
I am sorry. The happy path should not be in a conditional. https://github.com/szepeviktor/very-clean-code
I agree in most cases, but not for such trivial if conditions where one path results in no action (void). However, I see where you're coming from.
However,
You earn money better than me!!!
Viktor, I don’t think I’ve ever mentioned that all my work with web/WordPress stuff has been entirely voluntary for human rights NGOs – I’ve never earned any money from it. At the moment, I’m not even using the packages I’m contributing to. I understand you’re feeling frustrated, but I’d appreciate it if you could refrain from making assumptions about my income, motivations, or anything else about me that you might not fully know. It’s important to me that we can share different perspectives, even on small matters, while being mindful and respectful of each other.
I genuinely don’t know what it was about the word "however" that was triggering, and I apologise if it came across as condescending or something similar. That was absolutely not my intention.
It is a misunderstanding, Ian. You are a normal developer with real-world attitude. But I am a freaking SCIENTIST with an illness called perfectionism. I cry for days when I see a happy path in a conditional. Sorry about that.
I always try to hide my real self, but sometimes it pops up. Sorry again.
Alright, let's agree that this was a misunderstanding.
ignoreStandaloneIfInScope
ignores anif
that is standalone within a scope (see sniff description).Without setting
ignoreStandaloneIfInScope
to true, Slevomat enforces changing this:to this:
with the following error message:
Use early exit to reduce code nesting.
Clearly, the nesting is not reduced, and I would argue that a layer of complexity is added.