joomla / coding-standards

Joomla Coding Standards Definition
https://developer.joomla.org/coding-standards/basic-guidelines.html
GNU General Public License v2.0
128 stars 129 forks source link

`@param` bool not detected by Joomla.Commenting.FunctionComment.InvalidReturn #210

Closed photodude closed 6 years ago

photodude commented 6 years ago

In testing/fixing CMS administrator/components/com_menus/ a param listed as bool was not detected nor corrected to boolean in the file administrator/components/com_menus/models/items.php by Joomla.Commenting.FunctionComment.InvalidReturn

This seems to be working correctly for other cases like @return not sure why it failed to detect and fix in this case for @param

PHPCS 2.9.1 Joomla coding standards 2.0.0 - alpha2

mbabker commented 6 years ago

Is there something enforcing the use of "long" types? Like boolean must be used over bool and integer over int?

photodude commented 6 years ago

The coding standard requires long types, Joomla.Commenting.FunctionComment enforces that. I don't remember where it states it, but all of the examples for the docblocks show long types.

mbabker commented 6 years ago

This worked fine for me in packages I updated yesterday. Re-open if still an issue but I consider it fixed.