Problem
phpmnd can detect magic-number and magic-flag anti-patterns, but current workflows do not surface this style debt.
Magic numbers remain a maintainability and readability burden, especially across larger teams.
Proposal
Evaluate adding optional phpmnd checks under analysis quality commands.
Suggested defaults:
- Add as opt-in static-quality command/flag.
- Use rule presets tuned for repository size.
- Report findings by file and context with stable sorting.
Goals
- Reduce numeric literal drift and improve readability in long-term maintained code.
- Keep enforcement off by default until teams accept baselines.
- Preserve low-friction migration path for existing projects.
Expected Benefits
- Cleaner, more consistent code standards.
- Lower cognitive load in legacy and shared packages.
Why Not (if skipped)
- False positives in numerically heavy domains can cause low-signal noise.
- Some teams intentionally prefer explicit domain constants already handled elsewhere.
Non-goals
- Enforcing strict numeric style globally in all repos at once.
- Replacing existing code-style tooling.
Acceptance Criteria
Architectural / Isolation Criteria
- MUST:
phpmnd execution is isolated from composer/dependency checks.
- MUST: The analysis command remains additive and backward compatible.
Problem
phpmndcan detect magic-number and magic-flag anti-patterns, but current workflows do not surface this style debt.Magic numbers remain a maintainability and readability burden, especially across larger teams.
Proposal
Evaluate adding optional
phpmndchecks under analysis quality commands.Suggested defaults:
Goals
Expected Benefits
Why Not (if skipped)
Non-goals
Acceptance Criteria
Architectural / Isolation Criteria
phpmndexecution is isolated from composer/dependency checks.