PR-Fixed Solid Principle errors, sm-core various code fixes #1054
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactored the removePaymentModuleConfiguration method in PaymentServiceImpl.java to reduce redundancy and improve maintainability. Introduced helper methods to encapsulate specific tasks, such as updating encrypted configurations and removing custom modules. This approach simplifies the method by breaking it into smaller, focused units, making the code easier to read, test, and debug while adhering to modular design principles.
Refactored a few methods within ShoppingCartServiceImpl.java and OrderServiceImpl.java to better adhere to SOLID principles and improve maintainability and readability.
Refactored ‘OrderService.java’ into three interfaces to help with ISP and SRP violations. As well as change some of the redundant method usage in the OrderService file.
Refactored the deleteShoppingCart method in the ShoppingCartServiceImpl class to optimize database operations. Also added two new methods to the class: markObsolete and checkObsolete, and changed references to isObolete and setObsolete to pave the way to introduce a cart obsolescence domain service to better adhere to domain driven design while keeping the current code operational.
Refactored the TransactionServiceImpl.java to include one of the DDD principles. That principle being the Value objects. The “transactionType” is a value object of itself.