Skip to content

Narrow some more function/property type hints - #1643

Merged
cpeel merged 3 commits into
DistributedProofreaders:masterfrom
bpfoley:tidy-type-hints
Sep 21, 2026
Merged

cpeel merged 3 commits into
DistributedProofreaders:masterfrom
bpfoley:tidy-type-hints

Conversation

@bpfoley

@bpfoley bpfoley commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Some more type hint tweaks while working on PHPStan level 7

  • Use strict equality checks on arguments where magic strings mean something special. This allows PHPStan to handle 'ALL'|string[] etc properly.
  • Narrow PHP function return types in a few places. Unlike the last patchset, this does influence some runtime checks, but should be safe.

@cpeel
cpeel merged commit eef95b4 into DistributedProofreaders:master Sep 21, 2026
12 checks passed
@bpfoley
bpfoley deleted the tidy-type-hints branch September 21, 2026 20:04
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