Skip to content
Snippets Groups Projects
Commit 1d0cfb93 authored by Stefan Bürk's avatar Stefan Bürk Committed by Christian Kuhn
Browse files

[TASK] Avoid phpstan 'PHPDoc tag @param has invalid value' errors

Annotations are sometimes:
/** @param $foo */
/** @param $foo MyType */

But should be (at least):
/** @param MyType $foo */

Using argument typehints are the preferred solution.
'@param' docblock annotations are removed if argument
type hints can be set or has been already set.

Two test classes with broken syntax are added to
phpstan exclude configuration as this is for testing
purposes and can not be disabled otherwise.
Having them as ignore patterns should be avoided.

Generated baseline with:
> Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Resolves: #96698
Releases: main, 11.5
Change-Id: I3a8eec5ea8dabf93a19b68a92f5d4bbe7bc2249d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73233


Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 5c28e926
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment