Closed nossr50 closed 5 years ago
There is a lot of room for improvement in this codebase, this PR should help you get started.
I made most the requested changes, the remaining things can be solved by minor edits. I just lack the energy to do them for the time being.
This PR does the following things
1) All requests to configs from the API or its implementation are now handled by ConfigUtils, which has public static getter boilerplate for grabbing what you need
2) Removed all unnecessary and excessive parameters from method signatures in the InternalAPI class
Methods in the InternalAPI class now use getters for fields that used to be passed to them from other classes, these fields being moved to getters helps with encapsulation and readability. The parameters that used to be passed to these methods had nothing to do with the classes passing them and were initialized from static methods, so it only makes sense to move them to a utility class as getter boilerplate.
3) Code cleanup in InternalAPI & TFAAPI
I removed redundant and or useless code that has become obsolete from the refactoring I've done to the other classes. There is actually a lot more work I could do but I would be here for days.
In addition to this I've moved duplicate code into new private methods inside of InternalAPI as necessary.