Closed (fixed)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Jan 2012 at 22:05 UTC
Updated:
17 Feb 2012 at 15:00 UTC
No matter how indent this code, I get errors:
$query = db_query("
SELECT * FROM {opening_hours} WHERE nid IN (" . implode(',', $nids) . ")
AND date BETWEEN '%s' AND '%s'
", array(
':from_date' => $from_date,
':to_date' => $to_date,
));
The error message for the example in question is:
opening_hours.module|240 col 5 error| Array indentation error, expected 2 spaces but found 4
opening_hours.module|241 col 5 error| Array indentation error, expected 2 spaces but found 4
opening_hours.module|242 col 3 error| Array closing indentation error, expected 0 spaces but found 2
Where line 242 is the last )); that closes the array.
Comments
Comment #1
klausiThanks for the report, this should be fixed now. Commit: http://drupalcode.org/project/drupalcs.git/commit/5084b70