Answer the question
In order to leave comments, you need to log in
How to refactor files into a couple of thousand lines?
It was a simple 3 page website. Now it is a complex site on 3 pages. Bek has grown from a couple of php files into a hundred complex files in three years. Integration with srm, sms, telephony, instant messengers and hell. Added agency and partner cabinets. A bunch of webhooks, widgets...
In general, there are many files with complex logic on the back. some of them are 500 line switch statements. Which side to approach the refractor of such files?
Answer the question
In order to leave comments, you need to log in
1. You open a file.
2. You read the code.
3. Trying to understand.
4. Write tests
5. Refactor.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question