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

Joomla.Commenting.FunctionComment.InvalidReturn errors with return type comments #228

Closed photodude closed 6 years ago

photodude commented 6 years ago

The following error is happening in the Joomla.Commenting.FunctionComment.InvalidReturn sniff

Expected "array" but found "array  The lookup array. array({key name} => array(object, ...))" for function return type

Link to Example code comment triggering the error

https://github.com/joomla-framework/database/blob/master/src/DatabaseImporter.php#L181

Expected

no error

Actual

The comment for the return type is being included in the return type evaluation.

See also this Travis build https://travis-ci.org/joomla-framework/database/jobs/339728069