Skip to content

More PHPStan level 6 cleanups, all remaining .inc files - #1613

Merged
cpeel merged 6 commits into
DistributedProofreaders:masterfrom
bpfoley:level6-1
Aug 31, 2026
Merged

More PHPStan level 6 cleanups, all remaining .inc files#1613
cpeel merged 6 commits into
DistributedProofreaders:masterfrom
bpfoley:level6-1

Conversation

@bpfoley

@bpfoley bpfoley commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

In some cases this involves changing function signatures to be more restrictive (eg using bool instead of truthy values, etc).

Some of this needs revisiting to refine it further, in particular the api/ApiRouter use of array<string ,mixed> for REST path arguments can probably benefit from shaped arrays; and ProjectInfoHolder::row() needs a rototill.

Some of these are less specific than they could be, and a few of
these involve repeating array shapes that would probably be better
done as DTOs. But it's a step in the right direction.
- Do a few renames where the function was misleading (should be
  format_foo because it returns a string, not showFoo)
- Use bool instead of int=0/1 in a few places
- Leave a few TODOs for later cleanups
Comment thread tools/project_manager/edit_common.inc Outdated
Comment thread tools/project_manager/word_freq_table.inc Outdated
Also tweak some  APIs where the types worked against us or were overly
broad and update the callers.
@cpeel
cpeel merged commit 5c8610c into DistributedProofreaders:master Aug 31, 2026
12 checks passed
@bpfoley
bpfoley deleted the level6-1 branch August 31, 2026 17:03
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.

2 participants