User tests: Successful: Unsuccessful:
Pull Request for Issue code style corrections for doc comment types.
PHPCS2 manual fixes
&
prefixed in the doc comment
Found using the Joomla code standards 2.0.0 PHPCS2-RC
Merge by code review
code style has been applied as listed above, old code style testing on drone does not error.
code style had not been applied. Found using the Joomla code standards 2.0.0 PHPCS2-RC
none
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_banners com_categories com_contact com_content com_contenthistory com_fields |
Status | Pending | ⇒ | Ready to Commit |
You might need a custom exemption for the CMS for now to ignore that case. Because the PHPCS 1.5 sniffs enforce the reference operator being in the doc block and 2.0+ enforce it not being there.
I don't think we ever decided one way or the other, I've just went with what the tooling told me to do. Arguably it's more correct to not have it, it's not necessary to describe in the doc block that something is passed by reference (that should be used in a code parser).
Doing some reading in other places I came across this comment in a phpDocumentor issue: "Having a "&" in the docblock (whether it's in front of the type or name) is not valid. References are to be expressed solely by the function/method declaration."
So it seems our PHPCS 1.5 sniffs are wrong and our PHPCS 2.x+ sniffs are correct.
I'll look at adding the exceptions here
Labels |
Added:
?
?
|
Category | Administration com_banners com_categories com_contact com_content com_contenthistory com_fields | ⇒ | Administration com_banners com_categories com_contact com_content com_contenthistory com_fields Repository |
@carlitorweb please file that with PHPCS that error comes from the core PHPCS generic sniffs. I have seen it on some files when running PHPCS on win10 but I have not looking into it nor tried fixing files automatically that report it.
Ok sorry then, and thank you @photodude
No problem @carlitorweb, If you find any issues with the Joomla custom sniffs for PHPCS2.x+ we also have a repo specific to those sniffs where they can be reported. https://github.com/joomla/coding-standards
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-24 00:03:44 |
Closed_By | ⇒ | mbabker |
Can be merged when 3.8.8 is released. Thanks @photodude