Refactoring
First of all, we have to get a minimum knowledge about the entire system/framework/platform.
Later, when we see something that needs to be refactored, proceed:
make tests to get 100% code coverage over the parts we will modify “poner los andamios”
refactor
Dependency Injection (construct, getters/setters, …)
self:: ⇒ static::
create mocks, stubs, ReflectionClasses, …
Strategies
Test Everything First
One Method, One Job (Also One Class, One Job) (following single responsability principle)
Don’t Be Afraid Of More Objects And Classes
Remove Dead, Unused, Unnecessary or Old Code
Document Your Code
References