diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 590f1ba35ce60ceb09fa5a188b6fe688085f0737..aa658cfbc9ca72a294c9a9ed300be8e4f6e9d90e 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -800,7 +800,7 @@ function drupal_set_header($name = NULL, $value = NULL, $append = FALSE) {
  *   or NULL if the header has not been set.
  */
 function drupal_get_header($name = NULL) {
-  $headers = drupal_set_header(); 
+  $headers = drupal_set_header();
   if (isset($name)) {
     $name = strtolower($name);
     return isset($headers[$name]) ? $headers[$name] : NULL;
@@ -1824,7 +1824,7 @@ function registry_rebuild() {
  * @param $name
  *   Globally unique name for the variable. For a function with only one static,
  *   variable, the function name (e.g. via the PHP magic __FUNCTION__ constant)
- *   is recommended. For a function with multiple static variables add a 
+ *   is recommended. For a function with multiple static variables add a
  *   distinguishing suffix to the function name for each one.
  * @param $default_value
  *   Optional default value.
diff --git a/includes/common.inc b/includes/common.inc
index 7ef5a7deba0b55a98ffe8e924da1cec7dede6e73..72b4685607054c1934b54486a4358fd7ba7f371a 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -385,7 +385,7 @@ function drupal_not_found() {
  */
 function drupal_access_denied() {
   drupal_set_header('403 Forbidden');
-  
+
   watchdog('access denied', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);
 
   $path = drupal_get_normal_path(variable_get('site_403', ''));
@@ -741,8 +741,8 @@ function _drupal_decode_exception($exception) {
     // or in one of its global functions.
     $db_functions = array('db_query', 'pager_query', 'db_query_range', 'db_query_temporary', 'update_sql');
     while (!empty($backtrace[1]) && ($caller = $backtrace[1]) &&
-         ((isset($caller['class']) && (strpos($caller['class'], 'Query') !== FALSE || strpos($caller['class'], 'Database') !== FALSE)) ||
-         in_array($caller['function'], $db_functions))) {
+        ((isset($caller['class']) && (strpos($caller['class'], 'Query') !== FALSE || strpos($caller['class'], 'Database') !== FALSE)) ||
+        in_array($caller['function'], $db_functions))) {
       // We remove that call.
       array_shift($backtrace);
     }
@@ -2219,7 +2219,7 @@ function drupal_get_path($type, $name) {
 /**
  * Return the base URL path (i.e., directory) of the Drupal installation.
  *
- * base_path() prefixes and suffixes a "/" onto the returned path if the path is 
+ * base_path() prefixes and suffixes a "/" onto the returned path if the path is
  * not empty. At the very least, this will return "/".
  *
  * Examples:
@@ -2571,7 +2571,7 @@ function drupal_load_stylesheet($file, $optimize = NULL) {
  * @return
  *   Contents of the stylesheet including the imported stylesheets.
  */
-function drupal_load_stylesheet_content($contents, $optimize = FALSE) {  
+function drupal_load_stylesheet_content($contents, $optimize = FALSE) {
   // Replaces @import commands with the actual stylesheet content.
   // This happens recursively but omits external files.
   $contents = preg_replace_callback('/@import\s*(?:url\()?[\'"]?(?![a-z]+:)([^\'"\()]+)[\'"]?\)?;/', '_drupal_load_stylesheet', $contents);
@@ -3134,8 +3134,8 @@ function drupal_json($var = NULL) {
 function drupal_urlencode($text) {
   if (variable_get('clean_url', '0')) {
     return str_replace(array('%2F', '%26', '%23', '//'),
-                       array('/', '%2526', '%2523', '/%252F'),
-                       rawurlencode($text));
+                        array('/', '%2526', '%2523', '/%252F'),
+                        rawurlencode($text));
   }
   else {
     return str_replace('%2F', '/', rawurlencode($text));
@@ -4274,7 +4274,7 @@ function drupal_write_record($table, &$object, $primary_keys = array()) {
   if (empty($primary_keys)) {
     $options = array('return' => Database::RETURN_INSERT_ID);
     if (isset($serial) && isset($fields[$serial])) {
-      // If the serial column has been explicitly set with an ID, then we don't 
+      // If the serial column has been explicitly set with an ID, then we don't
       // require the database to return the last insert id.
       if ($fields[$serial]) {
         $options['return'] = Database::RETURN_AFFECTED;
diff --git a/includes/database/pgsql/query.inc b/includes/database/pgsql/query.inc
index 39a132bddc67dbcc25da36b5b87153e188629db7..d177212218b52d119e3beccfe49b4e80a8ddba35 100644
--- a/includes/database/pgsql/query.inc
+++ b/includes/database/pgsql/query.inc
@@ -25,7 +25,7 @@ public function execute() {
     if (count($this->insertFields) + count($this->defaultFields) == 0) {
       return NULL;
     }
-    
+
     // Don't execute query without values.
     if (!isset($this->insertValues[0]) && count($this->insertFields) > 0) {
       return NULL;
diff --git a/includes/database/query.inc b/includes/database/query.inc
index db0cd31edfdcdd02ad720244890d73777ab3c0a8..8d614a0dd12fc1c91e4abba1854d337165c122d6 100644
--- a/includes/database/query.inc
+++ b/includes/database/query.inc
@@ -611,7 +611,7 @@ public function key(array $fields, array $values = array()) {
    *   The called object.
    */
   public function update(array $fields, array $values = array()) {
-   if ($values) {
+    if ($values) {
       $fields = array_combine($fields, $values);
     }
     $this->updateFields = $fields;
diff --git a/includes/database/schema.inc b/includes/database/schema.inc
index c1a0e687171651134fbb3b33d506f6dca49ea642..d6302e0c6486901b95ce652c74a80da6923c1517 100644
--- a/includes/database/schema.inc
+++ b/includes/database/schema.inc
@@ -496,7 +496,7 @@ public function fieldNames($fields) {
 
   /**
    * Prepare a table or column comment for database query.
-   * 
+   *
    * @param $comment
    *   The comment string to prepare.
    * @param $length
diff --git a/includes/database/select.inc b/includes/database/select.inc
index 74a66b9545713d7b0d05a2e9dc6d8d6412a30938..65b31bc6cacdea4be5b318d429730753424ce8ad 100644
--- a/includes/database/select.inc
+++ b/includes/database/select.inc
@@ -1091,7 +1091,7 @@ public function __toString() {
 
       // If the table is a subquery, compile it and integrate it into this query.
       if ($table['table'] instanceof SelectQueryInterface) {
-        $table_string = '(' . (string)$table['table'] .')';
+        $table_string = '(' . (string)$table['table'] . ')';
       }
       else {
         $table_string = '{' . $this->connection->escapeTable($table['table']) . '}';
diff --git a/includes/file.inc b/includes/file.inc
index a8aaf984843a49ef1a77f7e2e266578c70ba7ab5..a9ff49e9dc2244d7dfd07e7b321c146dd97d83aa 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -916,7 +916,7 @@ function file_save_upload($source, $validators = array(), $destination = FALSE,
       // Final check that this is a valid upload, if it isn't, use the
       // default error handler.
       if (is_uploaded_file($_FILES['files']['tmp_name'][$source])) {
-         break;
+        break;
       }
 
     // Unknown error
@@ -1401,7 +1401,7 @@ function file_download() {
  * @return
  *   An associative array (keyed on the provided key) of objects with
  *   'filepath', 'filename', and 'name' members corresponding to the
- *   matching files. 
+ *   matching files.
  */
 function file_scan_directory($dir, $mask, $options = array(), $depth = 0) {
   // Merge in defaults.
@@ -1878,7 +1878,7 @@ function file_get_mimetype($filename, $mapping = NULL) {
     ));
   }
   foreach ($mapping as $ext_preg => $mime_match) {
-    if (preg_match('!\.('. $ext_preg .')$!i', $filename)) {
+    if (preg_match('!\.(' . $ext_preg . ')$!i', $filename)) {
       return $mime_match;
     }
   }
diff --git a/includes/form.inc b/includes/form.inc
index 83392a3f7015745ba8542a5605ae5390750127b9..7a05010f1088a42103c21fd49aa7fae13e4f8b70 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -29,7 +29,7 @@
  * presentation, while simplifying code and reducing the amount of HTML that
  * must be explicitly generated by modules.
  *
- * The drupal_get_form() function handles retrieving and processing an HTML 
+ * The drupal_get_form() function handles retrieving and processing an HTML
  * form for modules automatically. For example:
  *
  * @code
@@ -198,7 +198,7 @@ function drupal_build_form($form_id, &$form_state) {
   if ((!empty($form_state['storage']) || !empty($form_state['rebuild'])) && !empty($form_state['submitted']) && !form_get_errors()) {
     $form = drupal_rebuild_form($form_id, $form_state);
   }
-  
+
   // Don't override #theme if someone already set it.
   if (!isset($form['#theme'])) {
     init_theme();
@@ -823,8 +823,8 @@ function form_execute_handlers($type, &$form, &$form_state) {
 
   foreach ($handlers as $function) {
     if (drupal_function_exists($function))  {
-      // Check to see if a previous _submit handler has set a batch, but 
-      // make sure we do not react to a batch that is already being processed 
+      // Check to see if a previous _submit handler has set a batch, but
+      // make sure we do not react to a batch that is already being processed
       // (for instance if a batch operation performs a drupal_form_submit()).
       if ($type == 'submit' && ($batch =& batch_get()) && !isset($batch['current_set'])) {
         // Some previous _submit handler has set a batch. We store the call
diff --git a/includes/install.inc b/includes/install.inc
index b3358f28505e0644faf2dd06eec2fa422fb238c8..5f296477bb90c05e05d35b6c89205f2365dd23ae 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -414,7 +414,7 @@ function drupal_rewrite_settings($settings = array(), $prefix = '') {
 function drupal_get_install_files($module_list = array()) {
   $installs = array();
   foreach ($module_list as $module) {
-    $installs = array_merge($installs, drupal_system_listing('/'. $module . '.install$/', 'modules'));
+    $installs = array_merge($installs, drupal_system_listing('/' . $module . '.install$/', 'modules'));
   }
   return $installs;
 }
@@ -628,11 +628,11 @@ function drupal_uninstall_modules($module_list = array()) {
       $placeholders = implode(', ', array_fill(0, count($paths), "'%s'"));
 
       $result = db_select('menu_links')
-         ->fields('menu_links')
-         ->condition('router_path', $paths, 'IN')
-         ->condition('external', 0)
-         ->orderBy('depth')
-         ->execute();
+        ->fields('menu_links')
+        ->condition('router_path', $paths, 'IN')
+        ->condition('external', 0)
+        ->orderBy('depth')
+        ->execute();
       // Remove all such items. Starting from those with the greatest depth will
       // minimize the amount of re-parenting done by menu_link_delete().
       foreach ($result as $item) {
@@ -938,7 +938,7 @@ function drupal_check_profile($profile) {
   $requirements = array();
   foreach ($installs as $install) {
     require_once DRUPAL_ROOT . '/' . $install->filepath;
-    $function = $install->name. '_requirements';
+    $function = $install->name . '_requirements';
     if (function_exists($function)) {
       $requirements = array_merge($requirements, $function('install'));
     }
diff --git a/includes/locale.inc b/includes/locale.inc
index d94e09f24586a411957c1dc3ccb9f57a183f922a..5247a1b7888919363956e418a59a73366d2c5379 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -542,7 +542,7 @@ function locale_translate_overview_screen() {
   // Languages with at least one record in the locale table.
   $translations = db_query("SELECT COUNT(*) AS translation, t.language, s.textgroup FROM {locales_source} s INNER JOIN {locales_target} t ON s.lid = t.lid GROUP BY textgroup, language");
   foreach ($translations as $data) {
-    $ratio = (!empty($groupsums[$data->textgroup]) && $data->translation > 0) ? round(($data->translation/$groupsums[$data->textgroup])*100., 2) : 0;
+    $ratio = (!empty($groupsums[$data->textgroup]) && $data->translation > 0) ? round(($data->translation/$groupsums[$data->textgroup]) * 100.0, 2) : 0;
     $rows[$data->language][$data->textgroup] = $data->translation . '/' . $groupsums[$data->textgroup] . " ($ratio%)";
   }
 
@@ -688,7 +688,7 @@ function locale_translation_filter_form_submit($form, &$form_state) {
       $_SESSION['locale_translation_filter'] = array();
       break;
   }
-  
+
   $form_state['redirect'] = 'admin/international/translate/translate';
 }
 
diff --git a/includes/menu.inc b/includes/menu.inc
index 9011b31c7f7d282caad636078235617e90c1915a..4bc5c75815eb86ff2bcc8f4134e96edb357a9133 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1839,7 +1839,7 @@ function menu_router_build() {
   // a given item came from.
   $callbacks = array();
   foreach (module_implements('menu') as $module) {
-    $router_items = call_user_func($module .'_menu');
+    $router_items = call_user_func($module . '_menu');
     if (isset($router_items) && is_array($router_items)) {
       foreach (array_keys($router_items) as $path) {
         $router_items[$path]['module'] = $module;
@@ -1860,7 +1860,7 @@ function menu_router_build() {
  */
 function _menu_router_cache($new_menu = NULL) {
   $menu = &drupal_static(__FUNCTION__);
-  
+
   if (isset($new_menu)) {
     $menu = $new_menu;
   }
diff --git a/includes/module.inc b/includes/module.inc
index 2e00088ebd099743ba5daddb67700bfbf506d078..aea3c8f9688d801b5d7eb80eb822d1444211d65f 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -157,7 +157,7 @@ function module_rebuild_cache() {
  *     without this module.
  */
 function _module_build_dependencies($files) {
-  require_once DRUPAL_ROOT .'/includes/graph.inc';
+  require_once DRUPAL_ROOT . '/includes/graph.inc';
   $roots = $files;
   foreach ($files as $filename => $file) {
     $graph[$file->name]['edges'] = array();
diff --git a/includes/theme.inc b/includes/theme.inc
index 522c1db29fdd2c7fe525ff664c9db23d50356e00..88ebb240a8b91d44ac218eca73472fc3c630ac1f 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -895,7 +895,7 @@ function drupal_find_theme_templates($cache, $extension, $path) {
   $subtheme_paths = isset($theme_paths[$theme]) ? $theme_paths[$theme] : array();
 
   // Escape the periods in the extension.
-  $regex = '/'. str_replace('.', '\.', $extension) . '$/';
+  $regex = '/' . str_replace('.', '\.', $extension) . '$/';
   // Because drupal_system_listing works the way it does, we check for real
   // templates separately from checking for patterns.
   $files = drupal_system_listing($regex, $path, 'name', 0);
@@ -1373,7 +1373,7 @@ function theme_submenu($links) {
  *   within a table. For example, one may easily group three columns and
  *   apply same background style to all.
  * @param $sticky
- *   Use a "sticky" table header. 
+ *   Use a "sticky" table header.
  * @return
  *   An HTML string representing the table.
  */
diff --git a/includes/unicode.inc b/includes/unicode.inc
index 8c2f64970f236b35d5144d01784bc4f8413767fd..da4a37377a57097de98fb1a5079215479712fea3 100644
--- a/includes/unicode.inc
+++ b/includes/unicode.inc
@@ -333,9 +333,9 @@ function decode_entities($text, $exclude = array()) {
   // Flip the exclude list so that we can do quick lookups later.
   $exclude = array_flip($exclude);
 
-  // Use a regexp to select all entities in one pass, to avoid decoding 
+  // Use a regexp to select all entities in one pass, to avoid decoding
   // double-escaped entities twice. The PREG_REPLACE_EVAL modifier 'e' is
-  // being used to allow for a callback (see 
+  // being used to allow for a callback (see
   // http://php.net/manual/en/reference.pcre.pattern.modifiers).
   return preg_replace('/&(#x?)?([A-Za-z0-9]+);/e', '_decode_entities("$1", "$2", "$0", $html_entities, $exclude)', $text);
 }
diff --git a/install.php b/install.php
index c7010699888aa9c74d6a6c0540ca98ab90cf60b3..98ddedcbf8ba2fa297f800e9642ccd6c9caceca6 100644
--- a/install.php
+++ b/install.php
@@ -559,7 +559,7 @@ function install_select_locale($profilename) {
     install_task_list('locale-select');
 
     drupal_set_title(st('Choose language'));
-    
+
     print theme('install_page', drupal_render(drupal_get_form('install_select_locale_form', $locales)));
     exit;
   }
@@ -665,7 +665,7 @@ function install_tasks($profile, $task) {
   // to the same address, until the batch finished callback is invoked
   // and the task advances to 'locale-initial-import'.
   if ($task == 'profile-install-batch') {
-    include_once DRUPAL_ROOT .'/includes/batch.inc';
+    include_once DRUPAL_ROOT . '/includes/batch.inc';
     $output = _batch_page();
   }
 
@@ -917,7 +917,7 @@ function install_check_requirements($profile, $verify) {
         'title'       => st('Settings file'),
         'value'       => st('The settings file does not exist.'),
         'severity'    => REQUIREMENT_ERROR,
-        'description' => st('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>.', array('@drupal' => drupal_install_profile_name(), '%file' => $file, '%default_file' => $conf_path .'/default.settings.php', '@install_txt' => base_path() .'INSTALL.txt')),
+        'description' => st('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>.', array('@drupal' => drupal_install_profile_name(), '%file' => $file, '%default_file' => $conf_path . '/default.settings.php', '@install_txt' => base_path() . 'INSTALL.txt')),
       );
     }
     else {
diff --git a/modules/aggregator/aggregator.admin.inc b/modules/aggregator/aggregator.admin.inc
index bd218e6b605ae4f5d7a4805d148b40c9c06be875..111ff821eb6e2ff715231149b128506393753557 100644
--- a/modules/aggregator/aggregator.admin.inc
+++ b/modules/aggregator/aggregator.admin.inc
@@ -55,7 +55,7 @@ function aggregator_view() {
 function aggregator_form_feed(&$form_state, stdClass $feed = NULL) {
   $period = drupal_map_assoc(array(900, 1800, 3600, 7200, 10800, 21600, 32400, 43200, 64800, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval');
   $period[0] = t('Never');
-  
+
   $form['title'] = array('#type' => 'textfield',
     '#title' => t('Title'),
     '#default_value' => isset($feed->title) ? $feed->title : '',
@@ -458,7 +458,7 @@ function aggregator_admin_form($form_state) {
       '#default_value' => variable_get('aggregator_processors', array('aggregator')),
     );
   }
- if (count($basic_conf)) {
+  if (count($basic_conf)) {
     $form['basic_conf'] = array(
       '#type' => 'fieldset',
       '#title' => t('Basic configuration'),
diff --git a/modules/aggregator/aggregator.api.php b/modules/aggregator/aggregator.api.php
index 9d758aedf273247da313af0cf92260f9fb6853ac..87ec5dfca57e7deb305b98603291ca9779e4781b 100644
--- a/modules/aggregator/aggregator.api.php
+++ b/modules/aggregator/aggregator.api.php
@@ -109,8 +109,8 @@ function hook_aggregator_parse($feed) {
  * parser.
  *
  * The title and the description provided are shown on admin/settings/aggregator
- * among other places. Use as title the human readable name of the parser and 
- * as description a brief (40 to 80 characters) explanation of the parser's 
+ * among other places. Use as title the human readable name of the parser and
+ * as description a brief (40 to 80 characters) explanation of the parser's
  * functionality.
  *
  * This hook is only called if your module implements hook_aggregator_parse().
@@ -167,8 +167,8 @@ function hook_aggregator_process($feed) {
  * processor.
  *
  * The title and the description provided are shown most importantly on
- * admin/settings/aggregator. Use as title the natural name of the processor 
- * and as description a brief (40 to 80 characters) explanation of the 
+ * admin/settings/aggregator. Use as title the natural name of the processor
+ * and as description a brief (40 to 80 characters) explanation of the
  * functionality.
  *
  * This hook is only called if your module implements
diff --git a/modules/aggregator/aggregator.processor.inc b/modules/aggregator/aggregator.processor.inc
index 9692afe81f5cecb0195231b633bc0f654bce1994..247ceb7a0945dedadf91f1bc0650b56e49c7dfe4 100644
--- a/modules/aggregator/aggregator.processor.inc
+++ b/modules/aggregator/aggregator.processor.inc
@@ -175,7 +175,7 @@ function aggregator_expire($feed) {
     // Remove all items that are older than flush item timer.
     $age = REQUEST_TIME - $aggregator_clear;
     $iids = db_query('SELECT iid FROM {aggregator_item} WHERE fid = :fid AND timestamp < :timestamp', array(
-      ':fid' => $feed->fid, 
+      ':fid' => $feed->fid,
       ':timestamp' => $age,
     ))
     ->fetchCol();
diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test
index bc29e933f9d8933891a87f6866cfa74e2b654179..3d41055c5db61a35b669da57fa6c2aceb1fa210d 100644
--- a/modules/aggregator/aggregator.test
+++ b/modules/aggregator/aggregator.test
@@ -20,7 +20,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
    *   If given, feed will be created with this URL, otherwise /rss.xml will be used.
    * @return $feed
    *   Full feed object if possible.
-   * 
+   *
    * @see getFeedEditArray()
    */
   function createFeed($feed_url = NULL) {
@@ -67,8 +67,8 @@ class AggregatorTestCase extends DrupalWebTestCase {
 
   /**
    * Return the count of the randomly created feed array.
-   * 
-   * @return 
+   *
+   * @return
    *   Number of feed items on default feed created by createFeed().
    */
   function getDefaultFeedItemCount() {
@@ -117,10 +117,10 @@ class AggregatorTestCase extends DrupalWebTestCase {
 
   /**
    * Add and remove feed items and ensure that the count is zero.
-   * 
-   * @param $feed 
+   *
+   * @param $feed
    *   Feed object representing the feed.
-   * @param $expected_count 
+   * @param $expected_count
    *   Expected number of feed items.
    */
   function updateAndRemove($feed, $expected_count) {
@@ -242,7 +242,7 @@ EOF;
 
   function createSampleNodes() {
     // Post 5 articles.
-    for($i = 0; $i < 5; $i++) {
+    for ($i = 0; $i < 5; $i++) {
       $edit = array();
       $edit['title'] = $this->randomName();
       $edit['body'] = $this->randomName();
@@ -438,7 +438,7 @@ class RemoveFeedItemTestCase extends AggregatorTestCase {
     foreach ($feed_urls as $feed_url) {
       $feed = $this->createFeed($feed_url);
       // Update and remove items two times in a row to make sure that removal
-      // resets all 'modified' information (modified, etag, hash) and allows for 
+      // resets all 'modified' information (modified, etag, hash) and allows for
       // immediate update.
       $this->updateAndRemove($feed, 2);
       $this->updateAndRemove($feed, 2);
diff --git a/modules/block/block.install b/modules/block/block.install
index 0b4544ed08cd78e13d01b8efc22bc9a78b7a9c48..f19fd306e765c9ab069b2834f9bcfe06e11b1eb4 100644
--- a/modules/block/block.install
+++ b/modules/block/block.install
@@ -178,8 +178,8 @@ function block_schema() {
  */
 function block_install() {
   drupal_install_schema('block');
-  
-  // Block should go first so that other modules can alter its output 
+
+  // Block should go first so that other modules can alter its output
   // during hook_page_alter(). Almost everything on the page is a block,
   // so before block module runs, there will not be much to alter.
   db_update('system')
@@ -199,8 +199,8 @@ function block_uninstall() {
 
 /**
  * Set system.weight to a low value for block module.
- * 
- * Block should go first so that other modules can alter its output 
+ *
+ * Block should go first so that other modules can alter its output
  * during hook_page_alter(). Almost everything on the page is a block,
  * so before block module runs, there will not be much to alter.
  */
diff --git a/modules/block/block.module b/modules/block/block.module
index c52cf51435d81b431dc02da71da94678d4ca9236..4e7cc6270509524c111f53f51da6eb4407c3914d 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -95,7 +95,7 @@ function block_theme() {
     'block' => array(
       'arguments' => array('block' => NULL),
       'template' => 'block',
-    ),  
+    ),
     'block_admin_display_form' => array(
       'template' => 'block-admin-display-form',
       'file' => 'block.admin.inc',
diff --git a/modules/blog/blog.test b/modules/blog/blog.test
index b8a00cbc8847b46e8bab9a23725cd97f88b370a9..8b231d878b0386fc48cc98e334938ad9cd865cce 100644
--- a/modules/blog/blog.test
+++ b/modules/blog/blog.test
@@ -24,35 +24,35 @@ class BlogTestCase extends DrupalWebTestCase {
     $this->own_user = $this->drupalCreateUser(array('create blog content', 'edit own blog content', 'delete own blog content'));
     $this->any_user = $this->drupalCreateUser(array('create blog content', 'edit any blog content', 'delete any blog content', 'access administration pages'));
   }
-  
+
   /**
-   * Confirm that the "You are not allowed to post a new blog entry." message 
-   * shows up if a user submitted blog entries, has been denied that 
+   * Confirm that the "You are not allowed to post a new blog entry." message
+   * shows up if a user submitted blog entries, has been denied that
    * permission, and goes to the blog page.
    */
-   function testUnprivilegedUser() {
-     // Create a blog node for a user with no blog permissions.
-     $this->drupalCreateNode(array('type' => 'blog', 'uid' => $this->big_user->uid));
-
-     $this->drupalLogin($this->big_user);
-
-     $this->drupalGet('blog/'. $this->big_user->uid);
-     $this->assertResponse(200);
-     $this->assertTitle(t("@name's blog", array('@name' => $this->big_user->name)) .' | Drupal', t('Blog title was displayed'));
-     $this->assertText(t('You are not allowed to post a new blog entry.'), t('No new entries can be posted without the right permission'));
-   }
-   
-   /**
-    * View the blog of a user with no blog entries as another user.
-    */
-   function testBlogPageNoEntries() {
-     $this->drupalLogin($this->big_user);
-
-     $this->drupalGet('blog/'. $this->own_user->uid);
-     $this->assertResponse(200);
-     $this->assertTitle(t("@name's blog", array('@name' => $this->own_user->name)) .' | Drupal', t('Blog title was displayed'));
-     $this->assertText(t('!author has not created any blog entries.', array('!author' => $this->own_user->name)), t('Users blog displayed with no entries'));
-   }
+  function testUnprivilegedUser() {
+    // Create a blog node for a user with no blog permissions.
+    $this->drupalCreateNode(array('type' => 'blog', 'uid' => $this->big_user->uid));
+
+    $this->drupalLogin($this->big_user);
+
+    $this->drupalGet('blog/' . $this->big_user->uid);
+    $this->assertResponse(200);
+    $this->assertTitle(t("@name's blog", array('@name' => $this->big_user->name)) . ' | Drupal', t('Blog title was displayed'));
+    $this->assertText(t('You are not allowed to post a new blog entry.'), t('No new entries can be posted without the right permission'));
+  }
+
+  /**
+   * View the blog of a user with no blog entries as another user.
+   */
+  function testBlogPageNoEntries() {
+    $this->drupalLogin($this->big_user);
+
+    $this->drupalGet('blog/' . $this->own_user->uid);
+    $this->assertResponse(200);
+    $this->assertTitle(t("@name's blog", array('@name' => $this->own_user->name)) . ' | Drupal', t('Blog title was displayed'));
+    $this->assertText(t('!author has not created any blog entries.', array('!author' => $this->own_user->name)), t('Users blog displayed with no entries'));
+  }
 
   /**
    * Login users, create blog nodes, and test blog functionality through the admin and user interfaces.
@@ -139,14 +139,14 @@ class BlogTestCase extends DrupalWebTestCase {
     // View blog node.
     $this->drupalGet('node/' . $node->nid);
     $this->assertResponse(200);
-    $this->assertTitle($node->title. ' | Drupal', t('Blog node was displayed'));
+    $this->assertTitle($node->title . ' | Drupal', t('Blog node was displayed'));
     $this->assertText(t('Home ' . $crumb . ' Blogs ' . $crumb . ' @name' . $quote . 's blog', array('@name' => $node_user->name)), t('Breadcrumbs were displayed'));
 
     // View blog edit node.
     $this->drupalGet('node/' . $node->nid . '/edit');
     $this->assertResponse($response);
     if ($response == 200) {
-      $this->assertTitle('Edit Blog entry ' . $node->title. ' | Drupal', t('Blog edit node was displayed'));
+      $this->assertTitle('Edit Blog entry ' . $node->title . ' | Drupal', t('Blog edit node was displayed'));
       $this->assertText(t('Home ' . $crumb . ' @title', array('@title' => $node->title)), t('Breadcrumbs were displayed'));
     }
 
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index f007ae1f18b48816e82af92097269f6f2d1ab626..6cf55dcd742c9b01e4f8ae513b39020d981fe8b4 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -331,7 +331,7 @@ function blogapi_status_error_check($node, $original_status) {
 
   $node = (object) $node;
 
-  $node_type_default = variable_get('node_options_'. $node->type, array('status', 'promote'));
+  $node_type_default = variable_get('node_options_' . $node->type, array('status', 'promote'));
 
   // If we don't have the 'administer nodes' permission and the status is
   // changing or for a new node the status is not the content type's default,
@@ -584,7 +584,7 @@ function blogapi_mt_validate_terms($node) {
       $term_list = array_unique($node->taxonomy);
       $params = $term_list;
       $params[] = $node->type;
-      $result = db_query(db_rewrite_sql("SELECT t.tid, t.vid FROM {taxonomy_term_data} t INNER JOIN {taxonomy_vocabulary_node_type} n ON t.vid = n.vid WHERE t.tid IN (". db_placeholders($term_list) .") AND n.type = '%s'", 't', 'tid'), $params);
+      $result = db_query(db_rewrite_sql("SELECT t.tid, t.vid FROM {taxonomy_term_data} t INNER JOIN {taxonomy_vocabulary_node_type} n ON t.vid = n.vid WHERE t.tid IN (" . db_placeholders($term_list) . ") AND n.type = '%s'", 't', 'tid'), $params);
       $found_terms = array();
       $found_count = 0;
       while ($term = db_fetch_object($result)) {
@@ -768,7 +768,7 @@ function blogapi_admin_settings() {
     '#field_suffix' => t('MB')
   );
 
-  $form['settings_general']['upload_max_size'] = array('#value' => '<p>'. t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))).'</p>');
+  $form['settings_general']['upload_max_size'] = array('#value' => '<p>' . t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))) . '</p>');
 
   $roles = user_roles(FALSE, 'administer content with blog api');
   $form['roles'] = array('#type' => 'value', '#value' => $roles);
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 74ac1d5ad2a0b9d56720379fcfae344b0721c638..85064340a3ca958f3072081d34628394cbc12771 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -873,7 +873,7 @@ function comment_save($edit) {
           $parent->thread = (string) rtrim((string) $parent->thread, '/');
           // Get the max value in *this* thread.
           $max = db_query("SELECT MAX(thread) FROM {comment} WHERE thread LIKE :thread AND nid = :nid", array(
-            ':thread' => $parent->thread .'.%',
+            ':thread' => $parent->thread . '.%',
             ':nid' => $edit['nid'],
           ))->fetchField();
 
diff --git a/modules/comment/comment.pages.inc b/modules/comment/comment.pages.inc
index 4727fd95bfe5ddc4b342b309c6b2b251bea7b914..08c6aec5a18071330e0d923a8c915cc89a957a50 100644
--- a/modules/comment/comment.pages.inc
+++ b/modules/comment/comment.pages.inc
@@ -15,7 +15,7 @@
  */
 function comment_edit($cid) {
   global $user;
-  $comment = db_query('SELECT c.*, u.uid, u.name AS registered_name, u.data FROM {comment} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = :cid', array(':cid'=>$cid))->fetchObject();
+  $comment = db_query('SELECT c.*, u.uid, u.name AS registered_name, u.data FROM {comment} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = :cid', array(':cid' => $cid))->fetchObject();
   $comment = drupal_unpack($comment);
   $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
 
diff --git a/modules/comment/comment.test b/modules/comment/comment.test
index 95956119fdbea353adc3dcd97afe13a39012b216..abe6b4ae65a27f9db2aa754f452eb6d57795686d 100644
--- a/modules/comment/comment.test
+++ b/modules/comment/comment.test
@@ -143,7 +143,7 @@ class CommentHelperCase extends DrupalWebTestCase {
    *   Comments per page value.
    */
   function setCommentsPerPage($number) {
-    $this->setCommentSettings('comment_default_per_page_article', $number, 'Number of comments per page set to ' . $number .'.');
+    $this->setCommentSettings('comment_default_per_page_article', $number, 'Number of comments per page set to ' . $number . '.');
   }
 
   /**
@@ -280,7 +280,7 @@ class CommentInterfaceTest extends CommentHelperCase {
     $reply_loaded = comment_load($reply->id);
     $this->assertTrue($this->commentExists($reply, TRUE), t('Reply found.'));
     $this->assertEqual($comment->id, $reply_loaded->pid, t('Pid of a reply to a comment is set correctly.'));
-    $this->assertEqual(rtrim($comment_loaded->thread,'/').'.00/', $reply_loaded->thread, t('Thread of reply grows correctly.'));
+    $this->assertEqual(rtrim($comment_loaded->thread, '/') . '.00/', $reply_loaded->thread, t('Thread of reply grows correctly.'));
 
     // Second reply to comment
     $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
@@ -289,7 +289,7 @@ class CommentInterfaceTest extends CommentHelperCase {
     $reply = $this->postComment(NULL, $this->randomName(), $this->randomName());
     $reply_loaded = comment_load($reply->id);
     $this->assertTrue($this->commentExists($reply, TRUE), t('Second reply found.'));
-    $this->assertEqual(rtrim($comment_loaded->thread,'/').'.01/', $reply_loaded->thread, t('Thread of second reply grows correctly.'));
+    $this->assertEqual(rtrim($comment_loaded->thread, '/') . '.01/', $reply_loaded->thread, t('Thread of second reply grows correctly.'));
 
     // Edit reply.
     $this->drupalGet('comment/edit/' . $reply->id);
@@ -524,11 +524,11 @@ class CommentApprovalTest extends CommentHelperCase {
 
     // Approve comment.
     $this->drupalLogin($this->admin_user);
-    $this->drupalGet('node/'. $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid);
     $this->clickLink(t('approve'));
     $this->drupalLogout();
 
-    $this->drupalGet('node/'. $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid);
     $this->assertTrue($this->commentExists($anonymous_comment4), t('Anonymous comment visible.'));
   }
 }
diff --git a/modules/contact/contact.test b/modules/contact/contact.test
index ef3ed0280da6d230900afc795d337ff64360381a..9579b404a9d83f2eaf967b0b5743ea5b2875caf6 100644
--- a/modules/contact/contact.test
+++ b/modules/contact/contact.test
@@ -185,7 +185,7 @@ class ContactSitewideTestCase extends DrupalWebTestCase {
     $edit['reply'] = $reply;
     $edit['selected'] = ($selected ? '1' : '0');
     $this->drupalPost('admin/build/contact/edit/' . $category_id, $edit, t('Save'));
-    return($category_id);
+    return ($category_id);
   }
 
   /**
diff --git a/modules/dblog/dblog.test b/modules/dblog/dblog.test
index 76d10272df814f8b1b61cad1b79b3ad5dce60d92..644ae63c7778617f2deb3b6c22fdd47f6c5ccf2f 100644
--- a/modules/dblog/dblog.test
+++ b/modules/dblog/dblog.test
@@ -197,7 +197,7 @@ class DBLogTestCase extends DrupalWebTestCase {
     $this->drupalLogout();
     // Fetch row ids in watchdog that relate to the user.
     $result = db_query('SELECT wid FROM {watchdog} WHERE uid = :uid', array(':uid' => $user->uid));
-    foreach($result as $row) {
+    foreach ($result as $row) {
       $ids[] = $row->wid;
     }
     $count_before = (isset($ids)) ? count($ids) : 0;
@@ -225,7 +225,7 @@ class DBLogTestCase extends DrupalWebTestCase {
     unset($ids);
     // Fetch row ids in watchdog that relate to the user.
     $result = db_query('SELECT wid FROM {watchdog} WHERE uid = :uid', array(':uid' => $user->uid));
-    foreach($result as $row) {
+    foreach ($result as $row) {
       $ids[] = $row->wid;
     }
     $this->assertTrue(!isset($ids), t('DBLog contains no records for @name', array('@name' => $user->name)));
diff --git a/modules/field/field.crud.inc b/modules/field/field.crud.inc
index 5e7d20c69e4d1bdd542fba7db2de1093bfdab68f..aad0e9aa8dbb7ff4d0f14aabae1a3138714e66a0 100644
--- a/modules/field/field.crud.inc
+++ b/modules/field/field.crud.inc
@@ -70,7 +70,7 @@
  *     as Schema API index specifications. Only columns that appear in the
  *     'columns' setting are allowed. Note that field types can specify
  *     default indexes, which can be modified or added to when
- *     creating a field. 
+ *     creating a field.
  * - settings (array)
  *     A sub-array of key/value pairs of field-type-specific settings. Each
  *     field type module defines and documents its own field settings.
@@ -155,7 +155,7 @@
  *             the display formatter used in this context.
  *         - module (string, read-only)
  *             The name of the module which implements the display formatter.
- *     - example_context_2 
+ *     - example_context_2
  *         - ...
  *
  * TODO D7 : document max length for field types, widget types,
@@ -194,7 +194,7 @@
  *     definition of a field-type index by providing an index with the
  *     same name, or to remove it by redefining it as an empty array
  *     of columns. Overriding field-type indexes should be done
- *     carefully, for it might seriously affect the site's performance. 
+ *     carefully, for it might seriously affect the site's performance.
  *   - settings: each omitted setting is given the default value defined in
  *     hook_field_info().
  * @throw
diff --git a/modules/field/field.form.inc b/modules/field/field.form.inc
index bc7b1426d1d18b3a68fe3961eb07f3a015573afc..f321d2dc7d61d75e1e1433207f3a86097843690b 100644
--- a/modules/field/field.form.inc
+++ b/modules/field/field.form.inc
@@ -15,7 +15,7 @@ function field_default_form($obj_type, $object, $field, $instance, $items, &$for
   // This could be called with no object, as when a UI module creates a
   // dummy form to set default values.
   if ($object) {
-    list($id, ,) = field_attach_extract_ids($obj_type, $object);
+    list($id, , ) = field_attach_extract_ids($obj_type, $object);
   }
   $addition = array();
 
diff --git a/modules/field/field.install b/modules/field/field.install
index 5ac23bc9695062868854b85265c1e20e36cee3c6..539f120d33eaedb89e9db95f2e91596c3bca56c2 100644
--- a/modules/field/field.install
+++ b/modules/field/field.install
@@ -130,7 +130,7 @@ function field_schema() {
     'primary key' => array('id'),
     'unique keys' => array(
       'field_name_bundle' => array('field_name', 'bundle'),
-     ),
+    ),
     'indexes' => array(
       // used by field_read_instances
       'widget_active_deleted' => array('widget_active', 'deleted'),
diff --git a/modules/field/field.module b/modules/field/field.module
index 8d19f47ed0650c5b581a83368eadc0c54b91e00c..411a05317081b80b9a208c34b5101476aec4ebdf 100644
--- a/modules/field/field.module
+++ b/modules/field/field.module
@@ -101,7 +101,7 @@ function field_help($path, $arg) {
   switch ($path) {
     case 'admin/help#field':
       $output = '<p>' . t('The Field API allows custom data fields to be attached to Drupal objects and takes care of storing, loading, editing, and rendering field data.  Any object type (node, user, etc.) can use the Field API to make itself "fieldable" and thus allow fields to be attached to it.') . '</p>';
-      $output .= '<p>' .t('The Field API provides no user interface on its own.  Use the Content Construction Kit (CCK) contrib module to manage custom fields via a web browser.') . '</p>';
+      $output .= '<p>' . t('The Field API provides no user interface on its own.  Use the Content Construction Kit (CCK) contrib module to manage custom fields via a web browser.') . '</p>';
       return $output;
   }
 }
diff --git a/modules/field/field.test b/modules/field/field.test
index a473d0c77b9d01d415ad53b2fa52006bf5cfde19..61f8009e455666449713b74636c96bc746b5e851 100644
--- a/modules/field/field.test
+++ b/modules/field/field.test
@@ -1039,7 +1039,7 @@ class FieldFormTestCase extends DrupalWebTestCase {
     $this->assertPattern("|$pattern|s", 'Widgets are displayed in the correct order');
     $this->assertFieldByName("$this->field_name[$delta][value]", '', "New widget is displayed");
     $this->assertFieldByName("$this->field_name[$delta][_weight]", $delta, "New widget has the right weight");
-    $this->assertNoField("$this->field_name[". ($delta + 1) . '][value]', 'No extraneous widget is displayed');
+    $this->assertNoField("$this->field_name[" . ($delta + 1) . '][value]', 'No extraneous widget is displayed');
   }
 
   /**
diff --git a/modules/filter/filter.api.php b/modules/filter/filter.api.php
index 695a33844a46f5c74968e253e8dc8ef93be29b85..0386649f493b77ce34dd7c9cd2f086a47e94bbbf 100644
--- a/modules/filter/filter.api.php
+++ b/modules/filter/filter.api.php
@@ -114,7 +114,7 @@ function hook_filter($op, $delta = 0, $format = -1, $text = '', $langcode = '',
       return t('Allows users to post code verbatim using &lt;code&gt; and &lt;?php ?&gt; tags.');
 
     case 'prepare':
-      // Note: we use [ and ] to replace < > during the filtering process. 
+      // Note: we use [ and ] to replace < > during the filtering process.
       // For more information, see "Temporary placeholders and
       // delimiters" at http://drupal.org/node/209715.
       $text = preg_replace('@<code>(.+?)</code>@se', "'[codefilter-code]' . codefilter_escape('\\1') . '[/codefilter-code]'", $text);
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index d3a452b7c6becc7f15daf9f56dc1e5a3522a39d2..625c28711c92cbd6cfde109d3d7cbde35d2ff11e 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -310,7 +310,7 @@ function filter_formats($index = NULL) {
     if (!$all) {
       $or = db_or()->condition('format', variable_get('filter_default_format', 1));
       foreach ($user->roles as $rid => $role) {
-        $or->condition('roles', '%'. (int)$rid .'%', 'LIKE');
+        $or->condition('roles', '%' . (int)$rid . '%', 'LIKE');
       }
       $query->condition($or);
     }
diff --git a/modules/filter/filter.test b/modules/filter/filter.test
index 51941b4702b755e40d01eb9da5464fe6a5a4ad45..86e1e556ae83c51ce6d7ecfaa772996ec2b8e602 100644
--- a/modules/filter/filter.test
+++ b/modules/filter/filter.test
@@ -101,7 +101,7 @@ class FilterAdminTestCase extends DrupalWebTestCase {
     $this->drupalLogin($web_user);
 
     $this->drupalGet('node/add/page');
-    $this->assertRaw('<option value="' . $full .'">Full HTML</option>', t('Full HTML filter accessible.'));
+    $this->assertRaw('<option value="' . $full . '">Full HTML</option>', t('Full HTML filter accessible.'));
 
     // Use filtered HTML and see if it removes tags that arn't allowed.
     $body = $this->randomName();
diff --git a/modules/forum/forum.test b/modules/forum/forum.test
index 0b6da3839b02f1a7dcec221a481911bea70a19dd..4941734bf733246b2ed023b95c12a1bc73a82341 100644
--- a/modules/forum/forum.test
+++ b/modules/forum/forum.test
@@ -193,11 +193,11 @@ class ForumTestCase extends DrupalWebTestCase {
    */
   function deleteForum($tid) {
     // Delete the forum id.
-    $this->drupalPost('admin/build/forum/edit/forum/'. $tid, array(), t('Delete'));
+    $this->drupalPost('admin/build/forum/edit/forum/' . $tid, array(), t('Delete'));
     $this->drupalPost(NULL, NULL, t('Delete'));
-    
+
     // Assert that the forum no longer exists.
-    $this->drupalGet('forum/'. $tid);
+    $this->drupalGet('forum/' . $tid);
     $this->assertRaw(t('No forums defined'), 'The forum was not found');
   }
 
diff --git a/modules/locale/locale.install b/modules/locale/locale.install
index 97d8f0978e9bd461021e7130f0b1cf54cd80182c..7febbba9a2338082ac74ef6b99966a66f75889a6 100644
--- a/modules/locale/locale.install
+++ b/modules/locale/locale.install
@@ -224,7 +224,7 @@ function locale_uninstall() {
   }
   // Delete the JavaScript translations directory if empty.
   @rmdir($locale_js_directory);
-  
+
   // Clear variables.
   variable_del('language_default');
   variable_del('language_count');
@@ -234,16 +234,16 @@ function locale_uninstall() {
   variable_del('language_content_type_negotiation');
   variable_del('locale_cache_strings');
   variable_del('locale_js_directory');
-  
+
   foreach (node_get_types() as $type => $content_type) {
     $setting = variable_del('language_content_type_' . $type);
   }
-  
+
   // Switch back to English: with a $language->language value different from 'en'
-  // successive calls of t() might result in calling locale(), which in turn might 
+  // successive calls of t() might result in calling locale(), which in turn might
   // try to query the unexisting {locales_source} and {locales_target} tables.
   drupal_init_language();
-  
+
   // Remove tables.
   drupal_uninstall_schema('locale');
 }
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc
index 79d3405f7306f5cc8a154a92d2b3c6dcb0afab3a..fa88e133e2830230a088d2d6fb0818d72578ad34 100644
--- a/modules/menu/menu.admin.inc
+++ b/modules/menu/menu.admin.inc
@@ -30,7 +30,7 @@ function menu_overview_page() {
 function theme_menu_admin_overview($title, $name, $description) {
   $output = check_plain($title);
   $output .= '<div class="description">' . filter_xss_admin($description) . '</div>';
-  
+
   return $output;
 }
 
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index 004c72bc6e3490172769dc0e39c287eb15c566e4..d4519308925ffb9f726d31057d9d3f826905c88e 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -341,7 +341,7 @@ function menu_node_update($node) {
  */
 function menu_node_delete($node) {
   // Delete all menu module links that point to this node.
-  $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu'", array(':path' => 'node/'. $node->nid), array('fetch' => PDO::FETCH_ASSOC));
+  $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu'", array(':path' => 'node/' . $node->nid), array('fetch' => PDO::FETCH_ASSOC));
   foreach ($result as $m) {
     menu_link_delete($m['mlid']);
   }
@@ -358,14 +358,14 @@ function menu_node_prepare($node) {
     if (isset($node->nid)) {
       // Give priority to the default menu
       $mlid = db_query_range("SELECT mlid FROM {menu_links} WHERE link_path = :path AND menu_name = :menu_name AND module = 'menu' ORDER BY mlid ASC", array(
-        ':path' => 'node/'. $node->nid,
+        ':path' => 'node/' . $node->nid,
         ':menu_name' => $menu_name,
       ), 0, 1)
       ->fetchField();
       // Check all menus if a link does not exist in the default menu.
       if (!$mlid) {
         $mlid = db_query_range("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu' ORDER BY mlid ASC", array(
-          ':path' => 'node/'. $node->nid,
+          ':path' => 'node/' . $node->nid,
         ), 0, 1)
         ->fetchField();
       }
diff --git a/modules/menu/menu.test b/modules/menu/menu.test
index 2b00b9798ce97d5346e110701f4ba0db889500a3..704ec4629ea52bf145f425f6d86ee7fa3f8a5bea 100644
--- a/modules/menu/menu.test
+++ b/modules/menu/menu.test
@@ -100,7 +100,7 @@ class MenuTestCase extends DrupalWebTestCase {
     $this->drupalGet('admin/build/menu/add');
     $menu_name = substr(md5($this->randomName(16)), 0, MENU_MAX_MENU_NAME_LENGTH_UI + 1);
     $title = $this->randomName(16);
-    $edit = array (
+    $edit = array(
       'menu_name' => $menu_name,
       'description' => '',
       'title' =>  $title,
@@ -173,7 +173,7 @@ class MenuTestCase extends DrupalWebTestCase {
     // Toggle menu links.
     $this->toggleMenuLink($item1);
     $this->toggleMenuLink($item2);
-    
+
     // Enable a link via the overview form.
     $this->disableMenuLink($item1);
     $edit = array();
@@ -181,7 +181,7 @@ class MenuTestCase extends DrupalWebTestCase {
     // Note in the UI the 'mlid:x[hidden]' form element maps to enabled, or
     // NOT hidden.
     $edit['mlid:' . $item1['mlid'] . '[hidden]'] = TRUE;
-    $this->drupalPost('admin/build/menu-customize/'. $item1['menu_name'], $edit, t('Save configuration'));
+    $this->drupalPost('admin/build/menu-customize/' . $item1['menu_name'], $edit, t('Save configuration'));
 
     // Verify in the database.
     $hidden = db_query("SELECT hidden FROM {menu_links} WHERE mlid = :mlid", array(':mlid' => $item1['mlid']))->fetchField();
@@ -206,7 +206,7 @@ class MenuTestCase extends DrupalWebTestCase {
     $this->assertResponse(200);
 
     $title = '!link_' . $this->randomName(16);
-    $edit = array (
+    $edit = array(
       'menu[link_path]' => $link,
       'menu[link_title]' => $title,
       'menu[description]' => '',
@@ -250,7 +250,7 @@ class MenuTestCase extends DrupalWebTestCase {
    */
   function addInvalidMenuLink($menu_name = 'navigation') {
     foreach (array('-&-', 'admin/user/permissions') as $link_path) {
-      $edit = array (
+      $edit = array(
         'menu[link_path]' => $link_path,
         'menu[link_title]' => 'title',
       );
diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc
index 5f4ff57a5701ae2b5a59dea0611a13b3062121c3..1099a84c6a9086070eb483c4298696e27a7e145c 100644
--- a/modules/node/content_types.inc
+++ b/modules/node/content_types.inc
@@ -52,7 +52,7 @@ function theme_node_admin_overview($name, $type) {
  * Generates the node type editing form.
  */
 function node_type_form(&$form_state, $type = NULL) {
-  drupal_add_js(drupal_get_path('module', 'node') .'/content_types.js');
+  drupal_add_js(drupal_get_path('module', 'node') . '/content_types.js');
   if (!isset($type->type)) {
     // This is a new type. Node module managed types are custom and unlocked.
     $type = node_type_set_defaults(array('custom' => 1, 'locked' => 0));
@@ -167,7 +167,7 @@ function node_type_form(&$form_state, $type = NULL) {
   $form['display']['node_submitted'] = array(
     '#type' => 'checkbox',
     '#title' => t('Display post information'),
-    '#default_value' => variable_get('node_submitted_'. $type->type, TRUE),
+    '#default_value' => variable_get('node_submitted_' . $type->type, TRUE),
     '#description' => t('Enable the <em>submitted by Username on date</em> text.'),
   );
   $form['old_type'] = array(
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc
index 60ef89ef521ba1bf3c64c55664fae74ef9b22e8d..7b2fa4a1767de8a8c2dd0aeb870b100e09126d88 100644
--- a/modules/node/node.admin.inc
+++ b/modules/node/node.admin.inc
@@ -481,7 +481,7 @@ function node_admin_nodes() {
   $filter = node_build_filter_query();
 
   $sort = tablesort_sql($header, '', 'n.changed DESC');
-  $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n '. $filter['join'] .' INNER JOIN {users} u ON n.uid = u.uid '. $filter['where'] . $sort), 50, 0, NULL, $filter['args']);
+  $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n ' . $filter['join'] . ' INNER JOIN {users} u ON n.uid = u.uid ' . $filter['where'] . $sort), 50, 0, NULL, $filter['args']);
 
   // Build the 'Update options' form.
   $form['options'] = array(
@@ -633,10 +633,10 @@ function node_multiple_delete_confirm(&$form_state, $nodes) {
   }
   $form['operation'] = array('#type' => 'hidden', '#value' => 'delete');
   $form['#submit'][] = 'node_multiple_delete_confirm_submit';
-  $confirm_question = format_plural(count($nodes), 
-                                  'Are you sure you want to delete this item?', 
+  $confirm_question = format_plural(count($nodes),
+                                  'Are you sure you want to delete this item?',
                                   'Are you sure you want to delete these items?');
-  return confirm_form($form, 
+  return confirm_form($form,
                     $confirm_question,
                     'admin/content/node', t('This action cannot be undone.'),
                     t('Delete'), t('Cancel'));
diff --git a/modules/node/node.module b/modules/node/node.module
index 368896e4c43f1a958955a9858551f05421672714..9cddfde7dd4cf66cde3f6a8cd6f601e5d335089a 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1046,7 +1046,7 @@ function node_save($node) {
   global $user;
 
   if (!isset($node->is_new)) {
-    $node->is_new = empty($node->nid); 
+    $node->is_new = empty($node->nid);
   }
 
   // Apply filters to some default node fields:
@@ -1131,7 +1131,7 @@ function node_save($node) {
 
   // Update the node access table for this node.
   node_access_acquire_grants($node);
-  
+
   // Clear internal properties.
   unset($node->is_new);
 
@@ -1458,14 +1458,14 @@ function _node_rankings() {
   );
   if ($ranking = module_invoke_all('ranking')) {
     foreach ($ranking as $rank => $values) {
-      if ($node_rank = variable_get('node_rank_'. $rank, 0)) {
+      if ($node_rank = variable_get('node_rank_' . $rank, 0)) {
         // If the table defined in the ranking isn't already joined, then add it.
         if (isset($values['join']) && !isset($rankings['join'][$values['join']])) {
           $rankings['join'][$values['join']] = $values['join'];
         }
 
         // Add the rankings weighted score multiplier value, handling NULL gracefully.
-        $rankings['score'][] = 'CAST(%f AS DECIMAL) * COALESCE(('. $values['score'] .'), 0)';
+        $rankings['score'][] = 'CAST(%f AS DECIMAL) * COALESCE((' . $values['score'] . '), 0)';
 
         // Add the the administrator's weighted score multiplier value for this ranking.
         $rankings['total'] += $node_rank;
@@ -1517,11 +1517,11 @@ function node_search($op = 'search', $keys = NULL) {
       // Note: reversed to reflect that higher number = higher ranking.
       $options = drupal_map_assoc(range(0, 10));
       foreach (module_invoke_all('ranking') as $var => $values) {
-        $form['content_ranking']['factors']['node_rank_'. $var] = array(
+        $form['content_ranking']['factors']['node_rank_' . $var] = array(
           '#title' => $values['title'],
           '#type' => 'select',
           '#options' => $options,
-          '#default_value' => variable_get('node_rank_'. $var, 0),
+          '#default_value' => variable_get('node_rank_' . $var, 0),
         );
       }
       return $form;
@@ -1578,7 +1578,7 @@ function node_search($op = 'search', $keys = NULL) {
         $total = $rankings['total'];
         $arguments2 = $rankings['arguments'];
         $join2 = implode(' ', $rankings['join']);
-        $select2 = 'SUM('. implode(' + ', $rankings['score']) .') AS calculated_score';
+        $select2 = 'SUM(' . implode(' + ', $rankings['score']) . ') AS calculated_score';
       }
 
       // Do search.
@@ -2175,7 +2175,7 @@ function node_update_index() {
 
   $result = db_query_range("SELECT n.nid FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC", 0, $limit);
 
-  foreach($result as $node) {
+  foreach ($result as $node) {
     _node_index_node($node);
   }
 }
diff --git a/modules/node/node.test b/modules/node/node.test
index af4de828cf3d88f7c19e71a6027a4d21b305391b..1e6d57e1e4ecc78580f5a3e722c3b43eb0614e93 100644
--- a/modules/node/node.test
+++ b/modules/node/node.test
@@ -505,7 +505,7 @@ class PageViewTestCase extends DrupalWebTestCase {
 
 class NodeTitleXSSTestCase extends DrupalWebTestCase {
   public static function getInfo() {
-     return array(
+    return array(
       'name' => t('Node title XSS filtering'),
       'description' => t('Create a node with dangerous tags in its title and test that they are escaped.'),
       'group' => t('Node'),
@@ -631,7 +631,7 @@ class NodePostSettingsTestCase extends DrupalWebTestCase {
 
 /**
  * Ensure that data added to nodes by other modules appears in RSS feeds.
- * 
+ *
  * Create a node, enable the node_test module to ensure that extra data is
  * added to the node->content array, then verify that the data appears on the
  * sitewide RSS feed at rss.xml.
@@ -688,7 +688,7 @@ class NodeRSSContentTestCase extends DrupalWebTestCase {
  * Test case to check node save related functionality, including import-save
  */
 class NodeSaveTestCase extends DrupalWebTestCase {
-  
+
   public static function getInfo() {
     return array(
       'name' => t('Node save'),
@@ -707,7 +707,7 @@ class NodeSaveTestCase extends DrupalWebTestCase {
 
   /**
    * Import test, to check if custom node ids are saved properly.
-   * Workflow: 
+   * Workflow:
    *  - first create a piece of content
    *  - save the content
    *  - check if node exists
@@ -716,7 +716,7 @@ class NodeSaveTestCase extends DrupalWebTestCase {
     // Node ID must be a number that is not in the database.
     $max_nid = db_result(db_query('SELECT MAX(nid) FROM {node}'));
     $test_nid = $max_nid + mt_rand(1000, 1000000);
-    $title = $this->randomName(8); 
+    $title = $this->randomName(8);
     $node = array(
       'title' => $title,
       'body' => $this->randomName(32),
diff --git a/modules/openid/openid.api.php b/modules/openid/openid.api.php
index 7b9be59b222b88b5f8bd98f4b5c406ecf00fb4cd..41f099148a0e86094a7286a156378cc2a274e487 100644
--- a/modules/openid/openid.api.php
+++ b/modules/openid/openid.api.php
@@ -19,7 +19,7 @@
  *   Possible values:
  *   - request: Modify parameters before they are sent to the OpenID provider.
  * @param $request
- *   An associative array of parameter defaults to which to modify or append. 
+ *   An associative array of parameter defaults to which to modify or append.
  * @return
  *   An associative array of parameters to be merged with the default list.
  *
diff --git a/modules/openid/openid.module b/modules/openid/openid.module
index 84fb68219857fd7f2ba8f31b4382d167ba4d6d50..3e60904939d085d529f62b30aff64b88c236ed63 100644
--- a/modules/openid/openid.module
+++ b/modules/openid/openid.module
@@ -384,14 +384,14 @@ function openid_association($op_endpoint) {
       $assoc_response['mac_key'] = base64_encode(_openid_dh_xorsecret($shared, $enc_mac_key));
     }
     db_insert('openid_association')
-     ->fields(array(
-       'idp_endpoint_uri' => $op_endpoint,
-       'session_type' => $assoc_response['session_type'],
-       'assoc_handle' => $assoc_response['assoc_handle'],
-       'assoc_type' => $assoc_response['assoc_type'],
-       'expires_in' => $assoc_response['expires_in'],
-       'mac_key' => $assoc_response['mac_key'],
-       'created' => REQUEST_TIME,
+      ->fields(array(
+        'idp_endpoint_uri' => $op_endpoint,
+        'session_type' => $assoc_response['session_type'],
+        'assoc_handle' => $assoc_response['assoc_handle'],
+        'assoc_type' => $assoc_response['assoc_type'],
+        'expires_in' => $assoc_response['expires_in'],
+        'mac_key' => $assoc_response['mac_key'],
+        'created' => REQUEST_TIME,
       ))
       ->execute();
     $assoc_handle = $assoc_response['assoc_handle'];
diff --git a/modules/openid/openid.pages.inc b/modules/openid/openid.pages.inc
index 94c2a441f451c425765eb63b05cc9a0963848f68..ed305639fe4c5f2d9d5fb3becf7e1e3bc8984fa4 100644
--- a/modules/openid/openid.pages.inc
+++ b/modules/openid/openid.pages.inc
@@ -94,7 +94,7 @@ function openid_user_delete_form($form_state, $account, $aid = 0) {
     ':aid' => $aid,
   ))
   ->fetchField();
-  return confirm_form(array(), t('Are you sure you want to delete the OpenID %authname for %user?', array('%authname' => $authname, '%user' => $account->name)), 'user/'. $account->uid .'/openid');
+  return confirm_form(array(), t('Are you sure you want to delete the OpenID %authname for %user?', array('%authname' => $authname, '%user' => $account->name)), 'user/' . $account->uid . '/openid');
 }
 
 function openid_user_delete_form_submit(&$form_state, $form_values) {
@@ -106,5 +106,5 @@ function openid_user_delete_form_submit(&$form_state, $form_values) {
   if ($query) {
     drupal_set_message(t('OpenID deleted.'));
   }
-  $form_state['#redirect'] = 'user/'. $form_state['#args'][0]->uid .'/openid';
+  $form_state['#redirect'] = 'user/' . $form_state['#args'][0]->uid . '/openid';
 }
diff --git a/modules/php/php.test b/modules/php/php.test
index bf1ea6a243d251f46e5e0ee3ee9cc2e1f85e6855..ded3efce3a965fc54c9db01dbc272e9f7f770d20 100644
--- a/modules/php/php.test
+++ b/modules/php/php.test
@@ -55,7 +55,7 @@ class PHPFilterTestCase extends PHPTestCase {
     $node = $this->createNodeWithCode();
 
     // Make sure that the PHP code shows up as text.
-    $this->drupalGet('node/'. $node->nid);
+    $this->drupalGet('node/' . $node->nid);
     $this->assertText('print', t('PHP code is displayed.'));
 
     // Change filter to PHP filter and see that PHP code is evaluated.
@@ -92,7 +92,7 @@ class PHPAccessTestCase extends PHPTestCase {
     $node = $this->createNodeWithCode();
 
     // Make sure that the PHP code shows up as text.
-    $this->drupalGet('node/'. $node->nid);
+    $this->drupalGet('node/' . $node->nid);
     $this->assertText('print', t('PHP code is displayed.'));
 
     // Make sure that user doesn't have access to filter.
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc
index e0252ce104de50c815dc387108d82342a81cca28..5ef53ffcb27939ae6f7e23c1d57d33e9fc374bca 100644
--- a/modules/profile/profile.admin.inc
+++ b/modules/profile/profile.admin.inc
@@ -397,7 +397,7 @@ function profile_field_delete_submit($form, &$form_state) {
  */
 function profile_admin_settings_autocomplete($string) {
   $matches = array();
-  $result = db_query_range("SELECT category FROM {profile_field} WHERE LOWER(category) LIKE LOWER(:category)", array(':category' => $string .'%'), 0, 10);
+  $result = db_query_range("SELECT category FROM {profile_field} WHERE LOWER(category) LIKE LOWER(:category)", array(':category' => $string . '%'), 0, 10);
   while ($data = db_fetch_object($result)) {
     $matches[$data->category] = check_plain($data->category);
   }
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index d2e2c3da314ad6dc5b083825ce2327f036e08dda..0e97ef2bc7939f56fadc76e5d1e7120cd88212de 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -293,8 +293,8 @@ function profile_view_field($user, $field) {
   // and if a user has permission to view profiles. Note that this check is
   // necessary because a user may always see their own profile.
   $browse = user_access('access user profiles')
-         && (user_access('administer users') || $field->visibility != PROFILE_PRIVATE)
-         && !empty($field->page);
+        && (user_access('administer users') || $field->visibility != PROFILE_PRIVATE)
+        && !empty($field->page);
 
   if (isset($user->{$field->name}) && $value = $user->{$field->name}) {
     switch ($field->type) {
diff --git a/modules/profile/profile.pages.inc b/modules/profile/profile.pages.inc
index 858458eb121da89f101fe9428a547fac0108bc49..7d1bd4a7619425d7ce5770eb4cf8ea3ef0a8d785 100644
--- a/modules/profile/profile.pages.inc
+++ b/modules/profile/profile.pages.inc
@@ -114,7 +114,7 @@ function profile_autocomplete($field, $string) {
   if ($autocomplete_field) {
     $result = db_query_range("SELECT value FROM {profile_value} WHERE fid = :fid AND LOWER(value) LIKE LOWER(:value) GROUP BY value ORDER BY value ASC", array(
       ':fid' => $field,
-      ':value' => $string .'%',
+      ':value' => $string . '%',
     ), 0, 10);
     while ($data = db_fetch_object($result)) {
       $matches[$data->value] = check_plain($data->value);
diff --git a/modules/profile/profile.test b/modules/profile/profile.test
index 3d35f153bbe1b46e52bbeb8c95b8c7d38a80fc47..bbb26deafad4cf7886ce73b3f4d9626f3f9c4852 100644
--- a/modules/profile/profile.test
+++ b/modules/profile/profile.test
@@ -136,7 +136,7 @@ class ProfileTestFields extends ProfileTestCase {
       'checkbox' => 1,
       // An underscore is an invalid character in a domain name. The method randomName can
       // return an underscore.
-      'url' => 'http://www.' . str_replace('_', '', $this->randomName(10)). '.org',
+      'url' => 'http://www.' . str_replace('_', '', $this->randomName(10)) . '.org',
     );
 
     // For each field type, create a field, give it a value and delete the field.
@@ -263,7 +263,7 @@ class ProfileTestAutocomplete extends ProfileTestCase {
 
     // Set some html for what we want to see in the page output later.
     $autocomplete_html = '<input class="autocomplete" type="hidden" id="' . form_clean_id('edit-' . $field['form_name'] . '-autocomplete') . '" value="' . url('profile/autocomplete/' . $field['fid'], array('absolute' => TRUE)) . '" disabled="disabled" />';
-    $field_html = '<input type="text" maxlength="255" name="' . $field['form_name'] . '" id="'. form_clean_id('edit-' . $field['form_name']) . '" size="60" value="' . $field['value'] . '" class="form-text form-autocomplete required" />';
+    $field_html = '<input type="text" maxlength="255" name="' . $field['form_name'] . '" id="' . form_clean_id('edit-' . $field['form_name']) . '" size="60" value="' . $field['value'] . '" class="form-text form-autocomplete required" />';
 
     // Check that autocompletion html is found on the user's profile edit page.
     $this->drupalGet('user/' . $this->admin_user->uid . '/edit/' . $category);
diff --git a/modules/search/search.module b/modules/search/search.module
index c7748b2b006175f574fd3eb506b242775bf1219c..8c26c6b6fbc34cb67025cd87f690ab98c3e8dcb3 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -52,34 +52,34 @@
  * Matches all 'N' Unicode character classes (numbers)
  */
 define('PREG_CLASS_NUMBERS',
-'\x{30}-\x{39}\x{b2}\x{b3}\x{b9}\x{bc}-\x{be}\x{660}-\x{669}\x{6f0}-\x{6f9}'.
-'\x{966}-\x{96f}\x{9e6}-\x{9ef}\x{9f4}-\x{9f9}\x{a66}-\x{a6f}\x{ae6}-\x{aef}'.
-'\x{b66}-\x{b6f}\x{be7}-\x{bf2}\x{c66}-\x{c6f}\x{ce6}-\x{cef}\x{d66}-\x{d6f}'.
-'\x{e50}-\x{e59}\x{ed0}-\x{ed9}\x{f20}-\x{f33}\x{1040}-\x{1049}\x{1369}-'.
-'\x{137c}\x{16ee}-\x{16f0}\x{17e0}-\x{17e9}\x{17f0}-\x{17f9}\x{1810}-\x{1819}'.
-'\x{1946}-\x{194f}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2153}-\x{2183}'.
-'\x{2460}-\x{249b}\x{24ea}-\x{24ff}\x{2776}-\x{2793}\x{3007}\x{3021}-\x{3029}'.
-'\x{3038}-\x{303a}\x{3192}-\x{3195}\x{3220}-\x{3229}\x{3251}-\x{325f}\x{3280}-'.
+'\x{30}-\x{39}\x{b2}\x{b3}\x{b9}\x{bc}-\x{be}\x{660}-\x{669}\x{6f0}-\x{6f9}' .
+'\x{966}-\x{96f}\x{9e6}-\x{9ef}\x{9f4}-\x{9f9}\x{a66}-\x{a6f}\x{ae6}-\x{aef}' .
+'\x{b66}-\x{b6f}\x{be7}-\x{bf2}\x{c66}-\x{c6f}\x{ce6}-\x{cef}\x{d66}-\x{d6f}' .
+'\x{e50}-\x{e59}\x{ed0}-\x{ed9}\x{f20}-\x{f33}\x{1040}-\x{1049}\x{1369}-' .
+'\x{137c}\x{16ee}-\x{16f0}\x{17e0}-\x{17e9}\x{17f0}-\x{17f9}\x{1810}-\x{1819}' .
+'\x{1946}-\x{194f}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2153}-\x{2183}' .
+'\x{2460}-\x{249b}\x{24ea}-\x{24ff}\x{2776}-\x{2793}\x{3007}\x{3021}-\x{3029}' .
+'\x{3038}-\x{303a}\x{3192}-\x{3195}\x{3220}-\x{3229}\x{3251}-\x{325f}\x{3280}-' .
 '\x{3289}\x{32b1}-\x{32bf}\x{ff10}-\x{ff19}');
 
 /**
  * Matches all 'P' Unicode character classes (punctuation)
  */
 define('PREG_CLASS_PUNCTUATION',
-'\x{21}-\x{23}\x{25}-\x{2a}\x{2c}-\x{2f}\x{3a}\x{3b}\x{3f}\x{40}\x{5b}-\x{5d}'.
-'\x{5f}\x{7b}\x{7d}\x{a1}\x{ab}\x{b7}\x{bb}\x{bf}\x{37e}\x{387}\x{55a}-\x{55f}'.
-'\x{589}\x{58a}\x{5be}\x{5c0}\x{5c3}\x{5f3}\x{5f4}\x{60c}\x{60d}\x{61b}\x{61f}'.
-'\x{66a}-\x{66d}\x{6d4}\x{700}-\x{70d}\x{964}\x{965}\x{970}\x{df4}\x{e4f}'.
-'\x{e5a}\x{e5b}\x{f04}-\x{f12}\x{f3a}-\x{f3d}\x{f85}\x{104a}-\x{104f}\x{10fb}'.
-'\x{1361}-\x{1368}\x{166d}\x{166e}\x{169b}\x{169c}\x{16eb}-\x{16ed}\x{1735}'.
-'\x{1736}\x{17d4}-\x{17d6}\x{17d8}-\x{17da}\x{1800}-\x{180a}\x{1944}\x{1945}'.
-'\x{2010}-\x{2027}\x{2030}-\x{2043}\x{2045}-\x{2051}\x{2053}\x{2054}\x{2057}'.
-'\x{207d}\x{207e}\x{208d}\x{208e}\x{2329}\x{232a}\x{23b4}-\x{23b6}\x{2768}-'.
-'\x{2775}\x{27e6}-\x{27eb}\x{2983}-\x{2998}\x{29d8}-\x{29db}\x{29fc}\x{29fd}'.
-'\x{3001}-\x{3003}\x{3008}-\x{3011}\x{3014}-\x{301f}\x{3030}\x{303d}\x{30a0}'.
-'\x{30fb}\x{fd3e}\x{fd3f}\x{fe30}-\x{fe52}\x{fe54}-\x{fe61}\x{fe63}\x{fe68}'.
-'\x{fe6a}\x{fe6b}\x{ff01}-\x{ff03}\x{ff05}-\x{ff0a}\x{ff0c}-\x{ff0f}\x{ff1a}'.
-'\x{ff1b}\x{ff1f}\x{ff20}\x{ff3b}-\x{ff3d}\x{ff3f}\x{ff5b}\x{ff5d}\x{ff5f}-'.
+'\x{21}-\x{23}\x{25}-\x{2a}\x{2c}-\x{2f}\x{3a}\x{3b}\x{3f}\x{40}\x{5b}-\x{5d}' .
+'\x{5f}\x{7b}\x{7d}\x{a1}\x{ab}\x{b7}\x{bb}\x{bf}\x{37e}\x{387}\x{55a}-\x{55f}' .
+'\x{589}\x{58a}\x{5be}\x{5c0}\x{5c3}\x{5f3}\x{5f4}\x{60c}\x{60d}\x{61b}\x{61f}' .
+'\x{66a}-\x{66d}\x{6d4}\x{700}-\x{70d}\x{964}\x{965}\x{970}\x{df4}\x{e4f}' .
+'\x{e5a}\x{e5b}\x{f04}-\x{f12}\x{f3a}-\x{f3d}\x{f85}\x{104a}-\x{104f}\x{10fb}' .
+'\x{1361}-\x{1368}\x{166d}\x{166e}\x{169b}\x{169c}\x{16eb}-\x{16ed}\x{1735}' .
+'\x{1736}\x{17d4}-\x{17d6}\x{17d8}-\x{17da}\x{1800}-\x{180a}\x{1944}\x{1945}' .
+'\x{2010}-\x{2027}\x{2030}-\x{2043}\x{2045}-\x{2051}\x{2053}\x{2054}\x{2057}' .
+'\x{207d}\x{207e}\x{208d}\x{208e}\x{2329}\x{232a}\x{23b4}-\x{23b6}\x{2768}-' .
+'\x{2775}\x{27e6}-\x{27eb}\x{2983}-\x{2998}\x{29d8}-\x{29db}\x{29fc}\x{29fd}' .
+'\x{3001}-\x{3003}\x{3008}-\x{3011}\x{3014}-\x{301f}\x{3030}\x{303d}\x{30a0}' .
+'\x{30fb}\x{fd3e}\x{fd3f}\x{fe30}-\x{fe52}\x{fe54}-\x{fe61}\x{fe63}\x{fe68}' .
+'\x{fe6a}\x{fe6b}\x{ff01}-\x{ff03}\x{ff05}-\x{ff0a}\x{ff0c}-\x{ff0f}\x{ff1a}' .
+'\x{ff1b}\x{ff1f}\x{ff20}\x{ff3b}-\x{ff3d}\x{ff3f}\x{ff5b}\x{ff5d}\x{ff5f}-' .
 '\x{ff65}');
 
 /**
@@ -649,7 +649,7 @@ function search_node_update_index($node) {
   while ($link = db_fetch_object($result)) {
     $output[] = $link->caption;
   }
-  if (count($output)) { 
+  if (count($output)) {
     return '<a>(' . implode(', ', $output) . ')</a>';
   }
 }
diff --git a/modules/search/search.test b/modules/search/search.test
index 0e85a612703196382d06e7a2d8c0d49eee8920ce..b7f5e9c2aab02de9e8a514d0920497c2dbcfa135 100644
--- a/modules/search/search.test
+++ b/modules/search/search.test
@@ -385,7 +385,7 @@ class SearchBlockTestCase extends DrupalWebTestCase {
     // Create and login user
     $admin_user = $this->drupalCreateUser(array('administer blocks', 'search content'));
     $this->drupalLogin($admin_user);
-    
+
     // Disable the theme form to avoid confusion.
     $settings = theme_get_settings();
     $settings['toggle_search'] = FALSE;
@@ -403,7 +403,7 @@ class SearchBlockTestCase extends DrupalWebTestCase {
     $this->drupalPost('admin/build/block', $edit, t('Save blocks'));
     $this->assertText(t('The block settings have been updated.'), t('Block successfully move to footer region.'));
   }
-  
+
   /**
    * Test that the search block form works correctly.
    */
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 9d06095d43e5b7d724c13873bdd2352f7ccdafa2..c632fa9311a0986d115f667c7070c79f7c6d0076 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1843,7 +1843,7 @@ protected function assertUniqueTextHelper($text, $message, $group, $be_unique) {
       $this->plainTextContent = filter_xss($this->content, array());
     }
     if (!$message) {
-      $message = '"' . $text . '"'. ($be_unique ? ' found only once' : ' found more than once');
+      $message = '"' . $text . '"' . ($be_unique ? ' found only once' : ' found more than once');
     }
     $first_occurance = strpos($this->plainTextContent, $text);
     if ($first_occurance === FALSE) {
diff --git a/modules/simpletest/simpletest.api.php b/modules/simpletest/simpletest.api.php
index a1cc808de8c7557d9c1630579e2d5b92ebf1d4b8..d507a31e57fd7d4fa65663366e3478780e1d4d6b 100644
--- a/modules/simpletest/simpletest.api.php
+++ b/modules/simpletest/simpletest.api.php
@@ -13,7 +13,7 @@
 
 /**
  * A test group has started.
- * 
+ *
  * This hook is called just once at the beginning of a test group.
  *
  * @return
@@ -27,7 +27,7 @@ function hook_test_group_started() {
  * A test group has finished.
  *
  * This hook is called just once at the end of a test group.
- * 
+ *
  * @return
  *   None.
  *
@@ -37,11 +37,11 @@ function hook_test_group_finished() {
 
 /**
  * An individual test has finished.
- * 
+ *
  * This hook is called when an individual test has finished.
  *
  * @param
- *   $results The results of the test as gathered by DrupalWebTestCase. 
+ *   $results The results of the test as gathered by DrupalWebTestCase.
  *
  * @return
  *   None.
diff --git a/modules/simpletest/simpletest.install b/modules/simpletest/simpletest.install
index 8daa227c36231fb2f9517f8313115f103fde4ad0..052ecdb3e5fa03421d00007f918bd292c7ca0b8a 100644
--- a/modules/simpletest/simpletest.install
+++ b/modules/simpletest/simpletest.install
@@ -76,7 +76,7 @@ function simpletest_generate_file($filename, $width, $lines, $type = 'binary-tex
         break;
     }
   }
-  $text = wordwrap($text, $width - 1, "\n", TRUE) ."\n"; // Add \n for symetrical file.
+  $text = wordwrap($text, $width - 1, "\n", TRUE) . "\n"; // Add \n for symetrical file.
 
   // Create filename.
   $path = file_directory_path() . '/simpletest/';
diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module
index 224685d7c498c5cb3ad6ec42dd6c32e6883be523..df0725f765337199023c455107de389961c53718 100644
--- a/modules/simpletest/simpletest.module
+++ b/modules/simpletest/simpletest.module
@@ -12,11 +12,11 @@
 function simpletest_help($path, $arg) {
   switch ($path) {
     case 'admin/help#simpletest':
-      $output  = '<p>' . t('The SimpleTest module is a framework for running automated unit tests in Drupal. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules.') .'</p>';
-      $output .= '<p>' . t('Visit <a href="@admin-simpletest">Administer >> Site building >> SimpleTest</a> to display a list of available tests. For comprehensive testing, select <em>all</em> tests, or individually select tests for more targeted testing. Note that it might take several minutes for all tests to complete.)', array('@admin-simpletest' => url('admin/development/testing'))) .'</p>';
-      $output .= '<p>' . t('After the tests have run, a message will be displayed next to each test group indicating whether tests within it passed, failed, or had exceptions. A pass means that a test returned the expected results, while fail means that it did not. An exception normally indicates an error outside of the test, such as a PHP warning or notice. If there were fails or exceptions, the results are expanded, and the tests that had issues will be indicated in red or pink rows. Use these results to refine your code and tests until all tests return a pass.') .'</p>';
-      $output .= '<p>' . t('For more information on creating and modifying your own tests, see the <a href="@simpletest-api">SimpleTest API Documentation</a> in the Drupal handbook.', array('@simpletest-api' => 'http://drupal.org/simpletest')) .'</p>';
-      $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@simpletest">SimpleTest module</a>.', array('@simpletest' => 'http://drupal.org/handbook/modules/simpletest')) .'</p>';
+      $output  = '<p>' . t('The SimpleTest module is a framework for running automated unit tests in Drupal. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules.') . '</p>';
+      $output .= '<p>' . t('Visit <a href="@admin-simpletest">Administer >> Site building >> SimpleTest</a> to display a list of available tests. For comprehensive testing, select <em>all</em> tests, or individually select tests for more targeted testing. Note that it might take several minutes for all tests to complete.)', array('@admin-simpletest' => url('admin/development/testing'))) . '</p>';
+      $output .= '<p>' . t('After the tests have run, a message will be displayed next to each test group indicating whether tests within it passed, failed, or had exceptions. A pass means that a test returned the expected results, while fail means that it did not. An exception normally indicates an error outside of the test, such as a PHP warning or notice. If there were fails or exceptions, the results are expanded, and the tests that had issues will be indicated in red or pink rows. Use these results to refine your code and tests until all tests return a pass.') . '</p>';
+      $output .= '<p>' . t('For more information on creating and modifying your own tests, see the <a href="@simpletest-api">SimpleTest API Documentation</a> in the Drupal handbook.', array('@simpletest-api' => 'http://drupal.org/simpletest')) . '</p>';
+      $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@simpletest">SimpleTest module</a>.', array('@simpletest' => 'http://drupal.org/handbook/modules/simpletest')) . '</p>';
       return $output;
   }
 }
@@ -129,9 +129,9 @@ function simpletest_run_tests($test_list, $reporter = 'drupal') {
     'init_message' => t('Processing test @num of @max - %test.', array('%test' => $info['name'], '@num' => '1', '@max' => count($test_list))),
   );
   batch_set($batch);
-  
+
   module_invoke_all('test_group_started');
-  
+
   // Normally, the forms portion of the batch API takes care of calling
   // batch_process(), but in the process it saves the whole $form into the
   // database (which is huge for the test selection form).
diff --git a/modules/simpletest/simpletest.pages.inc b/modules/simpletest/simpletest.pages.inc
index 20b40b52a674c07402a6d2d1e2b1ee64d6536373..e31094217ad863ce509789a382796e02ef621e84 100644
--- a/modules/simpletest/simpletest.pages.inc
+++ b/modules/simpletest/simpletest.pages.inc
@@ -346,7 +346,7 @@ function simpletest_result_form_submit($form, &$form_state) {
  * @return HTML output.
  */
 function theme_simpletest_result_summary($form) {
-  return '<div class="simpletest-' . ($form['#ok'] ? 'pass' : 'fail') .'">' . _simpletest_format_summary_line($form) . '</div>';
+  return '<div class="simpletest-' . ($form['#ok'] ? 'pass' : 'fail') . '">' . _simpletest_format_summary_line($form) . '</div>';
 }
 
 /**
diff --git a/modules/simpletest/simpletest.test b/modules/simpletest/simpletest.test
index 646bc1383dac1ab91f9dcddcc36cca33447d1efe..ed1c5b92b1801f40c85c92a5e06f9cbbedcaffae 100644
--- a/modules/simpletest/simpletest.test
+++ b/modules/simpletest/simpletest.test
@@ -159,7 +159,7 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase {
    * Fetch the test id from the test results.
    */
   function getTestIdFromResults() {
-    foreach($this->childTestResults['assertions'] as $assertion) {
+    foreach ($this->childTestResults['assertions'] as $assertion) {
       if (preg_match('@^Test ID is ([0-9]*)\.$@', $assertion['message'], $matches)) {
         return $matches[1];
       }
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 76f50977b97b54e5f0f0b24f433b79988684b798..3af7786e299585dfd7914e6fa8d95638b57a5578 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -316,7 +316,7 @@ class DrupalHTTPRequestTestCase extends DrupalWebTestCase {
     $password = $this->randomName();
     $url = url('system-test/auth', array('absolute' => TRUE));
 
-    $auth = str_replace('http://', 'http://' . $username . ':' . $password .'@', $url);
+    $auth = str_replace('http://', 'http://' . $username . ':' . $password . '@', $url);
     $result = drupal_http_request($auth);
 
     $this->drupalSetContent($result->data);
@@ -711,7 +711,7 @@ class ValidUrlTestCase extends DrupalWebTestCase {
       foreach ($valid_relative_urls as $url) {
         $test_url = $front . $url;
         $valid_url = valid_url($test_url);
-        $this->assertTrue($valid_url,t('@url is a valid url.', array('@url' => $test_url)));
+        $this->assertTrue($valid_url, t('@url is a valid url.', array('@url' => $test_url)));
       }
     }
   }
@@ -730,7 +730,7 @@ class ValidUrlTestCase extends DrupalWebTestCase {
       foreach ($invalid_relative_urls as $url) {
         $test_url = $front . $url;
         $valid_url = valid_url($test_url);
-        $this->assertFALSE($valid_url,t('@url is NOT a valid url.', array('@url' => $test_url)));
+        $this->assertFALSE($valid_url, t('@url is NOT a valid url.', array('@url' => $test_url)));
       }
     }
   }
diff --git a/modules/simpletest/tests/database_test.install b/modules/simpletest/tests/database_test.install
index 30dd238c0ff0f43e020ee1835c4c22970cc2c597..e16c0ad8182ec699f1411626eab8398ce321bdbb 100644
--- a/modules/simpletest/tests/database_test.install
+++ b/modules/simpletest/tests/database_test.install
@@ -64,7 +64,7 @@ function database_test_schema() {
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
-       ),
+      ),
       'age' => array(
         'description' => "The person's age",
         'type' => 'int',
@@ -109,7 +109,7 @@ function database_test_schema() {
         'description' => 'Simple unique ID.',
         'type' => 'serial',
         'not null' => TRUE,
-       ),
+      ),
       'blob1' => array(
         'description' => 'A dummy BLOB field.',
         'type' => 'blob',
diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test
index 2fa7f6c8fc8f929d5149b24405f763931200d332..6a5faa53868c46c900531930a286eb7928680674 100644
--- a/modules/simpletest/tests/database_test.test
+++ b/modules/simpletest/tests/database_test.test
@@ -769,7 +769,7 @@ class DatabaseUpdateComplexTestCase extends DatabaseTestCase {
     $num_updated = db_update('test')
       ->condition('name', 'Ringo')
       ->fields(array('job' => 'Musician'))
-      ->expression('age', 'age + :age',array(':age' => 4))
+      ->expression('age', 'age + :age', array(':age' => 4))
       ->execute();
     $this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
 
@@ -790,7 +790,7 @@ class DatabaseUpdateComplexTestCase extends DatabaseTestCase {
     $before_age = db_query("SELECT age FROM {test} WHERE name = 'Ringo'")->fetchField();
     $num_updated = db_update('test')
       ->condition('name', 'Ringo')
-      ->expression('age', 'age + :age',array(':age' => 4))
+      ->expression('age', 'age + :age', array(':age' => 4))
       ->execute();
     $this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
 
@@ -1643,7 +1643,7 @@ class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase {
     if (!($num_pages * $limit < $count)) {
       $num_pages--;
     }
-    
+
     for ($page = 0; $page <= $num_pages; ++$page) {
       $this->drupalGet('database_test/pager_query_even/' . $limit, array('query' => array('page' => $page)));
       $data = json_decode($this->drupalGetContent());
@@ -1769,7 +1769,7 @@ class DatabaseSelectTableSortDefaultTestCase extends DatabaseTestCase {
       $this->assertEqual($last->task, $sort['last'], t('Items appear in the correct order.'));
     }
   }
-  
+
   /**
    * Confirm that if a tablesort's orderByHeader is called before another orderBy, that the header happens first.
    *
@@ -2391,7 +2391,7 @@ class DatabaseInvalidDataTestCase extends DatabaseTestCase {
       // Ensure the other values were not inserted.
       $record = db_select('test')
         ->fields('test', array('name', 'age'))
-        ->condition('age', array(17, 75),'IN')
+        ->condition('age', array(17, 75), 'IN')
         ->execute()->fetchObject();
 
       $this->assertFalse($record, t('The rest of the insert aborted as expected.'));
@@ -2596,7 +2596,7 @@ class DatabaseTransactionTestCase extends DatabaseTestCase {
       $saved_age = db_query("SELECT age FROM {test} WHERE name = :name", array(':name' => 'DanielB'))->fetchField();
       $this->assertNotIdentical($saved_age, '19', t('Cannot retrieve DanielB row after commit.'));
     }
-    catch(Exception $e) {
+    catch (Exception $e) {
       $this->fail($e->getMessage());
     }
   }
@@ -2622,7 +2622,7 @@ class DatabaseTransactionTestCase extends DatabaseTestCase {
       $saved_age = db_query("SELECT age FROM {test} WHERE name = :name", array(':name' => 'DanielB'))->fetchField();
       $this->assertIdentical($saved_age, '19', t('DanielB not rolled back, since transactions are not supported.'));
     }
-    catch(Exception $e) {
+    catch (Exception $e) {
       $this->fail($e->getMessage());
     }
   }
@@ -2644,7 +2644,7 @@ class DatabaseTransactionTestCase extends DatabaseTestCase {
       $saved_age = db_query("SELECT age FROM {test} WHERE name = :name", array(':name' => 'DanielA'))->fetchField();
       $this->assertIdentical($saved_age, '19', t('Can retrieve DanielA row after commit.'));
     }
-    catch(Exception $e) {
+    catch (Exception $e) {
       $this->fail($e->getMessage());
     }
   }
diff --git a/modules/simpletest/tests/file.test b/modules/simpletest/tests/file.test
index 7afc6f5c84b887dbf064e041dcdff8b79fa2e079..b68fef7dd9f2efe703520ceaebb6c90eeef3026b 100644
--- a/modules/simpletest/tests/file.test
+++ b/modules/simpletest/tests/file.test
@@ -705,13 +705,13 @@ class FileDirectoryTest extends FileTestCase {
     $this->assertDirectoryPermissions($directory, variable_get('file_chmod_directory', 0775));
 
     // Remove .htaccess file to then test that it gets re-created.
-    @unlink(file_directory_path() .'/.htaccess');
+    @unlink(file_directory_path() . '/.htaccess');
     $directory = file_directory_path();
     file_check_directory($directory);
     $this->assertTrue(is_file(file_directory_path() . '/.htaccess'), t('Successfully created the .htaccess file in the files directory.'), 'File');
 
     // Verify contents of .htaccess file.
-    $file = file_get_contents(file_directory_path() .'/.htaccess');
+    $file = file_get_contents(file_directory_path() . '/.htaccess');
     $this->assertEqual($file, "SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006\nOptions None\nOptions +FollowSymLinks", t('The .htaccess file contains the proper content.'), 'File');
   }
 
@@ -773,14 +773,14 @@ class FileDirectoryTest extends FileTestCase {
     // directory.
     $basename = 'xyz.txt';
     $directory = 'misc';
-    $original = $directory .'/'. $basename;
+    $original = $directory . '/' . $basename;
     $path = file_create_filename($basename, $directory);
     $this->assertEqual($path, $original, t('New filepath %new equals %original.', array('%new' => $path, '%original' => $original)), 'File');
 
     // Then we test against a file that already exists within that directory.
     $basename = 'druplicon.png';
-    $original = $directory .'/'. $basename;
-    $expected = $directory .'/druplicon_0.png';
+    $original = $directory . '/' . $basename;
+    $expected = $directory . '/druplicon_0.png';
     $path = file_create_filename($basename, $directory);
     $this->assertEqual($path, $expected, t('Creating a new filepath from %original equals %new.', array('%new' => $path, '%original' => $original)), 'File');
 
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index 79eb5a1ad94836a72506a1fd9fb83308575f2c4d..c06a452d9e31371de2afce16c4ab9bfa4e87ac8c 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -42,7 +42,7 @@ class FormsTestCase extends DrupalWebTestCase {
     $elements['radios']['element'] = array('#title' => $this->randomName(), '#type' => 'radios', '#required' => TRUE, '#options' => array($this->randomName(), $this->randomName(), $this->randomName()));
     $elements['radios']['empty_values'] = $empty_arrays;
 
-    $elements['checkboxes']['element'] = array('#title' => $this->randomName(), '#type' => 'checkboxes', '#required' => TRUE,'#options' => array($this->randomName(), $this->randomName(), $this->randomName()));
+    $elements['checkboxes']['element'] = array('#title' => $this->randomName(), '#type' => 'checkboxes', '#required' => TRUE, '#options' => array($this->randomName(), $this->randomName(), $this->randomName()));
     $elements['checkboxes']['empty_values'] = $empty_arrays;
 
     $elements['select']['element'] = array('#title' => $this->randomName(), '#type' => 'select', '#required' => TRUE, '#options' => array($this->randomName(), $this->randomName(), $this->randomName()));
@@ -142,7 +142,7 @@ class FormsElementsTableSelectFunctionalTest extends DrupalWebTestCase {
     $this->assertFieldByXPath('//th[@class="select-all"]', NULL, t('Presence of the "Select all" checkbox.'));
 
     $rows = array('row1', 'row2', 'row3');
-    foreach($rows as $row) {
+    foreach ($rows as $row) {
       $this->assertFieldByXPath('//input[@type="checkbox"]', $row, t('Checkbox for value @row.', array('@row' => $row)));
     }
   }
@@ -159,7 +159,7 @@ class FormsElementsTableSelectFunctionalTest extends DrupalWebTestCase {
     $this->assertNoFieldByXPath('//th[@class="select-all"]', '', t('Absence of the "Select all" checkbox.'));
 
     $rows = array('row1', 'row2', 'row3');
-    foreach($rows as $row) {
+    foreach ($rows as $row) {
       $this->assertFieldByXPath('//input[@type="radio"]', $row, t('Radio button for value @row.', array('@row' => $row)));
     }
   }
@@ -411,7 +411,7 @@ class FormsFormStorageTestCase extends DrupalWebTestCase {
    * Tests using the form in a usual way.
    */
   function testForm() {
-    
+
     $user = $this->drupalCreateUser(array('access content'));
     $this->drupalLogin($user);
 
@@ -432,7 +432,7 @@ class FormsFormStorageTestCase extends DrupalWebTestCase {
 
     $this->drupalPost('form_test/form-storage', array('title' => 'new', 'value' => 'value_is_set'), 'Continue', array('query' => 'cache=1'));
     $this->assertText('Form constructions: 1', t('The form has been constructed one time till now.'));
-    
+
     $this->drupalPost(NULL, array(), 'Save', array('query' => 'cache=1'));
     $this->assertText('Form constructions: 2', t('The form has been constructed two times till now.'));
     $this->assertText('Title: new', t('The form storage has stored the values.'));
diff --git a/modules/simpletest/tests/image.test b/modules/simpletest/tests/image.test
index 21fb97ac9c8f5f8dd7580792a25ac6842f06f22a..d25d895828891ec5db76af4b3523b766345ab0b4 100644
--- a/modules/simpletest/tests/image.test
+++ b/modules/simpletest/tests/image.test
@@ -392,7 +392,7 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase {
         }
 
         // Perform our operation.
-        $function = 'image_'. $values['function'];
+        $function = 'image_' . $values['function'];
         $arguments = array();
         $arguments[] = &$image;
         $arguments = array_merge($arguments, $values['arguments']);
diff --git a/modules/simpletest/tests/registry.test b/modules/simpletest/tests/registry.test
index 9a363849f346a44c7eb7400c98768db564bb8f7b..f8bebf9051250b6d03561d0495be9c280d8290eb 100644
--- a/modules/simpletest/tests/registry.test
+++ b/modules/simpletest/tests/registry.test
@@ -143,8 +143,8 @@ class RegistrySkipBodyTestCase extends DrupalWebTestCase {
       'group' => t('System'),
     );
   }
-  
-  function testRegistrySkipBody () {
+
+  function testRegistrySkipBody() {
     // This string contains all three kinds of opening braces.
     $function = '<?php function foo () { $x = "{$y}"; $x = "${y}"; }';
     $tokens = token_get_all($function);
diff --git a/modules/simpletest/tests/schema.test b/modules/simpletest/tests/schema.test
index 968106c34ec56c4e2bf8619e68fd534b8145816d..716bef282926385283ba57adc5a9c034f0f3550d 100644
--- a/modules/simpletest/tests/schema.test
+++ b/modules/simpletest/tests/schema.test
@@ -103,7 +103,7 @@ class SchemaTestCase extends DrupalWebTestCase {
 
   function tryInsert($table = 'test_table') {
     try {
-      db_query("INSERT INTO {" . $table . "} (id) VALUES (:id)", array(':id' => mt_rand(10,20)));
+      db_query("INSERT INTO {" . $table . "} (id) VALUES (:id)", array(':id' => mt_rand(10, 20)));
       return TRUE;
     }
     catch (Exception $e) {
diff --git a/modules/simpletest/tests/xmlrpc.test b/modules/simpletest/tests/xmlrpc.test
index fb94911ade503ad652bfca0e375ec63727323752..8fa656be46372b2304d0368270941cbef680b866 100644
--- a/modules/simpletest/tests/xmlrpc.test
+++ b/modules/simpletest/tests/xmlrpc.test
@@ -26,13 +26,13 @@ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
     mt_srand();
 
 
-    $array_1 = array(array('curly' => mt_rand(-100,100)),
-                   array('curly' => mt_rand(-100,100)),
-                   array('larry' => mt_rand(-100,100)),
-                   array('larry' => mt_rand(-100,100)),
-                   array('moe' => mt_rand(-100,100)),
-                   array('moe' => mt_rand(-100,100)),
-                   array('larry' => mt_rand(-100,100)));
+    $array_1 = array(array('curly' => mt_rand(-100, 100)),
+                  array('curly' => mt_rand(-100, 100)),
+                  array('larry' => mt_rand(-100, 100)),
+                  array('larry' => mt_rand(-100, 100)),
+                  array('moe' => mt_rand(-100, 100)),
+                  array('moe' => mt_rand(-100, 100)),
+                  array('larry' => mt_rand(-100, 100)));
     shuffle($array_1);
     $l_res_1 = xmlrpc_test_arrayOfStructsTest($array_1);
     $r_res_1 = xmlrpc($xml_url, 'validator1.arrayOfStructsTest', $array_1);
@@ -45,7 +45,7 @@ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
     $this->assertIdentical($l_res_2, $r_res_2, 'count the entities test: %s');
 
 
-    $struct_3 = array('moe' => mt_rand(-100,100), 'larry' => mt_rand(-100,100), 'curly' => mt_rand(-100,100), 'homer' => mt_rand(-100,100));
+    $struct_3 = array('moe' => mt_rand(-100, 100), 'larry' => mt_rand(-100, 100), 'curly' => mt_rand(-100, 100), 'homer' => mt_rand(-100, 100));
     $l_res_3 = xmlrpc_test_easyStructTest($struct_3);
     $r_res_3 = xmlrpc($xml_url, 'validator1.easyStructTest', $struct_3);
     $this->assertIdentical($l_res_3, $r_res_3, 'easy struct test: %s');
@@ -59,10 +59,10 @@ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
     $r_res_4 = xmlrpc($xml_url, 'validator1.echoStructTest', $struct_4);
     $this->assertIdentical($l_res_4, $r_res_4, 'echo struct test: %s');
 
-    $int_5     = mt_rand(-100,100);
+    $int_5     = mt_rand(-100, 100);
     $bool_5    = (($int_5 % 2) == 0);
     $string_5  = $this->randomName();
-    $double_5  = (double)(mt_rand(-1000,1000) / 100);
+    $double_5  = (double)(mt_rand(-1000, 1000) / 100);
     $time_5    = REQUEST_TIME;
     $base64_5  = $this->randomName(100);
     $l_res_5 = xmlrpc_test_manyTypesTest($int_5, $bool_5, $string_5, $double_5, xmlrpc_date($time_5), $base64_5);
@@ -73,10 +73,10 @@ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
     $this->assertEqual($l_res_5, $r_res_5, 'many types test: %s');
 
 
-    $size = mt_rand(100,200);
+    $size = mt_rand(100, 200);
     $array_6 = array();
     for ($i = 0; $i < $size; $i++) {
-      $array_6[] = $this->randomName(mt_rand(8,12));
+      $array_6[] = $this->randomName(mt_rand(8, 12));
     }
 
     $l_res_6 = xmlrpc_test_moderateSizeArrayCheck($array_6);
@@ -91,9 +91,9 @@ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
           $ys = (string)$y;
           $ms = sprintf('%02d', $m);
           $ds = sprintf('%02d', $d);
-          $struct_7[$ys][$ms][$ds]['moe']   = mt_rand(-100,100);
-          $struct_7[$ys][$ms][$ds]['larry'] = mt_rand(-100,100);
-          $struct_7[$ys][$ms][$ds]['curly'] = mt_rand(-100,100);
+          $struct_7[$ys][$ms][$ds]['moe']   = mt_rand(-100, 100);
+          $struct_7[$ys][$ms][$ds]['larry'] = mt_rand(-100, 100);
+          $struct_7[$ys][$ms][$ds]['curly'] = mt_rand(-100, 100);
         }
       }
     }
@@ -102,7 +102,7 @@ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
     $this->assertIdentical($l_res_7, $r_res_7, 'nested struct test: %s');
 
 
-    $int_8 = mt_rand(-100,100);
+    $int_8 = mt_rand(-100, 100);
     $l_res_8 = xmlrpc_test_simpleStructReturnTest($int_8);
     $r_res_8 = xmlrpc($xml_url, 'validator1.simpleStructReturnTest', $int_8);
     $this->assertIdentical($l_res_8, $r_res_8, 'nested struct test: %s');
diff --git a/modules/statistics/statistics.admin.inc b/modules/statistics/statistics.admin.inc
index ed225dbfc06726266d40f11f16809169489a7167..0e4cff77e9c428cc5c6939bd5558d138a320fcab 100644
--- a/modules/statistics/statistics.admin.inc
+++ b/modules/statistics/statistics.admin.inc
@@ -61,7 +61,7 @@ function statistics_top_pages() {
   $query->addExpression('MAX(title)', 'title');
   $query->addExpression('AVG(timer)', 'average_time');
   $query->addExpression('SUM(timer)', 'total_time');
-  
+
   $query
     ->fields('accesslog', array('path'))
     ->groupBy('path')
@@ -119,7 +119,7 @@ function statistics_top_visitors() {
   $count_query = db_select('accesslog');
   $count_query->addExpression('COUNT(DISTINCT CONCAT(CAST(uid AS char), hostname))');
   $query->setCountQuery($count_query);
-  
+
   $result = $query->execute();
   $rows = array();
   foreach ($result as $account) {
@@ -155,7 +155,7 @@ function statistics_top_referrers() {
   $query->addExpression('MAX(timestamp)', 'last');
   $query
     ->fields('a', array('url'))
-    ->where('LOWER(url) NOT LIKE :host', array(':host' => '%'. $_SERVER['HTTP_HOST'] .'%'))
+    ->where('LOWER(url) NOT LIKE :host', array(':host' => '%' . $_SERVER['HTTP_HOST'] . '%'))
     ->condition('url', '', '<>')
     ->groupBy('url')
     ->limit(30)
@@ -164,7 +164,7 @@ function statistics_top_referrers() {
   $count_query = db_select('accesslog');
   $count_query->addExpression('COUNT(DISTINCT url)');
   $count_query
-    ->where('LOWER(url) NOT LIKE :host', array(':host' => '%'. $_SERVER['HTTP_HOST'] .'%'))
+    ->where('LOWER(url) NOT LIKE :host', array(':host' => '%' . $_SERVER['HTTP_HOST'] . '%'))
     ->condition('url', '', '<>');
   $query->setCountQuery($count_query);
 
diff --git a/modules/system/image.gd.inc b/modules/system/image.gd.inc
index a67ecf4704db896db57bbb1148dfcf5e5029cec5..884a931522ddc34b8bc14178c44cb124ed023d9d 100644
--- a/modules/system/image.gd.inc
+++ b/modules/system/image.gd.inc
@@ -235,7 +235,7 @@ function image_gd_desaturate(stdClass $image) {
  */
 function image_gd_load(stdClass $image) {
   $extension = str_replace('jpg', 'jpeg', $image->info['extension']);
-  $function = 'imagecreatefrom'. $extension;
+  $function = 'imagecreatefrom' . $extension;
   return (function_exists($function) && $image->resource = $function($image->source));
 }
 
@@ -255,7 +255,7 @@ function image_gd_load(stdClass $image) {
  */
 function image_gd_save(stdClass $image, $destination) {
   $extension = str_replace('jpg', 'jpeg', $image->info['extension']);
-  $function = 'image'. $extension;
+  $function = 'image' . $extension;
   if (!function_exists($function)) {
     return FALSE;
   }
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 3fffeab84d9e55c5ddd7b594ac6ee58aa2b0e507..1b12299061feb13286b13e089902cdeac1be4df5 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -179,7 +179,7 @@ function system_themes_form() {
     }
     else {
       // Ensure this theme is compatible with this version of core.
-      // Require the 'content' region to make sure the main page 
+      // Require the 'content' region to make sure the main page
       // content has a common place in all themes.
       if (!isset($theme->info['core']) || ($theme->info['core'] != DRUPAL_CORE_COMPATIBILITY) || (!isset($theme->info['regions']['content']))) {
         $incompatible_core[] = $theme->name;
@@ -2040,15 +2040,15 @@ function theme_system_modules_fieldset($form) {
     // If we have help, it becomes the first part
     // of the description - with CSS, it is float: right'd.
     if (isset($module['help'])) {
-      $description = '<div class="module-help">'. drupal_render($module['help']) .'</div>';
+      $description = '<div class="module-help">' . drupal_render($module['help']) . '</div>';
     }
     // Add the description, along with any modules it requires.
     $description .= drupal_render($module['description']);
     if ($module['#requires']) {
-     $description .= '<div class="admin-requirements">' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '</div>';
+      $description .= '<div class="admin-requirements">' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '</div>';
     }
     if ($module['#required_by']) {
-     $description .= '<div class="admin-requirements">' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '</div>';
+      $description .= '<div class="admin-requirements">' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '</div>';
     }
     $row[] = array('data' => $description, 'class' => 'description');
     $rows[] = $row;
@@ -2067,7 +2067,7 @@ function theme_system_modules_fieldset($form) {
  *   An HTML string for the message.
  */
 function theme_system_modules_incompatible($message) {
-  return '<div class="incompatible">'. $message .'</div>';
+  return '<div class="incompatible">' . $message . '</div>';
 }
 
 /**
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 3adfef94a7ab201403d06bcedd38ec710f4343a5..d5c1d650b78e06ca0195f63a666cd6349dfae302 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -457,7 +457,7 @@ function hook_link($type, $object, $teaser = FALSE) {
 
 /**
  * Perform alterations before links on a comment are rendered. One popular use of
- * this hook is to modify/remove links from other modules. If you want to add a link 
+ * this hook is to modify/remove links from other modules. If you want to add a link
  * to the links section of a node, use hook_link instead.
  *
  * @param $links
@@ -1588,13 +1588,13 @@ function hook_install() {
  * the same directory as mymodule.module. Drupal core's updates are implemented
  * using the system module as a name and stored in database/updates.inc.
  *
- * If your update task is potentially time-consuming, you'll need to implement a 
- * multipass update to avoid PHP timeouts. Multipass updates use the $sandbox 
- * parameter provided by the batch API (normally, $context['sandbox']) to store 
- * information between successive calls, and the $ret['#finished'] return value 
+ * If your update task is potentially time-consuming, you'll need to implement a
+ * multipass update to avoid PHP timeouts. Multipass updates use the $sandbox
+ * parameter provided by the batch API (normally, $context['sandbox']) to store
+ * information between successive calls, and the $ret['#finished'] return value
  * to provide feedback regarding completion level.
  *
- * See the batch operations page for more information on how to use the batch API: 
+ * See the batch operations page for more information on how to use the batch API:
  * @link http://drupal.org/node/146843 http://drupal.org/node/146843 @endlink
  *
  * @return An array with the results of the calls to update_sql(). An upate
@@ -1611,11 +1611,11 @@ function hook_update_N(&$sandbox = NULL) {
   $ret = array();
   db_add_field($ret, 'mytable1', 'newcol', array('type' => 'int', 'not null' => TRUE, 'description' => 'My new integer column.'));
   return $ret;
-  
-  // However, for more complex operations that may take a long time, 
+
+  // However, for more complex operations that may take a long time,
   // you may hook into Batch API as in the following example.
   $ret = array();
-  
+
   // Update 3 users at a time to have an exclamation point after their names.
   // (They're really happy that we can do batch API in this hook!)
   if (!isset($sandbox['progress'])) {
@@ -1633,13 +1633,13 @@ function hook_update_N(&$sandbox = NULL) {
   foreach ($users as $user) {
     $user->name .= '!';
     $ret[] = update_sql("UPDATE {users} SET name = '$user->name' WHERE uid = $user->uid");
-    
+
     $sandbox['progress']++;
     $sandbox['current_uid'] = $user->uid;
   }
 
   $ret['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']);
-  
+
   return $ret;
 }
 
diff --git a/modules/system/system.install b/modules/system/system.install
index bce67a59eab65e7b62e71cc44f242550255adbea..483d6098af730049a4e765451d9a528421670d7f 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -2582,9 +2582,9 @@ function system_update_6043() {
   db_add_index($ret, 'history', 'nid', array('nid'));
   // Change length of theme field in {blocks} to be consistent with module, and
   // to avoid a MySQL error regarding a too-long index. Also add new indices.
-  db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),array(
-                  'unique keys' => array('tmd' => array('theme', 'module', 'delta'),),
-                  'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'),),));
+  db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), array(
+                  'unique keys' => array('tmd' => array('theme', 'module', 'delta')),
+                  'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'))));
   db_add_index($ret, 'blocks_roles', 'rid', array('rid'));
   // Improve filter module indices.
   db_drop_index($ret, 'filters', 'weight');
@@ -2626,8 +2626,8 @@ function system_update_6043() {
   if (db_table_exists('profile_values')) {
     db_drop_index($ret, 'profile_values', 'uid');
     db_drop_index($ret, 'profile_values', 'fid');
-    db_change_field($ret,'profile_values' ,'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,), array('indexes' => array('fid' => array('fid'),)));
-    db_change_field($ret,'profile_values' ,'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,));
+    db_change_field($ret,'profile_values' ,'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), array('indexes' => array('fid' => array('fid'))));
+    db_change_field($ret,'profile_values' ,'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
     db_add_primary_key($ret, 'profile_values', array('uid', 'fid'));
   }
   // Alter a statistics module table to add an index.
@@ -2941,7 +2941,7 @@ function system_update_7004(&$sandbox) {
       foreach ($renamed_deltas as $module => $deltas) {
         foreach ($deltas as $old_delta => $new_delta) {
           // Only do the update if the old block actually exists.
-          $block_exists = db_query("SELECT COUNT(*) FROM {" . $table . "} WHERE module = :module AND delta = :delta",array(
+          $block_exists = db_query("SELECT COUNT(*) FROM {" . $table . "} WHERE module = :module AND delta = :delta", array(
             ':module' => $module,
             ':delta' => $old_delta,
           ))
@@ -3345,7 +3345,7 @@ function system_update_7020() {
  */
 function system_update_7021() {
   $ret = array();
-  
+
   // Collect a list of themes with blocks.
   $themes_with_blocks = array();
   $result = db_query("SELECT s.name FROM {system} s INNER JOIN {block} b ON s.name = b.theme WHERE s.type = 'theme' GROUP by s.name");
@@ -3366,7 +3366,7 @@ function system_update_7021() {
     }
     drupal_set_message('The contact form information setting was migrated to <a href="' . url('admin/build/block/configure/block/' . $bid) . '">a custom block</a> and set up to only show on the site-wide contact page. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right.');
   }
-  
+
   // Migrate user help setting.
   if ($user_help = variable_get('user_registration_help', '')) {
     $bid = db_insert('box')->fields(array('body' => $user_help, 'info' => 'User registration guidelines', 'format' => FILTER_FORMAT_DEFAULT))->execute();
@@ -3376,7 +3376,7 @@ function system_update_7021() {
     }
     drupal_set_message('The user registration guidelines were migrated to <a href="' . url('admin/build/block/configure/block/' . $bid) . '">a custom block</a> and set up to only show on the user registration page. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right.');
   }
-  
+
   // Migrate site mission setting.
   if ($mission = variable_get('site_mission')) {
     $bid = db_insert('box')->fields(array('body' => $mission, 'info' => 'Site mission', 'format' => FILTER_FORMAT_DEFAULT))->execute();
@@ -3394,20 +3394,20 @@ function system_update_7021() {
     $bid = db_insert('box')->fields(array('body' => $footer_message, 'info' => 'Footer message', 'format' => FILTER_FORMAT_DEFAULT))->execute();
     foreach ($themes_with_blocks as $theme) {
       // Add site footer block for themes, which had blocks.
-      // Set low weight, so the block comes early (it used to be 
+      // Set low weight, so the block comes early (it used to be
       // before the other blocks).
       $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('block', '" . $bid . "', '" . $theme . "', 1, -10, 'footer', '', -1)");
     }
     drupal_set_message('The footer message was migrated to <a href="' . url('admin/build/block/configure/block/' . $bid) . '">a custom block</a> and set up to appear in the footer. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right. If your theme does not have a footer region, you might need to <a href="' . url('admin/build/block') . '">relocate the block</a>.');
   }
-  
+
   // Remove the variables (even if they were saved empty on the admin interface),
   // to avoid keeping clutter in the variables table.
   variable_del('contact_form_information');
   variable_del('user_registration_help');
   variable_del('site_mission');
   variable_del('site_footer');
-  
+
   // Rebuild theme data, so the new 'help' region is identified.
   system_theme_data();
 
diff --git a/modules/system/system.queue.inc b/modules/system/system.queue.inc
index 9fbed26eb0d976cff23452f5c4a775973e1fed2a..1970c50c3c5a6d1d0b2070aa29e11110ec490b71 100644
--- a/modules/system/system.queue.inc
+++ b/modules/system/system.queue.inc
@@ -62,7 +62,7 @@ class DrupalQueue {
   public static function get($name) {
     static $queues;
     if (!isset($queues[$name])) {
-      $class = variable_get('queue_module_'. $name, 'System') . 'Queue';
+      $class = variable_get('queue_module_' . $name, 'System') . 'Queue';
       $queues[$name] = new $class($name);
     }
     return $queues[$name];
diff --git a/modules/system/system.test b/modules/system/system.test
index d5d95fb69423a0b01cc79ae1cb78abe5e44e10ec..e49b26e5dbbf04b8cbbef863c35ccbb26b60c672 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -166,7 +166,7 @@ class ModuleDependencyTestCase extends ModuleTestCase {
   /**
    * Attempt to enable translation module without locale enabled.
    */
-  function testEnableWithoutDependency () {
+  function testEnableWithoutDependency() {
     // Attempt to enable content translation without locale enabled.
     $edit = array();
     $edit['modules[Core][translation][enable]'] = 'translation';
@@ -208,7 +208,7 @@ class ModuleRequiredTestCase extends ModuleTestCase {
   function testDisableRequired() {
     $required_modules = drupal_required_modules();
     $this->drupalGet('admin/build/modules');
-    foreach($required_modules as $module) {
+    foreach ($required_modules as $module) {
       // Check to make sure the checkbox for required module is not found.
       $this->assertNoFieldByName('modules[Core][' . $module . '][enable]');
     }
@@ -453,8 +453,8 @@ class AdminMetaTagTestCase extends DrupalWebTestCase {
    * Verify that the meta tag HTML is generated correctly.
    */
   public function testMetaTag() {
-    list($version,) = explode('.', VERSION);
-    $string = '<meta name="Generator" content="Drupal ' . $version. ' (http://drupal.org)" />';
+    list($version, ) = explode('.', VERSION);
+    $string = '<meta name="Generator" content="Drupal ' . $version . ' (http://drupal.org)" />';
     $this->drupalGet('node');
     $this->assertRaw($string, t('Fingerprinting meta tag generated correctly.'), t('System'));
   }
@@ -927,7 +927,7 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
       'node_admin_theme' => FALSE,
     );
     $this->drupalPost('admin/build/themes', $edit, t('Save configuration'));
-    
+
     $this->drupalGet('admin');
     $this->assertRaw('themes/garland', t('Administration theme used on an administration page.'));
 
@@ -936,7 +936,7 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
 
     // Reset to the default theme settings.
     $this->drupalPost('admin/build/themes', array(), t('Reset to defaults'));
-    
+
     $this->drupalGet('admin');
     $this->assertRaw('themes/garland', t('Site default theme used on administration page.'));
 
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index b71db8301e59bba16cb70b8ebcb1ffb04919ab69..319d80173448596d8d111654d7bfa30c8fdbbc14 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -64,7 +64,7 @@ function taxonomy_overview_vocabularies_submit($form, &$form_state) {
  */
 function theme_taxonomy_overview_vocabularies($form) {
   $rows = array();
- 
+
   foreach (element_children($form) as $key) {
     if (isset($form[$key]['name'])) {
       $vocabulary = &$form[$key];
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 4c1ab559aff05736c4fb9cead928964ece853d9f..d1854f849c2b3c57f444bfed7ad162b0221d4691 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -85,7 +85,7 @@ function taxonomy_node_view($node) {
         }
       }
     }
-  
+
     $node->content['links']['terms'] = array(
       '#type' => 'node_links',
       '#value' => $links,
@@ -361,7 +361,7 @@ function taxonomy_term_save($term) {
     $status = drupal_write_record('taxonomy_term_data', $term);
     module_invoke_all('taxonomy_term_update', $term);
   }
-  
+
   db_delete('taxonomy_term_relation')
     ->condition(db_or()
       ->condition('tid1', $term->tid)
@@ -409,10 +409,10 @@ function taxonomy_term_save($term) {
     }
   }
   else {
-     $query->values(array(
-       'tid' => $term->tid,
-       'parent' => $parent
-     ));
+    $query->values(array(
+     'tid' => $term->tid,
+     'parent' => $parent
+    ));
   }
   $query->execute();
 
@@ -492,7 +492,7 @@ function taxonomy_term_delete($tid) {
 
   cache_clear_all();
   taxonomy_terms_static_reset();
-  
+
   return SAVED_DELETED;
 }
 
@@ -826,7 +826,7 @@ function taxonomy_node_save($node, $terms) {
   if (is_array($terms) && !empty($terms)) {
     $query = db_insert('taxonomy_term_node')
       ->fields(array('nid', 'vid', 'tid'));
-    
+
     foreach ($terms as $term) {
       if (is_array($term)) {
         foreach ($term as $tid) {
@@ -1406,7 +1406,7 @@ function taxonomy_term_load($tid) {
  *  A term object. Results are statically cached.
  */
 function taxonomy_get_term_data($tid) {
-   $terms = &drupal_static(__FUNCTION__, array());
+  $terms = &drupal_static(__FUNCTION__, array());
 
   if (!isset($terms[$tid])) {
     $terms[$tid] = db_query('SELECT * FROM {taxonomy_term_data} WHERE tid = :tid', array(':tid' => $tid))->fetch();
@@ -1494,7 +1494,7 @@ function theme_taxonomy_term_select($element) {
  *   Whether the nodes are to be used with a pager (the case on most Drupal
  *   pages) or not (in an XML feed, for example).
  * @param $order
- *   The order clause for the query that retrieve the nodes. 
+ *   The order clause for the query that retrieve the nodes.
  *   It is important to specifc the table alias (n).
  *
  *   Example:
@@ -1532,7 +1532,7 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p
       $query->condition($alias . '.tid', $tids, 'IN');
     }
   }
-  
+
   if ($pager) {
     $count_query = clone $query;
     $count_query->addExpression('COUNT(DISTINCT n.nid)');
@@ -1540,7 +1540,7 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p
     $query = $query
       ->extend('PagerDefault')
       ->limit(variable_get('default_nodes_main', 10));
-     $query->setCountQuery($count_query);
+    $query->setCountQuery($count_query);
   }
   else {
     $query->range(0, variable_get('feed_default_items', 10));
diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc
index 2454c51958ddc383d1415df4b3645596d32109bd..1e77f40ab3c1b03714dc7689062f33a61dcf02dc 100644
--- a/modules/taxonomy/taxonomy.pages.inc
+++ b/modules/taxonomy/taxonomy.pages.inc
@@ -134,11 +134,11 @@ function taxonomy_autocomplete($vid, $string = '') {
     $tags = $query
       ->fields('t', array('tid', 'name'))
       ->condition('t.vid', $vid)
-      ->where("LOWER(t.name) LIKE LOWER(:last_string)", array(':last_string' => '%'. $last_string .'%'))
+      ->where("LOWER(t.name) LIKE LOWER(:last_string)", array(':last_string' => '%' . $last_string . '%'))
       ->range(0, 10)
       ->execute()
       ->fetchAllKeyed();
-      
+
     $prefix = count($array) ? implode(', ', $array) . ', ' : '';
 
     foreach ($tags as $tid => $name) {
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 636c7a030a1dc7cc641dbca9624fa7426eb420f8..a1ce27127fb105b17518cc0d9c21c3272ac66c3d 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -104,7 +104,7 @@ class TaxonomyVocabularyFunctionalTest extends TaxonomyWebTestCase {
     foreach ($vocabularies as $key => $vocabulary) {
       $vocabulary->weight = -$vocabulary->weight;
       $vocabularies[$key]->weight = $vocabulary->weight;
-      $edit[$key .'[weight]'] = $vocabulary->weight;
+      $edit[$key . '[weight]'] = $vocabulary->weight;
     }
     // Saving the new weights via the interface.
     $this->drupalPost('admin/content/taxonomy/', $edit, t('Save'));
@@ -157,7 +157,7 @@ class TaxonomyVocabularyFunctionalTest extends TaxonomyWebTestCase {
 
     // Delete the vocabulary.
     $edit = array();
-    $this->drupalPost('admin/content/taxonomy/' .$vid, $edit, t('Delete'));
+    $this->drupalPost('admin/content/taxonomy/' . $vid, $edit, t('Delete'));
     $this->assertRaw(t('Are you sure you want to delete the vocabulary %name?', array('%name' => $vocabulary->name)), t('[confirm deletion] Asks for confirmation.'));
     $this->assertText(t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'), t('[confirm deletion] Inform that all terms will be deleted.'));
 
@@ -175,13 +175,13 @@ class TaxonomyVocabularyFunctionalTest extends TaxonomyWebTestCase {
  */
 class TaxonomyVocabularyUnitTest extends TaxonomyWebTestCase {
 
-public static function getInfo() {
-     return array(
-       'name' => t('Taxonomy vocabularies'),
-       'description' => t('Test loading, saving and deleting vocabularies.'),
-       'group' => t('Taxonomy'),
-     );
-   }
+  public static function getInfo() {
+    return array(
+      'name' => t('Taxonomy vocabularies'),
+      'description' => t('Test loading, saving and deleting vocabularies.'),
+      'group' => t('Taxonomy'),
+    );
+  }
 
   function setUp() {
     parent::setUp('taxonomy');
@@ -501,7 +501,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
     $edit['title'] = $this->randomName();
     // Insert the terms in a comma separated list. Vocabulary 1 is a
     // free-tagging field created by the default profile.
-    $edit['taxonomy[tags][' . $this->vocabulary->vid .']'] =  implode(', ', $terms);
+    $edit['taxonomy[tags][' . $this->vocabulary->vid . ']'] =  implode(', ', $terms);
     $edit['body'] = $this->randomName();
     $this->drupalPost('node/add/article', $edit, t('Save'));
     $this->assertRaw(t('@type %title has been created.', array('@type' => t('Article'), '%title' => $edit['title'])), t('The node was created successfully'));
diff --git a/modules/trigger/trigger.test b/modules/trigger/trigger.test
index c51a140cb86ce368051adab498de81e2805885ab..a662e33e769975bd133b008953330fea79f22ddc 100644
--- a/modules/trigger/trigger.test
+++ b/modules/trigger/trigger.test
@@ -42,7 +42,7 @@ class TriggerContentTestCase extends DrupalWebTestCase {
       $edit[$info['property']] = !$info['expected'];
       $this->drupalPost('node/add/page', $edit, t('Save'));
       // Make sure the text we want appears.
-      $this->assertRaw(t('!post %title has been created.', array ('!post' => 'Page', '%title' => $edit['title'])), t('Make sure the page has actually been created'));
+      $this->assertRaw(t('!post %title has been created.', array('!post' => 'Page', '%title' => $edit['title'])), t('Make sure the page has actually been created'));
       // Action should have been fired.
       $loaded_node = $this->drupalGetNodeByTitle($edit['title']);;
       $this->assertTrue($loaded_node->$info['property'] == $info['expected'], t('Make sure the @action action fired.', array('@action' => $info['name'])));
diff --git a/modules/update/update.api.php b/modules/update/update.api.php
index e9fc111ec308994738b1b724872ee87fcea00226..07a2278bb74d5ff1c0391158e590111022ab5e94 100644
--- a/modules/update/update.api.php
+++ b/modules/update/update.api.php
@@ -25,8 +25,8 @@ function hook_update_status_alter(&$projects) {
   foreach ($projects as $project => $project_info) {
     if (isset($settings[$project]) && isset($settings[$project]['check']) &&
         ($settings[$project]['check'] == 'never' ||
-         (isset($project_info['recommended']) &&
-          $settings[$project]['check'] === $project_info['recommended']))) {
+          (isset($project_info['recommended']) &&
+            $settings[$project]['check'] === $project_info['recommended']))) {
       $projects[$project]['status'] = UPDATE_NOT_CHECKED;
       $projects[$project]['reason'] = t('Ignored from settings');
       if (!empty($settings[$project]['notes'])) {
diff --git a/modules/update/update.compare.inc b/modules/update/update.compare.inc
index 4564a91945852912ac6ce8209940e42d7f8cf52f..dbee991b4711ffd1661773a07fb38aa7aae87f5c 100644
--- a/modules/update/update.compare.inc
+++ b/modules/update/update.compare.inc
@@ -402,8 +402,8 @@ function update_calculate_project_data($available) {
         // Otherwise, ignore unpublished, insecure, or unsupported releases.
         if ($release['status'] == 'unpublished' ||
             (isset($release['terms']['Release type']) &&
-             (in_array('Insecure', $release['terms']['Release type']) ||
-              in_array('Unsupported', $release['terms']['Release type'])))) {
+              (in_array('Insecure', $release['terms']['Release type']) ||
+                in_array('Unsupported', $release['terms']['Release type'])))) {
           continue;
         }
 
diff --git a/modules/update/update.fetch.inc b/modules/update/update.fetch.inc
index b7970e82462d05646ef2650f87010d735b25438c..5230dc35956dec6cfe94bb71e8cab7909f8b6941 100644
--- a/modules/update/update.fetch.inc
+++ b/modules/update/update.fetch.inc
@@ -44,7 +44,7 @@ function _update_refresh() {
   // available release data, since even if we fail to fetch new data, we need
   // to clear out the stale data at this point.
   _update_cache_clear('update_available_releases');
-  
+
   foreach ($projects as $key => $project) {
     $url = _update_build_fetch_url($project, $site_key);
     $xml = drupal_http_request($url);
diff --git a/modules/update/update.module b/modules/update/update.module
index 92c541469603bedfbc9b0d551d2f01b4657e23ee..bb05efb9b8f934a233f8a9c056ef01d408b41504 100644
--- a/modules/update/update.module
+++ b/modules/update/update.module
@@ -562,7 +562,7 @@ function _update_cache_set($cid, $data, $expire) {
     ->execute();
 }
 
-/** 
+/**
  * Retrieve data from the private update status cache table.
  *
  * @param $cid
diff --git a/modules/update/update.report.inc b/modules/update/update.report.inc
index 945933d6746a9f9df096a4082f521242360702a9..05910304644413fdaa55822f57c09b204b86c8cb 100644
--- a/modules/update/update.report.inc
+++ b/modules/update/update.report.inc
@@ -127,11 +127,11 @@ function theme_update_report($data) {
           if ($project['recommended'] !== $project['latest_version']
               || !empty($project['also'])
               || ($project['install_type'] == 'dev'
-                 && isset($project['dev_version'])
-                 && $project['latest_version'] !== $project['dev_version']
-                 && $project['recommended'] !== $project['dev_version'])
+                && isset($project['dev_version'])
+                && $project['latest_version'] !== $project['dev_version']
+                && $project['recommended'] !== $project['dev_version'])
               || (isset($project['security updates'][0])
-                 && $project['recommended'] !== $project['security updates'][0])
+                && $project['recommended'] !== $project['security updates'][0])
               ) {
             $version_class .= ' version-recommended-strong';
           }
diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc
index 75cec521fcb2de3ea3d0d4b16fe1054a5541d5a4..b3421cb714ca441743d54c9f5f06cd3a2b76cb12 100644
--- a/modules/user/user.admin.inc
+++ b/modules/user/user.admin.inc
@@ -147,7 +147,7 @@ function user_admin_account() {
   $query->leftJoin('users_roles', 'ur', 'u.uid = ur.uid');
   $query->condition('u.uid', 0, '<>');
   user_build_filter_query($query);
-  
+
   $count_query = clone $query;
   $count_query->addExpression('COUNT(DISTINCT u.uid)');
 
diff --git a/modules/user/user.module b/modules/user/user.module
index b780d299b08f3dd9bcc60212c2fac2a4a9442e96..56fd181e178d35834cac9c7bb5f66a6de00706ee 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -399,7 +399,7 @@ function user_save($account, $edit = array(), $category = 'account') {
   $edit = (array) $edit;
 
   if (!isset($account->is_new)) {
-    $account->is_new = empty($account->uid); 
+    $account->is_new = empty($account->uid);
   }
   if (is_object($account) && !$account->is_new) {
     user_module_invoke('update', $edit, $account, $category);
@@ -597,15 +597,15 @@ function user_validate_name($name) {
     return t('The username contains an illegal character.');
   }
   if (preg_match('/[\x{80}-\x{A0}' .         // Non-printable ISO-8859-1 + NBSP
-                   '\x{AD}' .                // Soft-hyphen
-                   '\x{2000}-\x{200F}' .     // Various space characters
-                   '\x{2028}-\x{202F}' .     // Bidirectional text overrides
-                   '\x{205F}-\x{206F}' .     // Various text hinting characters
-                   '\x{FEFF}' .              // Byte order mark
-                   '\x{FF01}-\x{FF60}' .     // Full-width latin
-                   '\x{FFF9}-\x{FFFD}' .     // Replacement characters
-                   '\x{0}-\x{1F}]/u',        // NULL byte and control characters
-                   $name)) {
+                  '\x{AD}' .                // Soft-hyphen
+                  '\x{2000}-\x{200F}' .     // Various space characters
+                  '\x{2028}-\x{202F}' .     // Bidirectional text overrides
+                  '\x{205F}-\x{206F}' .     // Various text hinting characters
+                  '\x{FEFF}' .              // Byte order mark
+                  '\x{FF01}-\x{FF60}' .     // Full-width latin
+                  '\x{FFF9}-\x{FFFD}' .     // Replacement characters
+                  '\x{0}-\x{1F}]/u',        // NULL byte and control characters
+                  $name)) {
     return t('The username contains an illegal character.');
   }
   if (drupal_strlen($name) > USERNAME_MAX_LENGTH) {
@@ -787,32 +787,32 @@ function user_is_blocked($name) {
  * Implementation of hook_perm().
  */
 function user_perm() {
-   return array(
-     'administer permissions' =>  array(
-       'title' => t('Administer permissions'),
-       'description' => t('Manage the permissions assigned to user roles. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))),
-     ),
-     'administer users' => array(
-       'title' => t('Administer users'),
-       'description' => t('Manage or block users, and manage their role assignments.'),
-     ),
-     'access user profiles' => array(
-       'title' => t('Access user profiles'),
-       'description' => t('View profiles of users on the site, which may contain personal information.'),
-     ),
-     'change own username' => array(
-       'title' => t('Change own username'),
-       'description' => t('Select a different username.'),
-     ),
-     'cancel account' => array(
-       'title' => t('Cancel account'),
-       'description' => t('Remove or disable own user account and unpublish, anonymize, or remove own submissions depending on the configured <a href="@user-settings-url">user settings</a>.', array('@user-settings-url' => url('admin/user/settings'))),
-     ),
-     'select account cancellation method' => array(
-       'title' => t('Select method for cancelling own account'),
-       'description' => t('Select the method for cancelling own user account. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))),
-     ),
-   );
+  return array(
+    'administer permissions' =>  array(
+      'title' => t('Administer permissions'),
+      'description' => t('Manage the permissions assigned to user roles. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))),
+    ),
+    'administer users' => array(
+      'title' => t('Administer users'),
+      'description' => t('Manage or block users, and manage their role assignments.'),
+    ),
+    'access user profiles' => array(
+      'title' => t('Access user profiles'),
+      'description' => t('View profiles of users on the site, which may contain personal information.'),
+    ),
+    'change own username' => array(
+      'title' => t('Change own username'),
+      'description' => t('Select a different username.'),
+    ),
+    'cancel account' => array(
+      'title' => t('Cancel account'),
+      'description' => t('Remove or disable own user account and unpublish, anonymize, or remove own submissions depending on the configured <a href="@user-settings-url">user settings</a>.', array('@user-settings-url' => url('admin/user/settings'))),
+    ),
+    'select account cancellation method' => array(
+      'title' => t('Select method for cancelling own account'),
+      'description' => t('Select the method for cancelling own user account. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))),
+    ),
+  );
 }
 
 /**
@@ -1059,7 +1059,7 @@ function user_block_list() {
 function user_block_configure($delta = '') {
   global $user;
 
-  switch($delta) {
+  switch ($delta) {
     case 'new':
       $form['user_block_whois_new_count'] = array(
         '#type' => 'select',
@@ -1678,13 +1678,13 @@ function user_authenticate($form_values = array()) {
       require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
       if (user_check_password($password, $account)) {
         if (user_needs_new_hash($account)) {
-           $new_hash = user_hash_password($password);
-           if ($new_hash) {
-             db_update('users')
-               ->fields(array('pass' => $new_hash))
-               ->condition('uid', $account->uid)
-               ->execute();
-           }
+          $new_hash = user_hash_password($password);
+          if ($new_hash) {
+            db_update('users')
+              ->fields(array('pass' => $new_hash))
+              ->condition('uid', $account->uid)
+              ->execute();
+          }
         }
         $users = user_load_multiple(array($account->uid), array('status' => '1'));
         $user = reset($users);
diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc
index 804f152e699219780fb7b534ac1f6b974297ba48..8748635dc0c81e87cd13400f3792c07ae3facd88 100644
--- a/modules/user/user.pages.inc
+++ b/modules/user/user.pages.inc
@@ -12,7 +12,7 @@
 function user_autocomplete($string = '') {
   $matches = array();
   if ($string) {
-    $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER(:name)", array(':name' => $string .'%'), 0, 10);
+    $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER(:name)", array(':name' => $string . '%'), 0, 10);
     foreach ($result as $user) {
       $matches[$user->name] = check_plain($user->name);
     }
@@ -161,7 +161,7 @@ function user_logout() {
  *   Contains the default "History" profile data for a user.
  * - $page['content']['#account']:
  *   The user account of the profile being viewed.
- * 
+ *
  * To theme user profiles, copy modules/user/user-profile.tpl.php
  * to your theme directory, and edit it as instructed in that file's comments.
  */
@@ -169,7 +169,7 @@ function user_view($account) {
   drupal_set_title($account->name);
   // Retrieve all profile fields and attach to $account->content.
   user_build_content($account);
-  
+
   $build = $account->content;
   $build += array(
     '#theme' => 'user_profile',
@@ -189,7 +189,7 @@ function user_view($account) {
  */
 function template_preprocess_user_profile(&$variables) {
   $account = $variables['elements']['#account'];
-  
+
   $variables['profile'] = array();
   // Sort sections by weight
   uasort($account->content, 'element_sort');
diff --git a/modules/user/user.test b/modules/user/user.test
index 28c394025a0314ad1838dc575aa11a50f1149fc9..9b5e6d471fe6ba4be782a540201621bc7b570d98 100644
--- a/modules/user/user.test
+++ b/modules/user/user.test
@@ -69,9 +69,9 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
     $edit['pass[pass1]'] = '99999.0';
     $edit['pass[pass2]'] = '99999';
     $this->drupalPost(NULL, $edit, t('Save'));
-    $this->assertText(t('The specified passwords do not match.'), t('Type mismatched passwords display an error message.'));    
+    $this->assertText(t('The specified passwords do not match.'), t('Type mismatched passwords display an error message.'));
     $this->assertNoText(t('The changes have been saved.'), t('Save user password with mismatched type in password confirm.'));
-    
+
     // Change user password.
     $new_pass = user_password();
     $edit = array();
@@ -522,7 +522,7 @@ class UserPictureTestCase extends DrupalWebTestCase {
     $file_check = file_check_directory($file_dir, FILE_CREATE_DIRECTORY, 'file_directory_path');
 
     $picture_dir = variable_get('user_picture_path', 'pictures');
-    $picture_path = $file_dir . '/' .$picture_dir;
+    $picture_path = $file_dir . '/' . $picture_dir;
 
     $pic_check = file_check_directory($picture_path, FILE_CREATE_DIRECTORY, 'user_picture_path');
     $this->_directory_test = is_writable($picture_path);
@@ -1026,7 +1026,7 @@ class UserSaveTestCase extends DrupalWebTestCase {
     // User ID must be a number that is not in the database.
     $max_uid = db_result(db_query('SELECT MAX(uid) FROM {users}'));
     $test_uid = $max_uid + mt_rand(1000, 1000000);
-    $test_name = $this->randomName(); 
+    $test_name = $this->randomName();
 
     // Create the base user, based on drupalCreateUser().
     $user = array(
diff --git a/themes/garland/template.php b/themes/garland/template.php
index 16b4d28572443ce21fd3438c5172495306b0590b..cce7c2659587260b58ee8ba30b955655f8457378 100644
--- a/themes/garland/template.php
+++ b/themes/garland/template.php
@@ -45,7 +45,7 @@ function garland_preprocess_page(&$vars) {
   }
   $vars['site_title'] = implode(' ', $site_fields);
   if (!empty($site_fields)) {
-    $site_fields[0] = '<span>'. $site_fields[0] .'</span>';
+    $site_fields[0] = '<span>' . $site_fields[0] . '</span>';
   }
   $vars['site_html'] = implode(' ', $site_fields);
 
@@ -91,9 +91,9 @@ function garland_node_submitted($node) {
 function garland_get_ie_styles() {
   global $language;
 
-  $ie_styles = '<link type="text/css" rel="stylesheet" media="all" href="' . base_path() . path_to_theme() . '/fix-ie.css" />'. "\n";
+  $ie_styles = '<link type="text/css" rel="stylesheet" media="all" href="' . base_path() . path_to_theme() . '/fix-ie.css" />' . "\n";
   if ($language->direction == LANGUAGE_RTL) {
-    $ie_styles .= '      <style type="text/css" media="all">@import "' . base_path() . path_to_theme() . '/fix-ie-rtl.css";</style>'. "\n";
+    $ie_styles .= '      <style type="text/css" media="all">@import "' . base_path() . path_to_theme() . '/fix-ie-rtl.css";</style>' . "\n";
   }
 
   return $ie_styles;
diff --git a/update.php b/update.php
index 7333f178ce1becc544e2413399d138beb3115aa6..89c33b9d913f268507d542eef67fa3b3d1e777d1 100644
--- a/update.php
+++ b/update.php
@@ -237,7 +237,7 @@ function update_script_selection_form() {
       foreach (array_keys($updates) as $update) {
         if ($update > $schema_version) {
           // The description for an update comes from its Doxygen.
-          $func = new ReflectionFunction($module. '_update_'. $update);
+          $func = new ReflectionFunction($module . '_update_' . $update);
           $description = str_replace(array("\n", '*', '/'), '', $func->getDocComment());
           $pending[] = "$update - $description";
           if (!isset($default)) {
@@ -253,7 +253,7 @@ function update_script_selection_form() {
           '#type' => 'hidden',
           '#value' => $default,
         );
-        $form['start'][$module. '_updates'] = array(
+        $form['start'][$module . '_updates'] = array(
           '#markup' => theme('item_list', $pending, $module . ' module'),
         );
       }