- Issue created by @solideogloria
- 🇬🇧United Kingdom longwave UK
There is one other case where the variable comes before the type:
$ rg '@param \$\w+ \w' core core/lib/Drupal/Core/Access/AccessResultReasonInterface.php 29: * @param $reason string|null core/modules/file/tests/src/Functional/FileListingTest.php 54: * @param $usage array
I think we should fix both in the same issue.
- last update
over 1 year ago 29,374 pass - @solideogloria opened merge request.
- last update
over 1 year ago 29,374 pass - Status changed to Needs review
over 1 year ago 9:43pm 3 May 2023 - Status changed to RTBC
over 1 year ago 11:04pm 3 May 2023 - 🇬🇧United Kingdom longwave UK
Thanks!
If there was a Coder rule for this I would suggest enabling it but I can't immediately see one.
I noticed it myself without a coder rule. However, when I run PHPCS, I actually get a fatal PHP error when the param type is in the wrong order, so I'm going to report an issue there as well.
The out of order param type causes the following coder violation when I run PHPCS with Drupal Coder:
29 | ERROR | [x] Missing parameter type (Drupal.Commenting.FunctionComment.MissingParamType)
- 🇬🇧United Kingdom longwave UK
Unfortunately that is not yet enabled across core because we have far too many missing parameters already. #3207949: Fix Drupal.Commenting.FunctionComment.MissingParamType → will enable it one day.
- Status changed to Fixed
over 1 year ago 4:13pm 4 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.