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

2

9
/**
  * @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?

Agency answered 2/9, 2015 at 8:44 Comment(0)
A
18

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
  */
Agency answered 2/9, 2015 at 8:52 Comment(1)
Thanks! Wasn't evident at all!Conlon
L
0

in phpstan you must isolate blocks of code to show and debug params

/**
 * Create a new user instance after a valid registration.
 *
 * @param array $data comment
 * 
 * @return \App\Models\User
 */
Lara answered 14/10, 2018 at 15:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.