Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the error generated by phpcodesniffer "Tag cannot be grouped with parameter tags in a doc comment"

/**
  * @param Varien_Event_Observer $observer eventobserver
  * @return void
  */

phpCodesniffer generate the following error for the above line.

41 | ERROR | Tag cannot be grouped with parameter tags in a doc comment.

What will be the reason?

like image 966
Febin Thomas Avatar asked Sep 02 '15 08:09

Febin Thomas


1 Answers

PHP_CodeSniffer isolates group of parameters in two consecutive lines in the function doc block. So adding a line between the param tag line and the return tag line will make it compatible with PHP_CodeSniffer.

/**
  * @param Varien_Event_Observer $observer eventobserver
  *
  * @return void
  */
like image 169
Febin Thomas Avatar answered Nov 15 '22 18:11

Febin Thomas