Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR-Fixed Solid Principle errors, sm-core various code fixes #1054

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cbeb120
Copy link

@cbeb120 cbeb120 commented Dec 9, 2024

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.

Copy link

sonarqubecloud bot commented Dec 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant