Task #44818
closedRestructure ConfigurationUtility and ConfigurationItemRepository
100%
Description
Restructure ConfigurationUtility and ConfigurationItemRepository:
These classes have no good separation and have no good scope separation. This leads to code smell and hard understanding of what is going on. For example, ConfigurationUtility calls createArrayFromConstants() of ConfigurationItemRepository, and violates a clean access separation (the utility should not call some repository method). All in all, the code is wired and hard to understand.
Separation idea:- Utility should take care of getting current configuration of some extension and merging with default values
- Repository should create the object hierachy from given merged configuration
Maybe it is even more wise to merge both classes into one (only to the repo), but that would work only, if the configuration is only needed for those repository method, and not otherwise.
All in all, this code already lead to several issues and should be done in a more clean and understandable way.