Skip to content

Refactor reward tracking variables to camelCase#4366

Open
thefatcode wants to merge 2 commits intoopensourcepos:masterfrom
thefatcode:fix/pr-4361-camelcase
Open

Refactor reward tracking variables to camelCase#4366
thefatcode wants to merge 2 commits intoopensourcepos:masterfrom
thefatcode:fix/pr-4361-camelcase

Conversation

@thefatcode
Copy link

  • Align local variable names with camelCase per PSR compliance review notes.
  • Keep input array keys (e.g., $sale_data) unchanged while refactoring local variables used in reward calculations and logging.
  • Update applies to reward handling in update() and delete() in app/Models/Sale.php.

@jekkos jekkos requested a review from objecttothis January 18, 2026 20:25
/**
* Determines if the payment type represents a rewards payment across locales.
*/
private function is_reward_payment(string $payment_type): bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function name and all calls need to be refactored still to camelCase

/**
* Returns unique localized labels for the rewards payment type.
*/
private function get_reward_payment_labels(): array
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@objecttothis
Copy link
Member

Just these two functions and their calls that need to be refactored then we should be good to merge.

@jekkos
Copy link
Member

jekkos commented Jan 20, 2026

@objecttothis might be out of scope but extracting rewards specific logic to its own helper would make the code a bit cleaner

@objecttothis
Copy link
Member

I agree. If @thefatcode doesn't want to do it then we should create an issue.

@objecttothis might be out of scope but extracting rewards specific logic to its own helper would make the code a bit cleaner

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.

3 participants