From 7263fd512dc17ab6f05b3926473ff4d5d655ca31 Mon Sep 17 00:00:00 2001
From: Tim Plunkett <git@plnktt.com>
Date: Tue, 30 Aug 2011 17:07:44 -0400
Subject: [PATCH] Issue #1264798 by tim.plunkett: Fixed minor coding standards issues.

---
 cck.info                                           |    4 +-
 cck.install                                        |   21 ++---
 cck.module                                         |    3 +-
 modules/content_migrate/content_migrate.api.php    |    5 +-
 modules/content_migrate/content_migrate.info       |    9 --
 modules/content_migrate/content_migrate.install    |   15 ++-
 modules/content_migrate/content_migrate.module     |   19 ++--
 .../includes/content_migrate.admin.inc             |   96 ++++++++++----------
 .../includes/content_migrate.drush.inc             |   19 ++--
 .../includes/content_migrate.values.inc            |   67 +++++++-------
 .../modules/content_migrate.filefield.inc          |   37 +++++---
 .../modules/content_migrate.number.inc             |   34 ++++----
 .../modules/content_migrate.optionwidgets.inc      |   13 ++-
 .../modules/content_migrate.text.inc               |   48 +++++-----
 modules/content_migrate/tests/content_migrate.test |   33 ++++----
 15 files changed, 215 insertions(+), 208 deletions(-)

diff --git a/cck.info b/cck.info
index 329596f..63699f2 100644
--- a/cck.info
+++ b/cck.info
@@ -2,6 +2,4 @@ name = CCK
 description = Miscellaneous field functions not handled by core.
 package = CCK
 core = 7.x
-files[] = cck.module
-files[] = cck.install
-dependencies[] = field_ui
\ No newline at end of file
+dependencies[] = field_ui
diff --git a/cck.install b/cck.install
index 49a2f9b..0632583 100644
--- a/cck.install
+++ b/cck.install
@@ -1,27 +1,26 @@
 <?php
+
 /**
- * Implementation of hook_install().
+ * @file
+ * Install, update and uninstall functions for the CCK module.
  */
-function cck_install() {
-  
-}
 
 /**
- * Implementation of hook_uninstall().
+ * Implements hook_uninstall().
  */
 function cck_uninstall() {
   db_query("DELETE FROM {variable} WHERE name LIKE 'cck_extra_weights_%'");
 }
 
 /**
- * Implementation of hook_schema.
- * 
+ * Implements hook_schema().
+ *
  * Create a table to hold data for field settings CCK is managing,
- * like custom PHP code for Allowed values and default values that we 
+ * like custom PHP code for Allowed values and default values that we
  * don't want in core.
  */
 function cck_schema() {
- 
+
   $schema['cck_field_settings'] = array(
     'fields' => array(
       'field_name' => array(
@@ -48,7 +47,7 @@ function cck_schema() {
         'length' => 32,
         'not null' => FALSE,
         'description' => 'The name of the language, NULL for field settings.',
-      ),     
+      ),
       'setting_type' => array(
         'type' => 'varchar',
         'length' => 32,
@@ -89,7 +88,7 @@ function cck_update_7000() {
       'length' => 32,
       'not null' => FALSE,
       'description' => 'The name of the language, NULL for field settings.',
-    );     
+    );
     db_add_field('cck_field_settings', 'language', $field);
   }
 }
diff --git a/cck.module b/cck.module
index 8f9a25e..ef10448 100644
--- a/cck.module
+++ b/cck.module
@@ -1,4 +1,5 @@
 <?php
+
 /**
  * @file
  * Allows administrators to use php code snippets to
@@ -8,7 +9,7 @@
  */
 
 /**
- * Implementation of hook_perm().
+ * Implements hook_permission().
  */
 function cck_permission() {
   return array(
diff --git a/modules/content_migrate/content_migrate.api.php b/modules/content_migrate/content_migrate.api.php
index e8146eb..bf9a9e3 100644
--- a/modules/content_migrate/content_migrate.api.php
+++ b/modules/content_migrate/content_migrate.api.php
@@ -40,13 +40,12 @@ function hook_content_migrate_instance_alter(&$instance_value, $field_value) {
     case 'text':
       // The formatter names changed, all are prefixed with 'text_'.
       foreach ($instance_value['display'] as $context => $settings) {
-        $instance_value['display'][$context]['type'] = 'text_'. $settings['type'];
+        $instance_value['display'][$context]['type'] = 'text_' . $settings['type'];
       }
       break;
   }
 }
 
-
 /**
  * Implement this hook to alter individual data records as they are migrated.
  *
@@ -65,7 +64,7 @@ function hook_content_migrate_instance_alter(&$instance_value, $field_value) {
  *
  */
 function hook_content_migrate_data_record_alter(&$record, $field, $instance) {
-  switch($field['type']) {
+  switch ($field['type']) {
     case 'file':
       // Map D6 filefield field columns to D7 file field columns. Note the data
       // which was previously in the 'data' column is read into the
diff --git a/modules/content_migrate/content_migrate.info b/modules/content_migrate/content_migrate.info
index 9e5ac21..340dd12 100644
--- a/modules/content_migrate/content_migrate.info
+++ b/modules/content_migrate/content_migrate.info
@@ -2,13 +2,4 @@ name = Content Migrate
 description = Migrate fields and field data from CCK D6 format to the D7 field format. Required to migrate data, can be disabled once all fields have been migrated.
 core = 7.x
 package = CCK
-files[] = content_migrate.module
-files[] = content_migrate.api.php
-files[] = includes/content_migrate.admin.inc
-files[] = includes/content_migrate.values.inc
-files[] = includes/content_migrate.drush.inc
-files[] = modules/content_migrate.text.inc
-files[] = modules/content_migrate.number.inc
-files[] = modules/content_migrate.optionwidgets.inc
-files[] = modules/content_migrate.filefield.inc
 files[] = tests/content_migrate.test
diff --git a/modules/content_migrate/content_migrate.install b/modules/content_migrate/content_migrate.install
index e64f497..cd8d07f 100644
--- a/modules/content_migrate/content_migrate.install
+++ b/modules/content_migrate/content_migrate.install
@@ -1,6 +1,11 @@
 <?php
 
 /**
+ * @file
+ * Install, update and uninstall functions for the Content Migrate module.
+ */
+
+/**
  * Transfer weights from the D6 Manage Fields screen
  * to the D7 stored settings array. Do this once only, on install,
  * so later changes to these values in the Field UI screen will
@@ -22,17 +27,17 @@ function content_migrate_install() {
         'view_modes' => array(),
       );
     }
-    $weights = variable_get('content_extra_weights_'. $type_name, array());
-    
+    $weights = variable_get('content_extra_weights_' . $type_name, array());
+
     // If body has never been set in D6, it should be set to 0 to match the way D6 worked.
     // The D7 core update may have set it to a value like -4.
     if (empty($weights) || !array_key_exists('body_field', $weights)) {
       $stored_settings['node'][$type_name]['extra_fields']['form']['body'] = array('weight' => 0);
     }
-      
+
     // If a field name provided by a custom module has changed from D6 to D7,
     // they will have to alter this array too. We will set the original
-    // field name, other modules could take this information and move it 
+    // field name, other modules could take this information and move it
     // to a setting with the new field name.
 
     // @TODO Have any of the other core field names changed?
@@ -62,4 +67,4 @@ function content_migrate_install() {
   }
   variable_set('field_bundle_settings', $stored_settings);
   field_info_cache_clear();
-}
\ No newline at end of file
+}
diff --git a/modules/content_migrate/content_migrate.module b/modules/content_migrate/content_migrate.module
index 6c409b5..a04b397 100644
--- a/modules/content_migrate/content_migrate.module
+++ b/modules/content_migrate/content_migrate.module
@@ -2,8 +2,8 @@
 /**
  * @file
  * Code For D6 to D7 field data update.
- * 
- * Modules can implement hook_content_migrate_field_alter(), 
+ *
+ * Modules can implement hook_content_migrate_field_alter(),
  * hook_content_migrate_instance_alter(), and hook_content_migrate_data_record_alter()
  * to make changes to the settings or data as it is migrated.
  */
@@ -13,7 +13,7 @@ define('CONTENT_DB_STORAGE_PER_CONTENT_TYPE', 1);
 /**
  * Implements hook_menu().
  */
-function content_migrate_menu() { 
+function content_migrate_menu() {
   $items['admin/structure/content_migrate'] = array(
     'title' => 'Migrate fields',
     'description' => 'Migrate field settings and data from the Drupal 6 version to the Drupal 7 version.',
@@ -30,7 +30,7 @@ function content_migrate_menu() {
  * Create a D7-style field array from data stored
  * in the D6 content field tables.
  *
- * @param $field_name 
+ * @param $field_name
  *   Optionally request only a specific field name.
  */
 function content_migrate_get_field_values($field_name = NULL) {
@@ -89,8 +89,8 @@ function content_migrate_storage_type($field_value) {
   else {
     $instance_values = content_migrate_get_instance_values(NULL, $field_value['field_name']);
     foreach ($instance_values as $bundle => $instance_value) {
-      if (isset($instance_value['messages'])) { 
-        $messages = array_merge($messages, $instance_value['messages']);    
+      if (isset($instance_value['messages'])) {
+        $messages = array_merge($messages, $instance_value['messages']);
         unset($instance_values[$bundle]['messages']);
       }
     }
@@ -162,7 +162,7 @@ function content_migrate_new_columns($field) {
 
 /**
  * Implements hook_content_migrate_field_alter().
- * 
+ *
  * Use this to tweak the conversion of field settings
  * from the D6 style to the D7 style for specific
  * situations not handled by basic conversion,
@@ -183,7 +183,7 @@ function content_migrate_content_migrate_field_alter(&$field_value, $instance_va
 
 /**
  * Implements hook_content_migrate_instance_alter().
- * 
+ *
  * Use this to tweak the conversion of instance or widget settings
  * from the D6 style to the D7 style for specific
  * situations not handled by basic conversion, as when
@@ -201,11 +201,10 @@ function content_migrate_content_migrate_instance_alter(&$instance_value, $field
   content_migrate_number_instance_alter($instance_value, $field_value);
 
   module_load_include('inc', 'content_migrate', 'modules/content_migrate.optionwidgets');
-  content_migrate_optionwidgets_instance_alter($instance_value, $field_value); 
+  content_migrate_optionwidgets_instance_alter($instance_value, $field_value);
 
 }
 
-
 /**
  * Implements hook_content_migrate_data_record_alter().
  *
diff --git a/modules/content_migrate/includes/content_migrate.admin.inc b/modules/content_migrate/includes/content_migrate.admin.inc
index b2e9925..af27871 100644
--- a/modules/content_migrate/includes/content_migrate.admin.inc
+++ b/modules/content_migrate/includes/content_migrate.admin.inc
@@ -1,6 +1,6 @@
 <?php
 /**
- * @file content_migrate.admin.inc
+ * @file
  * Code to process field data migration, moved into a separate file for efficiency.
  */
 
@@ -10,7 +10,7 @@
  */
 function content_migrate_get_options() {
   $options = array('available' => array(), 'converted' => array(), 'missing' => array());
-  
+
   $field_values = content_migrate_get_field_values();
 
   if (empty($field_values)) {
@@ -20,10 +20,10 @@ function content_migrate_get_options() {
 
   $type_names = node_type_get_names();
   $new_fields = array_keys(field_info_fields());
-  
+
   // Figure out which field and widget modules are available.
   $available_modules = array_unique(array_merge(module_implements('field_info'), module_implements('field_widget_info')));
-  
+
   foreach ($field_values as $field_name => $field_value) {
     $messages = array();
     $bundles = array();
@@ -42,10 +42,10 @@ function content_migrate_get_options() {
     // Debug
     //dsm($field_value);
     //dsm($instance_values);
-    
+
     foreach ($instance_values as $bundle => $instance_value) {
-      if (isset($instance_value['messages'])) { 
-        $messages = array_merge($messages, $instance_value['messages']);    
+      if (isset($instance_value['messages'])) {
+        $messages = array_merge($messages, $instance_value['messages']);
         unset($instance_values[$bundle]['messages']);
       }
       $bundles[] = $type_names[$bundle];
@@ -73,8 +73,8 @@ function content_migrate_get_options() {
 
 /**
  * Form generator for the migration selection form.
- * 
- * @todo Make this into a nice table where you have 
+ *
+ * @todo Make this into a nice table where you have
  * an option to check all available fields to migrate
  * them all at once.
  */
@@ -99,20 +99,20 @@ function content_migrate_select($form, &$form_state) {
     '#header' => $header,
     '#options' => $options['available'],
     '#empty' => t('No fields are available to be migrated.'),
-  );  
+  );
   $form['available']['submit'] = array(
-    '#type' => 'submit', 
+    '#type' => 'submit',
     '#value' => t('Migrate selected fields'),
     '#submit' => array('content_migrate_select_submit'),
-  );  
+  );
 
   $form['converted'] = array(
     '#type' => 'fieldset',
     '#collapsible' => TRUE,
     '#collapsed' => count($options['converted']) < 1,
     '#title' => t('Converted fields'),
-    '#description' => '<p>'. t('Fields that have already been converted. You can choose to roll them back if the conversion did not work correctly. Note that rolling fields back will completely destroy the new field tables.') . ' <span class="error"><strong>' . t('This operation cannot be undone!') . '</strong></span>',
-  );    
+    '#description' => '<p>' . t('Fields that have already been converted. You can choose to roll them back if the conversion did not work correctly. Note that rolling fields back will completely destroy the new field tables.') . ' <span class="error"><strong>' . t('This operation cannot be undone!') . '</strong></span>',
+  );
   $form['converted']['data'] = array(
     '#type' => 'tableselect',
     '#header' => $header,
@@ -120,31 +120,31 @@ function content_migrate_select($form, &$form_state) {
     '#empty' => t('No fields are already converted.'),
   );
   $form['converted']['submit'] = array(
-    '#type' => 'submit', 
+    '#type' => 'submit',
     '#value' => t('Roll back selected fields'),
     '#submit' => array('content_migrate_rollback_submit'),
-  );     
-  
+  );
+
   $form['missing'] = array(
     '#type' => 'fieldset',
     '#collapsible' => TRUE,
     '#collapsed' => count($options['missing']) < 1,
     '#title' => t('Unavailable fields'),
     '#description' => t('Fields that cannot be migrated because some modules are missing.'),
-  );  
+  );
   $form['missing']['data'] = array(
     '#type' => 'tableselect',
     '#header' => $header,
     '#options' => $options['missing'],
     '#empty' => t('No fields have missing modules.'),
-  ); 
-      
+  );
+
   return $form;
 }
 
 /**
  * Submit handler.
- * 
+ *
  * @TODO add a confirmation on the rollback submission.
  */
 function content_migrate_rollback_submit($form, &$form_state) {
@@ -158,19 +158,19 @@ function content_migrate_rollback_submit($form, &$form_state) {
 function content_migrate_rollback($field_names) {
   foreach ($field_names as $field_name) {
     $field = field_info_field($field_name);
-    
+
     // Deleting the field only marks it for deletion.
     field_delete_field($field_name);
-    
+
     // We are bypassing the field batch processing
     // and simply deleting all the data.
     // The assumption is that the migration was
     // unsuccessful and will be re-attempted
-    // and we need to remove all traces of the 
+    // and we need to remove all traces of the
     // new field for later migrations to work.
     $new_table = content_migrate_new_table($field);
     db_drop_table($new_table);
-    
+
     $instances = field_read_instances(array('field_id' => $field['id']), array('include_deleted' => 1));
     foreach ($instances as $instance) {
       field_purge_instance($instance);
@@ -219,7 +219,7 @@ function _content_migrate_batch_process_create_fields($field_name, &$context) {
   $allowed_fields = field_info_field_types();
   $allowed_widgets = field_info_widget_types();
   $allowed_formatters = field_info_formatter_types();
-  
+
   $context['message'] = t('"Creating field: %field', array('%field' => $field_name));
   $field_value = content_migrate_get_field_values($field_name);
   if (isset($field_value['messages'])) {
@@ -228,38 +228,38 @@ function _content_migrate_batch_process_create_fields($field_name, &$context) {
   }
   $instance_info = field_info_instances('node');
 
-  // Create the field and store the new field 
-  // definition in $context so we can retrieve it later. 
+  // Create the field and store the new field
+  // definition in $context so we can retrieve it later.
   try {
     // A shared field may already have been created, check first.
     $field = field_info_field($field_value['field_name']);
     if (empty($field)) {
       unset($field_value['columns']);
-      unset($field_value['db_storage']);   
+      unset($field_value['db_storage']);
       $field = field_create_field($field_value);
       $context['fields'][$field_name] = $field;
       $messages[] = t("Created field @field_name", array('@field_name' => $field_name));
     }
- 
-    // Create each of the new instances and store 
+
+    // Create each of the new instances and store
     // the new instance definitions in $context.
     $instance_values = content_migrate_get_instance_values(NULL, $field_name);
 
     foreach ($instance_values as $bundle => $instance_value) {
       try {
 
-        if (isset($instance_value['messages'])) { 
-          $messages = array_merge($messages, $instance_value['messages']);    
+        if (isset($instance_value['messages'])) {
+          $messages = array_merge($messages, $instance_value['messages']);
           unset($instance_value['messages']);
         }
 
         if (!isset($instance_info[$bundle][$field_name])) {
-          $instance = field_create_instance($instance_value); 
+          $instance = field_create_instance($instance_value);
           $context['instances'][$field_name][$bundle] = $instance;
           $messages[] = t("Created instance of @field_name in bundle @bundle.", array(
             '@field_name' => $field_name, '@bundle' => $type_names[$bundle]));
         }
-        
+
       }
       catch (Exception $e) {
         $errors[] = t('Error creating instance of @field_name in bundle @bundle.', array(
@@ -269,7 +269,7 @@ function _content_migrate_batch_process_create_fields($field_name, &$context) {
     }
   }
   catch (Exception $e) {
-    $errors[] = t("Error creating field @field_name", array('@field_name' => $field_name)); 
+    $errors[] = t("Error creating field @field_name", array('@field_name' => $field_name));
     $errors[] = $e;
   }
   field_info_cache_clear();
@@ -282,7 +282,7 @@ function _content_migrate_batch_process_create_fields($field_name, &$context) {
   }
 
   $context['finished'] = TRUE;
-} 
+}
 
 /**
  * Batch operation callback to migrate data.
@@ -305,7 +305,7 @@ function _content_migrate_batch_process_migrate_data($field_name, &$context) {
     foreach ($instance_values as $bundle => $instance_value) {
       $types[] = $bundle;
     }
-    $field = field_info_field($field_name);  
+    $field = field_info_field($field_name);
     $old_table          = content_migrate_old_table($field_value, $instance_value);
     $old_cols           = content_migrate_old_columns($field_value, $instance_value);
     $new_table          = content_migrate_new_table($field);
@@ -322,7 +322,7 @@ function _content_migrate_batch_process_migrate_data($field_name, &$context) {
       ->orderBy('nid', 'ASC')
       ->distinct()
       ->execute();
-    
+
     $nodes = array();
     foreach ($result as $row) {
       $nodes[] = array('nid' => $row['nid'], 'title' => $row['title'], 'type' => $row['type'], 'vid' => $row['vid'], 'language' => $row['language']);
@@ -338,7 +338,7 @@ function _content_migrate_batch_process_migrate_data($field_name, &$context) {
     $context['sandbox']['types'] = $types;
     $context['sandbox']['field'] = $field;
     $context['sandbox']['add_delta'] = $add_delta;
-   
+
   }
 
   // Process one node in each batch.
@@ -355,7 +355,7 @@ function _content_migrate_batch_process_migrate_data($field_name, &$context) {
   // from the data in the old table.
 
   $query = db_select($context['sandbox']['old_table'], 'old_table', array('fetch' => PDO::FETCH_ASSOC));
-    
+
   // We need new columns for bundle name, entity type, and language.
   // See the debate going on at http://drupal.org/node/1164852.
   // Reverting back to setting all nodes as untranslated.
@@ -363,21 +363,21 @@ function _content_migrate_batch_process_migrate_data($field_name, &$context) {
   if ($field['translatable']) {
     //$language = $node['language'];
   }
-  $query->addExpression("'". $node['type'] ."'", 'bundle');
+  $query->addExpression("'" . $node['type'] . "'", 'bundle');
   $query->addExpression("'node'", 'entity_type');
-  $query->addExpression("'". $language ."'", 'language');
-    
+  $query->addExpression("'" . $language . "'", 'language');
+
   // There are new names for what were the nid and vid columns.
   $query->addField('old_table', 'nid', 'entity_id');
   $query->addField('old_table', 'vid', 'revision_id');
-    
+
   // Add the field columns to the select query.
-  // Use the new column names as aliases in case the 
+  // Use the new column names as aliases in case the
   // name changed, hopefully none did.
   foreach ($context['sandbox']['old_cols'] as $column_name => $db_column_name) {
     $query->addField('old_table', $db_column_name, $context['sandbox']['new_cols'][$column_name]);
   }
-    
+
   // Add delta, or construct it if missing.
   if ($context['sandbox']['add_delta']) {
     $query->addField('old_table', 'delta', 'delta');
@@ -389,7 +389,7 @@ function _content_migrate_batch_process_migrate_data($field_name, &$context) {
   $result = $query->execute();
 
   foreach ($result as $record) {
-  
+
     // Let modules alter this before the insert.
     drupal_alter('content_migrate_data_record', $record, $field, $instance);
 
diff --git a/modules/content_migrate/includes/content_migrate.drush.inc b/modules/content_migrate/includes/content_migrate.drush.inc
index 45b3f6a..3181576 100644
--- a/modules/content_migrate/includes/content_migrate.drush.inc
+++ b/modules/content_migrate/includes/content_migrate.drush.inc
@@ -1,12 +1,12 @@
 <?php
 
 /**
- * @file content_migrate.drush.inc
- * Drush commands for content_migrate,
+ * @file
+ * Drush commands for content_migrate.
  */
 
 /**
- * Implementation of hook_drush_help().
+ * Implements hook_drush_help().
  */
 function content_migrate_drush_help($section) {
   switch ($section) {
@@ -23,9 +23,8 @@ function content_migrate_drush_help($section) {
   }
 }
 
-
 /**
- * Implementation of hook_drush_command().
+ * Implements hook_drush_command().
  */
 function content_migrate_drush_command() {
   $items['content-migrate-status'] = array(
@@ -87,7 +86,7 @@ function drush_content_migrate_fields() {
     return drush_set_error('CONTENT_MIGRATE_NOTHING_TO_DO', dt('No fields to migrate.'));
   }
   drush_log(dt('The following fields will be migrated: !fields', array('!fields' => implode(', ', $field_names))), 'status');
-  if(!drush_confirm(dt('Do you really want to continue?'))) {
+  if (!drush_confirm(dt('Do you really want to continue?'))) {
     return drush_user_abort();
   }
 
@@ -137,10 +136,10 @@ function drush_content_migrate_rollback() {
   }
   drush_log(dt('The following fields will be rolled back: !fields', array('!fields' => implode(', ', $field_names))), 'status');
   drush_log(dt('Rolling fields back will completely destroy the new field tables. This operation cannot be undone!'), 'warning');
-  if(!drush_confirm(dt('Do you really want to continue?'))) {
+  if (!drush_confirm(dt('Do you really want to continue?'))) {
     return drush_user_abort();
   }
-  
+
   content_migrate_rollback($field_names);
   // Print messages here, so we can give our status at the end.
   // TODO: make an API function for this in Drush.
@@ -162,5 +161,5 @@ function drush_content_migrate_get_fields($requests = array(), $status = 'availa
       }
     }
   }
-  return $field_names;  
-}
\ No newline at end of file
+  return $field_names;
+}
diff --git a/modules/content_migrate/includes/content_migrate.values.inc b/modules/content_migrate/includes/content_migrate.values.inc
index 72fbc68..1a383b3 100644
--- a/modules/content_migrate/includes/content_migrate.values.inc
+++ b/modules/content_migrate/includes/content_migrate.values.inc
@@ -1,14 +1,15 @@
 <?php
+
 /**
- * @file content_migrate.values.inc
+ * @file
  * Code to produce D7-style field and instance values from the data in D6 tables.
  * Separated into a separate file for efficiency.
  */
+
 /**
- * Create a D7-style field array from data stored
- * in the D6 content field tables.
+ * Create a D7-style field array from data stored in the D6 content field tables.
  *
- * @param $field_name 
+ * @param $field_name
  *   Optionally request only a specific field name.
  */
 function _content_migrate_get_field_values($field_name = NULL) {
@@ -25,10 +26,10 @@ function _content_migrate_get_field_values($field_name = NULL) {
       ->fields('nf')
       ->orderBy('type_name')
       ->execute();
-    
+
     foreach ($result as $row) {
       $field_value = $row;
-    
+
       $query2 = db_select('content_node_field_instance', 'nfi', array('fetch' => PDO::FETCH_ASSOC));
       $result2 = $query2
         ->fields('nfi')
@@ -42,7 +43,7 @@ function _content_migrate_get_field_values($field_name = NULL) {
       }
       $widget_types = array_unique($widget_types);
       if (count($widget_types) > 1) {
-        $field_value['messages'][] = '<span class="error">' . t("Caution: The '@field' field is a shared field that uses different widgets. The '@widget' widget is sometimes used to determine the destination field type for the new field. The migration may not work correctly if other widgets used by this shared field would create different results.", array('@field' => $field_value['field_name'], '@widget' => $row['widget_type'])) .'</span>';
+        $field_value['messages'][] = '<span class="error">' . t("Caution: The '@field' field is a shared field that uses different widgets. The '@widget' widget is sometimes used to determine the destination field type for the new field. The migration may not work correctly if other widgets used by this shared field would create different results.", array('@field' => $field_value['field_name'], '@widget' => $row['widget_type'])) . '</span>';
       }
 
       // Pass instance settings to the field, in case they are needed.
@@ -58,10 +59,10 @@ function _content_migrate_get_field_values($field_name = NULL) {
         ),
       );
       unset($field_value['widget_type'], $field_value['widget_module'], $field_value['widget_settings'], $field_value['display_settings']);
-      
+
       // All Drupal 6 fields were attached to nodes.
       $field_value['entity_types'] = array();
-      
+
       if ($field_value['multiple'] == 0) {
         $field_value['cardinality'] = 1;
       }
@@ -71,25 +72,25 @@ function _content_migrate_get_field_values($field_name = NULL) {
       else {
         $field_value['cardinality'] = $field_value['multiple'];
       }
-      
+
       // We need column information for the old table.
       $field_value['columns'] = unserialize($field_value['db_columns']);
-    
+
       // Field settings.
       $default_settings = field_info_field_settings($row['type']);
       $field_value['settings'] = array_merge($default_settings, unserialize($field_value['global_settings']));
-    
+
       unset($field_value['multiple'], $field_value['global_settings'], $field_value['required'], $field_value['db_columns']);
-            
+
       // Let modules change these values.
       drupal_alter('content_migrate_field', $field_value, $instance_value);
-      
+
       unset($field_value['allowed_values_php']);
-      
+
       // We retain $field_value['columns'] and $field_value['db_storage']
-      // even though they are not used or different in D7 
+      // even though they are not used or different in D7
       // so we can find the old table information.
-      
+
       // Add field definiation to $field_values array.
       $field_values[$field_value['field_name']] = $field_value;
     }
@@ -117,9 +118,9 @@ function _content_migrate_get_instance_values($bundle = NULL, $field_name = NULL
     $allowed_fields = field_info_field_types();
     $allowed_widgets = field_info_widget_types();
     $allowed_formatters = field_info_formatter_types();
-  
+
     $instance_values = array();
-  
+
     $query = db_select('content_node_field_instance', 'ni', array('fetch' => PDO::FETCH_ASSOC));
     $node_field_alias = $query->join('content_node_field', 'nf', 'ni.field_name=nf.field_name');
     $result = $query
@@ -127,8 +128,8 @@ function _content_migrate_get_instance_values($bundle = NULL, $field_name = NULL
       ->fields($node_field_alias, array('type', 'module', 'required', 'global_settings'))
       ->orderBy('label', 'ASC')
       ->execute();
-    
-    foreach ($result as $row) { 
+
+    foreach ($result as $row) {
       $instance_value = $row;
       $instance_value['messages'] = array();
 
@@ -139,11 +140,11 @@ function _content_migrate_get_instance_values($bundle = NULL, $field_name = NULL
         'module' => $instance_value['module'],
         'settings' => unserialize($instance_value['global_settings']),
       );
-      unset($instance_value['type'], $instance_value['module'], $instance_value['required'], $instance_value['global_settings']);      
+      unset($instance_value['type'], $instance_value['module'], $instance_value['required'], $instance_value['global_settings']);
 
       // All Drupal 6 instances were attached to nodes.
       $instance_value['entity_type'] = 'node';
-    
+
       // Unserialize arrays.
       foreach (array('widget_settings', 'display_settings', 'global_settings') as $key) {
         $instance_value[$key] = (!empty($instance_value[$key])) ? (array) unserialize($instance_value[$key]) : array();
@@ -152,8 +153,8 @@ function _content_migrate_get_instance_values($bundle = NULL, $field_name = NULL
       // Build instance values.
       $instance_value['bundle'] = $instance_value['type_name'];
       $instance_value['default_value'] = !empty($instance_value['widget_settings']['default_value']) ? $instance_value['widget_settings']['default_value'] : '';
-      
-      // Core does not support this, but retain it so 
+
+      // Core does not support this, but retain it so
       // another module can do something with it
       // in drupal_alter.
       if (isset($instance_value['widget_settings']['default_value_php'])) {
@@ -162,16 +163,16 @@ function _content_migrate_get_instance_values($bundle = NULL, $field_name = NULL
 
       // Build widget values.
       $instance_value['widget'] = array();
-      
+
       // TODO Some widget types have been renamed in D7.
       $instance_value['widget']['type']     = $instance_value['widget_type'];
       $instance_value['widget']['weight']   = $instance_value['weight'];
       $instance_value['widget']['module']   = $instance_value['widget_module'];
       $instance_value['widget']['active']   = $instance_value['widget_active'];
-      
+
       $default_settings = field_info_widget_settings($field_value['type']);
       $instance_value['widget']['settings'] = array_merge($default_settings, $instance_value['widget_settings']);
-    
+
       // Build display values.
       $instance_value['display'] = array();
       $label = $instance_value['display_settings']['label'];
@@ -185,7 +186,7 @@ function _content_migrate_get_instance_values($bundle = NULL, $field_name = NULL
           continue;
         }
         $instance_value['display'][$context]['label'] = $label['format'];
-        
+
         // The format used in D6 may not match the formatter in D7.
         // Fix it using drupal_alter().
         $instance_value['display'][$context]['type'] = $settings['format'];
@@ -197,13 +198,13 @@ function _content_migrate_get_instance_values($bundle = NULL, $field_name = NULL
 
       // Unset unneeded values.
       unset($instance_value['type_name'], $instance_value['global_settings'], $instance_value['widget_settings'], $instance_value['display_settings'], $instance_value['widget_module'], $instance_value['widget_active']);
-      
+
       // Unset some values that don't exist on all fields.
       if (isset($instance_value['widget']['settings']['default_value'])) unset($instance_value['widget']['settings']['default_value']);
 
       // Let modules change these values.
       drupal_alter('content_migrate_instance', $instance_value, $field_value);
-      
+
       // Get rid of this value once CCK or some other module has handled it.
       if (isset($instance_value['widget']['settings']['default_value_php'])) unset($instance_value['widget']['settings']['default_value_php']);
 
@@ -244,7 +245,7 @@ function _content_migrate_get_instance_values($bundle = NULL, $field_name = NULL
       // Add instance information to instance array.
       $instance_values['instances'][$instance_value['bundle']][$instance_value['field_name']] = $instance_value;
       $instance_values['fields'][$instance_value['field_name']][$instance_value['bundle']] = $instance_value;
-      
+
     }
   }
   if (!empty($bundle)) {
@@ -259,4 +260,4 @@ function _content_migrate_get_instance_values($bundle = NULL, $field_name = NULL
     return $instance_values['fields'][$field_name];
   }
   return $instance_values;
-}
\ No newline at end of file
+}
diff --git a/modules/content_migrate/modules/content_migrate.filefield.inc b/modules/content_migrate/modules/content_migrate.filefield.inc
index 0c2c000..6124e2a 100644
--- a/modules/content_migrate/modules/content_migrate.filefield.inc
+++ b/modules/content_migrate/modules/content_migrate.filefield.inc
@@ -1,13 +1,16 @@
 <?php
+
 /**
- * @file content_migrate.filefield.inc
- * Code to implement hook_content_migrate_field_alter, content_migrate_instance_alter() and content_migrate_data_record_alter()
- * on behalf of the former filefield and imagefield modules, moved into a separate file for efficiency.
+ * @file
+ * Code to implement hook_content_migrate_field_alter(),
+ * content_migrate_instance_alter() and content_migrate_data_record_alter() on
+ * behalf of the former filefield and imagefield modules, moved into a separate
+ * file for efficiency.
  */
 
 /**
  * Implements hook_content_migrate_field_alter().
- * 
+ *
  * Use this to tweak the conversion of field settings
  * from the D6 style to the D7 style for specific
  * situations not handled by basic conversion,
@@ -15,7 +18,8 @@
  */
 function content_migrate_filefield_field_alter(&$field_value, $instance_value) {
 
-  // There are a bunch of custom imagefield widgets. If they at least start the widget name with 'imagefield' this will work.
+  // There are a bunch of custom imagefield widgets. If they at least start the
+  // widget name with 'imagefield' this will work.
   if (substr($instance_value['widget']['type'], 0, 10) == 'imagefield') {
     // Module names and types changed.
     $field_value['messages'][] = t("Changed field type: The '@field' field type will be changed from '@type' to 'image'.", array('@type' => $field_value['type'], '@field' => $field_value['field_name'], '@widget' => $instance_value['widget']['type']));
@@ -24,7 +28,8 @@ function content_migrate_filefield_field_alter(&$field_value, $instance_value) {
     // default_image is now a field setting.
     $field_value['settings']['default_image'] = $instance_value['widget']['settings']['default_image'];
   }
-  // There are a bunch of custom filefield widgets. If they at least start the widget name with 'filefield' this will work.
+  // There are a bunch of custom filefield widgets. If they at least start the
+  // widget name with 'filefield' this will work.
   if (substr($instance_value['widget']['type'], 0, 9) == 'filefield') {
     // Module names and types changed.
     $field_value['messages'][] = t("Changed field type: The '@field' field type will be changed from '@type' to 'file'.", array('@type' => $field_value['type'], '@field' => $field_value['field_name'], '@widget' => $instance_value['widget']['type']));
@@ -40,7 +45,7 @@ function content_migrate_filefield_field_alter(&$field_value, $instance_value) {
 
 /**
  * Implements hook_content_migrate_instance_alter().
- * 
+ *
  * Use this to tweak the conversion of instance or widget settings
  * from the D6 style to the D7 style for specific
  * situations not handled by basic conversion, as when
@@ -87,7 +92,7 @@ function content_migrate_filefield_instance_alter(&$instance_value, $field_value
     foreach ($instance_value['display'] as $context => $settings) {
       // Note; the 'path_plain' D6 formatter has disappeared.
       if (in_array($settings['type'], array('default', 'url_plain'))) {
-        $instance_value['display'][$context]['type'] = 'file_'. $settings['type'];
+        $instance_value['display'][$context]['type'] = 'file_' . $settings['type'];
         $instance_value['display'][$context]['moduke'] = 'file';
       }
     }
@@ -95,13 +100,14 @@ function content_migrate_filefield_instance_alter(&$instance_value, $field_value
 
   // Translate the original imagefield and fielfield widgets.
   switch ($instance_value['widget']['module']) {
-  
+
     case 'imagefield':
       // Module names and types changed.
       $instance_value['widget']['module'] = 'image';
       $instance_value['widget']['type'] = 'image';
 
-      // Most settings became instance settings instead of widget settings, with a couple name changes.
+      // Most settings became instance settings instead of widget settings, with
+      // a couple name changes.
       $instance_value['settings']['file_directory'] = isset($instance_value['widget']['settings']['file_path']) ? $instance_value['widget']['settings']['file_path'] : '';
       unset($instance_value['widget']['settings']['file_path']);
       $instance_value['settings']['max_filesize'] = isset($instance_value['widget']['settings']['max_filesize_per_file']) ? $instance_value['widget']['settings']['max_filesize_per_file'] : 0;
@@ -128,7 +134,7 @@ function content_migrate_filefield_instance_alter(&$instance_value, $field_value
       unset($instance_value['widget']['settings']['alt']);
       unset($instance_value['widget']['settings']['max_filesize_per_node']);
       unset($instance_value['widget']['settings']['title_type']);
-               
+
       // default_image is now a field setting.
       unset($instance_value['widget']['settings']['default_image']);
       break;
@@ -162,7 +168,7 @@ function content_migrate_filefield_instance_alter(&$instance_value, $field_value
  */
 function content_migrate_filefield_data_record_alter(&$record, $field, $instance) {
 
-  switch($field['type']) {
+  switch ($field['type']) {
     case 'image':
       // Map D6 imagefield field columns to D7 image field columns.
       if (!empty($record[$field['field_name'] . '_data']) && ($data = unserialize($record[$field['field_name'] . '_data']))) {
@@ -189,8 +195,9 @@ function content_migrate_filefield_data_record_alter(&$record, $field, $instance
         unset($record[$field['field_name'] . '_list']);
       }
 
-      // Copies imagefield data from the old 'files' table into 'files_managed' and sets file_usage
-      // Mostly copied from system_update_7061, which does the same for the D6 core 'upload' module
+      // Copies imagefield data from the old 'files' table into 'files_managed'
+      // and sets file_usage. Mostly copied from system_update_7061, which does
+      // the same for the D6 core 'upload' module.
 
       $nid = $record['entity_id'];
       $fid = $record[$field['field_name'] . '_fid'];
@@ -232,4 +239,4 @@ function content_migrate_filefield_data_record_alter(&$record, $field, $instance
       file_usage_add($file, 'file', 'node', $nid);
       break;
   }
-}
\ No newline at end of file
+}
diff --git a/modules/content_migrate/modules/content_migrate.number.inc b/modules/content_migrate/modules/content_migrate.number.inc
index 0115f70..060890f 100644
--- a/modules/content_migrate/modules/content_migrate.number.inc
+++ b/modules/content_migrate/modules/content_migrate.number.inc
@@ -1,13 +1,15 @@
 <?php
+
 /**
- * @file content_migrate.number.inc
- * Code to implement hook_content_migrate_field_alter, content_migrate_instance_alter() and content_migrate_data_record_alter()
- * on behalf of the former number module, moved into a separate file for efficiency.
+ * @file
+ * Code to implement hook_content_migrate_field_alter(),
+ * content_migrate_instance_alter() and content_migrate_data_record_alter() on
+ * behalf of the former number module, moved into a separate file for efficiency.
  */
 
 /**
  * Implements hook_content_migrate_field_alter().
- * 
+ *
  * Use this to tweak the conversion of field settings
  * from the D6 style to the D7 style for specific
  * situations not handled by basic conversion,
@@ -15,12 +17,12 @@
  */
 function content_migrate_number_field_alter(&$field_value, $instance_value) {
   switch ($field_value['type']) {
-   
+
     case 'number_integer':
     case 'number_decimal':
-    case 'number_float':  
-      
-      // Changed name of setting from 'decimal' to 
+    case 'number_float':
+
+      // Changed name of setting from 'decimal' to
       // 'decimal_separator'.
       if (isset($field_value['settings']['decimal'])) {
         $field_value['settings']['decimal_separator'] = $field_value['settings']['decimal'];
@@ -30,7 +32,7 @@ function content_migrate_number_field_alter(&$field_value, $instance_value) {
       if ($field_value['type'] == 'number_float') {
         $field_value['settings']['decimal_separator'] = '.';
       }
-      
+
       // Number fields using optionwidgets are
       // now List fields.
       switch ($instance_value['widget']['type']) {
@@ -85,10 +87,10 @@ function content_migrate_number_instance_alter(&$instance_value, $field_value) {
         'us_2' => 'number_decimal',
         'be_0' => 'number_integer',
         'be_1' => 'number_decimal',
-        'be_2' => 'number_decimal',        
+        'be_2' => 'number_decimal',
         'fr_0' => 'number_integer',
         'fr_1' => 'number_decimal',
-        'fr_2' => 'number_decimal',      
+        'fr_2' => 'number_decimal',
       );
       $new_settings = array(
         'default' => array(
@@ -102,7 +104,7 @@ function content_migrate_number_instance_alter(&$instance_value, $field_value) {
           'decimal_separator' => '.',
           'scale' => 0,
           'prefix_suffix' => TRUE,
-        ),        
+        ),
         'us_1' => array(
           'thousand_separator' => ',',
           'decimal_separator' => '.',
@@ -114,13 +116,13 @@ function content_migrate_number_instance_alter(&$instance_value, $field_value) {
           'decimal_separator' => '.',
           'scale' => 2,
           'prefix_suffix' => TRUE,
-        ),  
+        ),
         'be_0' => array(
           'thousand_separator' => '',
           'decimal_separator' => ',',
           'scale' => 0,
           'prefix_suffix' => TRUE,
-        ),        
+        ),
         'be_1' => array(
           'thousand_separator' => '.',
           'decimal_separator' => ',',
@@ -132,13 +134,13 @@ function content_migrate_number_instance_alter(&$instance_value, $field_value) {
           'decimal_separator' => ',',
           'scale' => 2,
           'prefix_suffix' => TRUE,
-        ),         
+        ),
         'fr_0' => array(
           'thousand_separator' => '',
           'decimal_separator' => ', ',
           'scale' => 0,
           'prefix_suffix' => TRUE,
-        ),        
+        ),
         'fr_1' => array(
           'thousand_separator' => ' ',
           'decimal_separator' => ', ',
diff --git a/modules/content_migrate/modules/content_migrate.optionwidgets.inc b/modules/content_migrate/modules/content_migrate.optionwidgets.inc
index d9a0db3..a1515db 100644
--- a/modules/content_migrate/modules/content_migrate.optionwidgets.inc
+++ b/modules/content_migrate/modules/content_migrate.optionwidgets.inc
@@ -1,13 +1,16 @@
 <?php
+
 /**
- * @file content_migrate.optionwidgets.inc
- * Code to implement hook_content_migrate_field_alter, content_migrate_instance_alter() and content_migrate_data_record_alter()
- * on behalf of the former optionwidgets module, moved into a separate file for efficiency.
+ * @file
+ * Code to implement hook_content_migrate_field_alter(),
+ * content_migrate_instance_alter() and content_migrate_data_record_alter() on
+ * behalf of the former optionwidgets module, moved into a separate file for
+ * efficiency.
  */
 
 /**
  * Implements hook_content_migrate_instance_alter().
- * 
+ *
  * Use this to tweak the conversion of instance or widget settings
  * from the D6 style to the D7 style for specific
  * situations not handled by basic conversion, as when
@@ -28,5 +31,5 @@ function content_migrate_optionwidgets_instance_alter(&$instance_value, $field_v
       $instance_value['widget']['type'] = strtr($instance_value['widget']['type'], $replace);
       break;
   }
- 
+
 }
diff --git a/modules/content_migrate/modules/content_migrate.text.inc b/modules/content_migrate/modules/content_migrate.text.inc
index 00c5b82..759c365 100644
--- a/modules/content_migrate/modules/content_migrate.text.inc
+++ b/modules/content_migrate/modules/content_migrate.text.inc
@@ -1,13 +1,15 @@
 <?php
+
 /**
- * @file content_migrate.text.inc
- * Code to implement hook_content_migrate_field_alter, content_migrate_instance_alter() and content_migrate_data_record_alter()
- * on behalf of the former text module, moved into a separate file for efficiency.
+ * @file
+ * Code to implement hook_content_migrate_field_alter(),
+ * content_migrate_instance_alter() and content_migrate_data_record_alter() on
+ * behalf of the former text module, moved into a separate file for efficiency.
  */
 
 /**
  * Implements hook_content_migrate_field_alter().
- * 
+ *
  * Use this to tweak the conversion of field settings
  * from the D6 style to the D7 style for specific
  * situations not handled by basic conversion,
@@ -17,7 +19,7 @@ function content_migrate_text_field_alter(&$field_value, $instance_value) {
   switch ($field_value['type']) {
     case 'text':
 
-      // Text fields are translatable.      
+      // Text fields are translatable.
       // See the debate going on at http://drupal.org/node/1164852.
       // Reverting back to setting all nodes as untranslated.
       //$field_value['translatable'] = TRUE;
@@ -47,17 +49,16 @@ function content_migrate_text_field_alter(&$field_value, $instance_value) {
           }
           break;
 
-        // The max_length field can no longer be empty 
-        // or it will create a SQL error. There also have been
-        // changes to the way text fields and widgets are configured.
-        // In D6, if you left max_length empty CCK would create a long_text field,
-        // even if you were using a textfield widget. In D7 it is not
-        // possible to have a long_text field with a textfield widget.
-        // We are now forced to figure out what to do with this data.
-    
+        // The max_length field can no longer be empty or it will create a SQL
+        // error. There also have been changes to the way text fields and
+        // widgets are configured. In D6, if you left max_length empty CCK would
+        // create a long_text field, even if you were using a textfield widget.
+        // In D7 it is not possible to have a long_text field with a textfield
+        // widget. We are now forced to figure out what to do with this data.
+
         // It is so easy to leave the length unset that it is likely that any
-        // any field with a missing length that uses a textfield widget 
-        // was intended to be a varchar field, so we will make that change.    
+        // field with a missing length that uses a textfield widget was intended
+        // to be a varchar field, so we will make that change.
         case 'text_textarea':
           if (empty($field_value['settings']['max_length'])) {
             $field_value['type'] = 'text_long';
@@ -103,13 +104,13 @@ function content_migrate_text_instance_alter(&$instance_value, $field_value) {
   switch ($field_value['module']) {
     case 'text':
 
-      // The text processing setting got switched from a field setting to an instance setting.
+      // The text processing setting got switched from a field setting to an
+      // instance setting.
       $instance_value['settings']['text_processing'] = $field_value['settings']['text_processing'];
 
-      // The formatter names changed, all are prefixed
-      // with 'text_'.
+      // The formatter names changed, all are prefixed with 'text_'.
       foreach ($instance_value['display'] as $context => $settings) {
-        $instance_value['display'][$context]['type'] = 'text_'. $settings['type'];
+        $instance_value['display'][$context]['type'] = 'text_' . $settings['type'];
       }
       break;
   }
@@ -128,14 +129,15 @@ function content_migrate_text_data_record_alter(&$record, $field, $instance) {
     $existing_formats = db_query("SELECT format FROM {filter_format}")->fetchCol();
   }
 
-  switch($field_value['module']) {
+  switch ($field_value['module']) {
     case 'text':
       if (!empty($instance['settings']['text_processing'])) {
-        // Adapted from node_update_7006(), to adjust the filter format values 
-        // from the old numeric to the new text formats. Ensure we have a valid value.
+        // Adapted from node_update_7006(), to adjust the filter format values
+        // from the old numeric to the new text formats. Ensure we have a valid
+        // value.
         if (!in_array($record[$field['field_name'] . '_format'], $existing_formats)) {
           $record[$field['field_name'] . '_format'] = variable_get('filter_default_format', 1);
         }
       }
   }
-}
\ No newline at end of file
+}
diff --git a/modules/content_migrate/tests/content_migrate.test b/modules/content_migrate/tests/content_migrate.test
index 40e657b..0e024e5 100644
--- a/modules/content_migrate/tests/content_migrate.test
+++ b/modules/content_migrate/tests/content_migrate.test
@@ -1,6 +1,7 @@
 <?php
 /**
- * @file Content Migrate Test Cases
+ * @file
+ * Content Migrate Test Cases.
  */
 
 /**
@@ -12,8 +13,8 @@ class ContentMigrateTestCase extends DrupalWebTestCase {
   public $content_type;
 
   /**
-   * In the base setUp() method we need to create a content type, and 
-   * Drupal 6 tables relating to CCK: content_node_field, 
+   * In the base setUp() method we need to create a content type, and
+   * Drupal 6 tables relating to CCK: content_node_field,
    * content_node_field_instance, and content_type_TYPENAME. It is up
    * to a child class to make the proper inserts into these tables.
    */
@@ -206,7 +207,7 @@ class ContentMigrateTestCase extends DrupalWebTestCase {
         }
       }
       db_add_field($table, $field['field_name'] . '_' . $key, $db_columns);
-      $this->assertTrue(db_field_exists($table, $field['field_name'] . '_' . $key), t('Successfully added field %field to table %table.', array('%field' => $field['field_name'], '%table' => $table))); 
+      $this->assertTrue(db_field_exists($table, $field['field_name'] . '_' . $key), t('Successfully added field %field to table %table.', array('%field' => $field['field_name'], '%table' => $table)));
     }
 
   }
@@ -229,7 +230,7 @@ class ContentMigrateTestCase extends DrupalWebTestCase {
       'nid' => $node->nid,
     );
     foreach ($data as $key => $value) {
-      $fields[$field['field_name'] .'_'. $key] = $value;
+      $fields[$field['field_name'] . '_' . $key] = $value;
     }
 
     if ($field['multiple'] <> 0 || $shared) {
@@ -278,10 +279,10 @@ class ContentMigrateTextTestCase extends ContentMigrateTestCase {
     $field['global_settings']['allowed_values_php'] = '';
     $field['db_columns']['value']['type'] = 'text';
     $field['db_columns']['value']['size'] = 'big';
-    $field['db_columns']['value']['not null'] = false;
-    $field['db_columns']['value']['sortable'] = true;
-    $field['db_columns']['value']['views'] = true;
- 
+    $field['db_columns']['value']['not null'] = FALSE;
+    $field['db_columns']['value']['sortable'] = TRUE;
+    $field['db_columns']['value']['views'] = TRUE;
+
     if ($multiple <> 0) {
       $field['db_storage'] = 0;
     }
@@ -310,7 +311,7 @@ class ContentMigrateTextTestCase extends ContentMigrateTestCase {
 
     // Okay, let's login.
     $this->drupalLogin($this->admin_user);
-    
+
     $id = str_replace('_', '-', $test_field['field_name']);
 
     $this->drupalGet('admin/structure/content_migrate');
@@ -363,7 +364,7 @@ class ContentMigrateTextTestCase extends ContentMigrateTestCase {
     $this->createFieldData($value, $test_field, $test_node, 'content_type_' . $settings['type']);
 
     // Revise the node and the field value.
-    $test_node2 = $this->drupalCreateNode(get_object_vars($test_node));    
+    $test_node2 = $this->drupalCreateNode(get_object_vars($test_node));
     $value2 = array('value' => $this->randomName(10));
     $this->createFieldData($value2, $test_field, $test_node2, 'content_type_' . $settings['type']);
 
@@ -549,10 +550,10 @@ class ContentMigrateListTestCase extends ContentMigrateTestCase {
     $field['global_settings']['allowed_values_php'] = '';
     $field['db_columns']['value']['type'] = 'text';
     $field['db_columns']['value']['size'] = 'big';
-    $field['db_columns']['value']['not null'] = false;
-    $field['db_columns']['value']['sortable'] = true;
-    $field['db_columns']['value']['views'] = true;
- 
+    $field['db_columns']['value']['not null'] = FALSE;
+    $field['db_columns']['value']['sortable'] = TRUE;
+    $field['db_columns']['value']['views'] = TRUE;
+
     if ($multiple <> 0) {
       $field['db_storage'] = 0;
     }
@@ -569,7 +570,7 @@ class ContentMigrateListTestCase extends ContentMigrateTestCase {
       if ($i == 0) {
         $default = array('value' => $val);
       }
-      else if ($i == 2) {
+      elseif ($i == 2) {
         $data = array('value' => $val);
       }
     }
-- 
1.7.3.2

