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

Split ValidationService into domain-specific validation services #830

Open
coderabbitai bot opened this issue Feb 10, 2025 · 0 comments
Open

Split ValidationService into domain-specific validation services #830

coderabbitai bot opened this issue Feb 10, 2025 · 0 comments
Assignees
Labels
code complexity and formatting Reduce code complexity or fix formatting php Pull requests that update Php code

Comments

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2025

Current Issues

  • Overall class complexity is too high (123, threshold is 100)
  • validateGetBookableFreeDays() has high NPath complexity (576)

Proposed Solution

  1. Split into domain-specific validation services
  2. Extract validation rules into separate rule objects using the specification pattern
  3. Consider using a validation chain or builder pattern

This will make the validation logic more modular and easier to maintain.

Related PR

This issue was identified in #765

@ThomasAFink ThomasAFink added code complexity and formatting Reduce code complexity or fix formatting php Pull requests that update Php code labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code complexity and formatting Reduce code complexity or fix formatting php Pull requests that update Php code
Projects
None yet
Development

No branches or pull requests

1 participant