Running phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme on

/**
 * Remove pubdate data
 *
 * @param string  $delete_type
 *  String containing node type to delete data for
 * @param bool    $child
 *  flag to indicate if child node type
 *
 * @return void
 *
 */

I get:

 424 | ERROR | Parameter comment indentation must be 2 additional spaces at
     |       | position 1

And let me tell you adding 2 additional spaces doesn't make the error go away!

Running phpcs --extensions=php,module,inc,install,test,profile,theme (i.e. without the Drupal coding standards) gives me different errors which I can get rid of by complying with those standards, but whatever I try with phpcs --standard=Drupal I can't get away without an error on those lines. What am I doing wrong? I've tried complying with http://drupal.org/node/1354#functions but that doesn't seem to work.

Comments

klausi’s picture

Status: Active » Fixed

You need to use 2 additional spaces on the second line after the @param line, where your description lives (= 3 spaces after the "*").

bloke_zero’s picture

Thanks that sorted it - I was interpreting the instruction to add 2 additional spaces literally which led to 4 spaces.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.