OO will save us! • it's hard the transaction of paradigms Procedural --- to --- OOP • Qualities matters: ◦ cohesion ◦ loose coupling ◦ no redundancy ◦ encapsulation ◦ testability ◦ readability WTF?
Don't use ELSE keyword #3 Wrap all primitives and String #4 First class collections #5 One dot per file #6 Don't abbreviate #7 Keep all entities small #8 No classes with more than two instances variable #9 No getters/setters/properties
you know each object has the responsible not totally applicable in PHP... ... but nested calls • show some problems of encapsulation make harder to debug ... • we can use... in chain of get and setters in chain of objects with a fluent interface
• because I use the name several times... • .... maybe your method is to heavily and you should remove duplication • or because the names are too long... • ... maybe you are misplacing responsibilities or there is a missing class... Avoid also duplicate of words...
Yep quite hard this... but let's try... with this we can decomposition, we can separate the concerns... maybe 5 variables it's also okay don't you think?