New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functions should do one thing #38
Comments
Perhaps we should delete this section, because it's analogous of Single Responsibility Principle (SRP). |
Agreed. The logic is basically identical + OOP promotes more robuts behavior Could you send PR to delete https://github.com/jupeter/clean-code-php#functions-should-do-one-thing ? |
@TomasVotruba i create PR for this #170 |
Bob Martin's "Clean Architecture" book says that "a function should do one, and only one, thing" is different to SRP, I don't know if that sways your thinking about keeping this section? I'm new here, but I'd personally think it's good to keep, maybe with a better example as Peter suggested.
|
The logic is same for class/method/property, so it only needs to be said once. See Occams razor. |
See Functions should do one thing.
Example is terrible.
My proposal for improvement was rejected #22
Need to think about how to make an example easier and better.
The text was updated successfully, but these errors were encountered: