clean-code-php
clean-code-php copied to clipboard
:bathtub: Clean Code concepts adapted for PHP
Does anyone have a or know of a concrete example of php code that would reflect "Clean Architecture" page 166 figure 17.1. I simply can wrap my head around it?...
[Avoid type-checking](https://github.com/jupeter/clean-code-php#avoid-type-checking) doesn't address a realistic situation in which one might do type checking. If type declaration can be used that's great, but often it's not the case. One major...
https://github.com/jupeter/clean-code-php#dont-write-to-global-functions Could you explain please why you suggest class as a alternative of function in this case? Why classes whouldn't conflict between each other like functions in that example? And...
In [ISP](https://github.com/jupeter/clean-code-php/blob/master/README.md#interface-segregation-principle-isp) there are severe design flaws which clearly indicate you have no experience with goverment employees: ```php class Human implements Employee { public function work(): void { // ....working...
In the comment for Liskov Substitution Principle bad example : ``` function renderLargeRectangles(Rectangle $rectangles): void { foreach ($rectangles as $rectangle) { $rectangle->setWidth(4); $rectangle->setHeight(5); $area = $rectangle->getArea(); // BAD: Will return...
Maybe we should use spoilers for examples? This is just an idea. --- ### Avoid conditionals This seems like an impossible task. Upon first hearing this, most people say, "how...
'Balance' as a noun is the name of the _number_ representing the amount of money in your account. You cannot withdraw or deposit the actual number. You can however: -...
https://github.com/jupeter/clean-code-php#functions-should-only-be-one-level-of-abstraction I think your refactoring results in two helper-classes "Lexer" and "Tokenizer". These types of classes should not be mocked nor handled by the di-framework. Uncle Bob suggests to >...
In this PR, I did the following: - [x] Grammar errors fixed - [x] Added Indonesian translation repo (mine, done) - [x] Adding refactor code optional under collapsible markdown to...
Bonjour Iogr, A partir du cahier de charge mis à jour, j'ai élaboré une première version du dictionnaire de données. Je vais maintenant mettre en place le diagramme de cas...