Problem/Motivation

Part of #3404246: [META] Fix strict type errors detected by phpstan.

By correcting 11 incorrect documented types we resolve 23 detected issues.

Steps to reproduce

Add checkFunctionArgumentTypes: true to the parameters section of phpstan.neon.dist

Run phpstan:
$ ./vendor/bin/phpstan analyse -c core/phpstan.neon.dist --error-format=raw

Compare 11.x to this branch

Proposed resolution

Fix doc types to resolve the attached errors

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3554659

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mstrelan created an issue. See original summary.

mstrelan’s picture

Status: Active » Needs review
StatusFileSize
new14.96 KB
mstrelan’s picture

Issue summary: View changes
StatusFileSize
new4.24 KB

Accidentally pushed some commits from #3552759: Fix more incorrect phpdoc type hints (part 1) so I've reverted those and updated the numbers in the IS, and replaced the list of fixed errors.

smustgrave’s picture

Same deal as the other one. Fixing the docs while the comments don’t line up feels weird to me.

mstrelan’s picture

In the other one I got told the comments are out of scope, so not sure what to do.

smustgrave’s picture

That’s fair I’ll leave for the other reviewers that were involved

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

per the slack conversation comments are out of scope. So believe this one should be fine. Resolved the 1 thread.

quietone’s picture

Status: Reviewed & tested by the community » Needs work

Needs rebase

mstrelan’s picture

Status: Needs work » Reviewed & tested by the community

Pressed the rebase button on the MR

  • quietone committed e9b899ef on 11.3.x
    Issue #3554659 by mstrelan, smustgrave: Fix more incorrect phpdoc type...

  • quietone committed 5d0c2ec0 on 11.x
    Issue #3554659 by mstrelan, smustgrave: Fix more incorrect phpdoc type...
quietone’s picture

Version: 11.x-dev » 11.3.x-dev
Status: Reviewed & tested by the community » Fixed

Commit to 11.x and cherry-picked to 11.3.x

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.