clean-code-php
clean-code-php copied to clipboard
:bathtub: Clean Code concepts adapted for PHP
``` if (error) unhappy path; happy path; ``` Happy path should not be in a conditional. Would you welcome a PR?
> Arrays should be used to store lists: keyless elements of the same type. Would you welcome a PR explaining associative arrays should be intelligent objects?
https://github.com/jupeter/clean-code-php#use-default-arguments-instead-of-short-circuiting-or-conditionals I think, it's must be in "Functions" section and renamed with something like "Don't pass NULL arguments".
thanks for your efforts, I suggest adding the Arabic version of this guide, and I'm ready to do the translation process and add it to the translations list.
I didn't really understand the point of traits until recently and now I can't live without them. And since I didn't find anything about traits on here, I wanted to...
Hi, I would like to bring up a discussion about "[Don't add unneeded context](https://github.com/jupeter/clean-code-php#dont-add-unneeded-context)". I have few considerations why I think this very example is not good and the context...
I recently stumbled across a problem applying the [Dependency Inversion Principle (DIP)](https://github.com/jupeter/clean-code-php#dependency-inversion-principle-dip) trying to write classes for communication with either local (`fopen()`) or remote (`fsockopen()`) serial ports. (In the following...
In the section "Function arguments (2 or fewer ideally)" it says: "Zero arguments is the ideal case. One or two arguments is ok, and three should be avoided." However, I...
You could really add a good multi-inheritance or composition example by mentioning threads. Although they may force a developer to jump into polimorphic tables, they are a great way to...