Skip to content

fix: add missing PHPDoc types for params and properties (PHPStan baseline)#10213

Open
jalexiscv wants to merge 1 commit into
codeigniter4:developfrom
jalexiscv:fix/bug-8732-iterable-types
Open

fix: add missing PHPDoc types for params and properties (PHPStan baseline)#10213
jalexiscv wants to merge 1 commit into
codeigniter4:developfrom
jalexiscv:fix/bug-8732-iterable-types

Conversation

@jalexiscv
Copy link
Copy Markdown

Description

Addresses #7731 and #8732 - PHPStan type errors

Removes 78 suppressed PHPStan errors by adding missing type annotations:

missingType.parameter.neon (31 errors -> 0)

Added @param annotations for parameters without types in 24 files

missingType.property.neon (47 errors -> 0)

Added @var annotations for properties without types in 8 files

Summary

  • 34 files changed
  • All annotations match actual usage
  • Baseline files cleaned

Refs: #7731, #8732

@mergeable
Copy link
Copy Markdown

mergeable Bot commented May 18, 2026

Hi there, jalexiscv! 👋

Thank you for sending this PR!

We expect the following in all Pull Requests (PRs).

Important

We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works.

If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work
on the framework than you do. Please make it as painless for your contributions to be included as possible.

See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md

Sincerely, the mergeable bot 🤖

@jalexiscv jalexiscv force-pushed the fix/bug-8732-iterable-types branch 5 times, most recently from b0c8b8a to f0acfaf Compare May 18, 2026 05:41
…ernary)

Refs codeigniter4#7731, codeigniter4#8732

Eliminates 119 PHPStan baseline errors across 4 categories:

- missingType.parameter.neon: 31 errors (add @param types)
- missingType.property.neon: 47 errors (add @var types)
- nullCoalesce.property.neon: 8 errors (make props nullable)
- ternary.shortNotAllowed.neon: 33 errors (expand ?: to long ternary)

50+ files changed, 4 baseline files emptied
@jalexiscv jalexiscv force-pushed the fix/bug-8732-iterable-types branch from f0acfaf to cf22365 Compare May 18, 2026 05:43
@paulbalandan
Copy link
Copy Markdown
Member

Hi, I appreciate the PR to reduce the PHPStan baseline, but currently this is hard to review with many baselines affected. The proper way for this is one PR per cleaned baseline. Thanks!

@paulbalandan paulbalandan added the needs rework Changes requested by reviewer that are still pending label May 18, 2026
Copy link
Copy Markdown
Contributor

@neznaika0 neznaika0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried about using AI in PR. You don't seem to be checking the result, this is an additional burden for the participants. At a minimum, you are duplicating PHPDoc.

I think you are not delving deeply into the development, your changes may break the code.

The branch should also be changed to 4.8 if you change types or signatures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rework Changes requested by reviewer that are still pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants