Legacy Code refactoring project
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
GameLegacy
Test
.gitignore
MasterOutput.txt
README.md
composer.json
phpunit.xml.dist

README.md

##Refactor Legacy Code

Project based on caradojo/trivia

Refactoring a PHP Legacy code application without tests.

  • Use tags to see the different phases of refactoring

Phases

  • Initial -> start the refactoring project
  • First Output Test -> Create first test save the output to a file
  • Constant and magic string -> Autoload and extract variables.
  • Complex Conditional -> To be simple
  • Game testeable methods -> Simple Tests
  • Complex methods -> difficult tests
  • Presentation layer -> responsability separation
  • Inyection dependecies -> creating interfaces
  • Analyzing Concerns -> Go to OOP and think about future work