Ultimate-Multisite / Ultimate-Multisite/ultimate-multisite
Reduce PHPStan baseline and fix type debt
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 214
- Forks
- 86
- Avg merge
- 5h 29m
- Merged PRs (30d)
- 60
Description
What
Reduce and eventually remove the 521-finding PHPStan baseline introduced by #1805 while preserving add-on compatibility rules for public APIs.
Why
The baseline restores a regression gate but represents substantial type debt. Fixing the findings will improve defect detection and make future PHPStan upgrades safer.
Tier
tier:standard — findings span many production components and require semantic type decisions, but the gate and rollback are established.
Files
phpstan-baseline.neonphpstan.neon.dist- Production files named by baseline entries under
inc/,views/, andultimate-multisite.php
Reference pattern
Run pnpm run stan, fix underlying code or accurate PHPDoc, and remove only the matching count-specific baseline entry. Do not add public return declarations to extensible base classes, interfaces, gateways, integrations, UI base elements, models, or checkout APIs.
Implementation steps
- Group findings by identifier and prioritize real undefined-variable, argument, and return-contract defects.
- Apply small coherent fixes with focused regression tests where behavior is uncertain.
- Regenerate or hand-reduce the baseline only after each fixed group.
- Keep broad ignore rules and analysis level unchanged unless separately justified.
Acceptance criteria
- Baseline finding count decreases materially.
- No new broad ignore rule is introduced.
-
pnpm run stanpasses. - Relevant focused PHPUnit tests pass.
- Public extension compatibility constraints remain intact.
Verification
pnpm run stanpnpm run quality- Focused PHPUnit classes for changed production code
Dependency
Blocked by #1805; begin after PR #1806 merges.
aidevops.sh v3.32.317 plugin for OpenCode v1.18.29 with gpt-5.6-sol spent 4h 26m and 539,830 tokens on this with the user in an interactive session.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
After #1805 and PR #1806 are complete, run pnpm run stan and group findings from phpstan-baseline.neon by identifier, tracing entries into inc/, views/, and ultimate-multisite.php. Fix coherent type issues with focused PHPUnit coverage where needed, then remove only matching baseline entries; pnpm run stan, pnpm run quality, and relevant PHPUnit classes must pass without weakening compatibility rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, testing, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100