Problem/Motivation

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

By correcting 11 incorrect documented types we resolve 14 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

CommentFileSizeAuthor
phpdoc-fix-part3.txt3.08 KBmstrelan

Issue fork drupal-3554676

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
smustgrave’s picture

before adding more of these should we see if part 1 gets in/accepted?

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Per our slack conversation comment updates would be out of scope. Reviewing the changes here and they seem fine to me.

quietone’s picture

Status: Reviewed & tested by the community » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Feedback for this one appears addressed.

  • quietone committed 8d250265 on 11.3.x
    docs: #3554676 Fix more incorrect phpdoc type hints (part 3)
    
    By: @...

  • quietone committed 8127fb72 on 11.x
    docs: #3554676 Fix more incorrect phpdoc type hints (part 3)
    
    By: @...
quietone’s picture

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

Committed 8127fb7 and pushed 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.