phpmd / phpmd

PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.
https://phpmd.org
BSD 3-Clause "New" or "Revised" License
2.34k stars 347 forks source link

Possible CleanCode/BooleanArgumentFlag.php Bug #687

Closed dehrk closed 4 years ago

dehrk commented 4 years ago

Should this rule be adding a violation on private methods? If it's only being called from inside the class, wouldn't that mean that responsibility is still "entirely encapsulated by the class"?

kylekatarnls commented 4 years ago

Hi, first, please edit your issue to respect the issue pattern (https://github.com/phpmd/phpmd/issues/new?template=1_Bug.md) with missing informations.

Then I don't see a good example that would justify that private method could break this rule. It's about: 1 method serves 1 goal (private methods too).

If you gives a concrete example as suggested in the pattern, we could be able to see if your case is a relevant exception to the rule or a normal case you can improve following the rule.

Thanks,

dehrk commented 4 years ago

Thanks for the quick response. I can see your point there, so feel free to close this.