Skip to content

Extract code for low-level work with order from Sort to OrderHelper#176

Merged
vjik merged 3 commits intomasterfrom
order-helper
Apr 3, 2024
Merged

Extract code for low-level work with order from Sort to OrderHelper#176
vjik merged 3 commits intomasterfrom
order-helper

Conversation

@vjik
Copy link
Member

@vjik vjik commented Apr 3, 2024

Q A
Is bugfix?
New feature? ✔️
Breaks BC?

@what-the-diff
Copy link

what-the-diff bot commented Apr 3, 2024

PR Summary

  • Enhancements to Ordering Functions
    We've introduced a new helper class named OrderHelper. This class will take care of tasks related to converting and managing orders. It simplifies the process of working with orders, promotes code reuse, and centralizes this specific functionality.

  • Refactoring Changes in Sort.php

    • The existing process that transformed order strings into arrays is now handled by a new method OrderHelper::stringToArray. This should help us manage this function more globally, increasing efficiency.

    • Similarly, the procedure for converting an order array back into a string now has been replaced with a call to OrderHelper::arrayToString. With this enhancement, code maintenance will be simplified because we are managing this operation from a single place.

  • Test Coverage Improvements
    In order to verify the functionality of our new OrderHelper class, we've added OrderHelperTest.php. This ensures that the methods in 'OrderHelper' class function as expected and will alert us to any future disruptions to its functionality.

@vjik vjik marked this pull request as ready for review April 3, 2024 14:08
@vjik vjik added the status:code review The pull request needs review. label Apr 3, 2024
@vjik vjik requested a review from a team April 3, 2024 14:09
@vjik vjik merged commit b387e71 into master Apr 3, 2024
@vjik vjik deleted the order-helper branch April 3, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants