--- includes/coder_style.inc 2008-01-22 14:31:02.000000000 +0000
+++ includes/coder_style.inc 2008-01-22 14:44:14.000000000 +0000
@@ -118,6 +118,17 @@
       '#warning' => 'use quotes around a string literal array index, this is not only a style issue, but a known performance problem',
       '#case-sensitive' => TRUE,
     ),
+    array(
+      '#type' => 'regex',
+      '#value' => '\s(if|elseif|while|foreach|switch|return|for|catch)\s*\(.*\)\s*{.*}',
+      '#warning' => 'control structures should not be all on one line',
+    ),
+    array(
+      '#type' => 'regex',
+      '#source' => 'php',
+      '#value' => '\s+$',
+      '#warning' => 'There should be no trailing spaces',
+    ),
   );
   $review = array(
     '#title' => t('Drupal Coding Standards'),
--- tests/coder_style.inc 2008-01-22 14:31:14.000000000 +0000
+++ tests/coder_style.inc 2008-01-22 14:39:18.000000000 +0000
@@ -80,5 +80,18 @@
   $a['hello'] = 'this is no';
 }

+function coder_trailing_spaces() {
+  $left = 'this is bad';
+  $left = 'this is ok';
+}
+
+function coder_control_structures() {
+  if($a == 1){ }
+  if ($a == 1) {
+  }else {
+  }
+}
+
+
 // Should generate an error about the trailing php close.
 ?>