Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
documentation
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2023 at 21:23 UTC
Updated:
18 May 2023 at 16:14 UTC
Jump to comment: Most recent
Comments
Comment #2
longwaveThere is one other case where the variable comes before the type:
I think we should fix both in the same issue.
Comment #4
solideogloria commentedComment #5
solideogloria commentedAgreed. I fixed them both.
The changes should apply to Drupal 9.5 and 10.0 as well, I think.
Comment #6
longwaveThanks!
If there was a Coder rule for this I would suggest enabling it but I can't immediately see one.
Comment #7
solideogloria commentedI 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.
Edit: Never mind. Updating Slevomat standards to the most recent version fixed the fatal error.
Comment #8
solideogloria commentedThe out of order param type causes the following coder violation when I run PHPCS with Drupal Coder:
Comment #9
longwaveUnfortunately 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.
Comment #11
catchCommitted/pushed to 10.1.x, thanks!