Closed (fixed)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2012 at 15:36 UTC
Updated:
16 Apr 2012 at 10:31 UTC
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
Comment #1
klausiYou need to use 2 additional spaces on the second line after the @param line, where your description lives (= 3 spaces after the "*").
Comment #2
bloke_zero commentedThanks that sorted it - I was interpreting the instruction to add 2 additional spaces literally which led to 4 spaces.