diff --git a/commerce_stock.api.php b/commerce_stock.api.php
index e0e70f3..3b9178c 100644
--- a/commerce_stock.api.php
+++ b/commerce_stock.api.php
@@ -5,15 +5,16 @@
  * Hooks provided by the Commerce Stock module.
  */
 
-
 /**
+ * Hook cart product level alter.
+ *
  * Allows modules to return a cart product level for a product id before the
  * Commerce Stock module determines it using its default queries.
  *
- * @param $product_id
+ * @param string $product_id
  *   The product_id of the product whose cart quantity should be returned.
  *
- * @return
+ * @return mixed
  *   The cart quantity (if a valid quantity was found), FALSE (if the product
  *   should have no cart product level), or NULL (if the implementation cannot
  *   tell if the product has a cart product level or not).
diff --git a/commerce_stock.install b/commerce_stock.install
index 4ba9ac9..48019a1 100644
--- a/commerce_stock.install
+++ b/commerce_stock.install
@@ -4,4 +4,3 @@
  * @file
  * Install, update and uninstall functions for the commerce_stock module.
  */
-
diff --git a/commerce_stock.module b/commerce_stock.module
index da1d2c5..f0f2fcb 100644
--- a/commerce_stock.module
+++ b/commerce_stock.module
@@ -2,8 +2,10 @@
 
 /**
  * @file
+ * Commerce Stock module.
+ *
  * Provides an rules based api for implementing order quantity
- * and stock validation
+ * and stock validation.
  *
  * This module provides the events to trigger the stock checks and
  * configurable actions to take if the check fails "out of stock:
@@ -55,7 +57,6 @@ function commerce_stock_permission() {
   );
 }
 
-
 /**
  * Implements hook_form_alter().
  *
@@ -160,6 +161,7 @@ function commerce_stock_cart_state_validate_options($form_id, &$form, &$form_sta
   $form['#attributes']['class']['stock'] = 'in-stock';
 
   // Set global form for stock actions.
+  // @codingStandardsIgnoreLine
   global $stock_cart_check_data;
   $stock_cart_check_data = array(
     'form' => &$form,
@@ -167,7 +169,7 @@ function commerce_stock_cart_state_validate_options($form_id, &$form, &$form_sta
 
   // Integration with rules_form_alter().
   if (module_exists('rules_form_alter')) {
-    // make sure rules_form_alter actions work from the stock event.
+    // Make sure rules_form_alter actions work from the stock event.
     $rules_form_alter_data = &drupal_static('rules_form_alter_data', array());
     // Set the form data that will be used by rules.
     $rules_form_alter_data['id'] = $form_id;
@@ -281,6 +283,7 @@ function commerce_stock_cart_state_validate($form_id, &$form, &$form_state) {
   $form['submit']['#disabled'] = FALSE;
   $form['#attributes']['class']['stock'] = 'in-stock';
 
+  // @codingStandardsIgnoreLine
   global $stock_cart_check_data;
   $stock_cart_check_data = array(
     'form' => &$form,
@@ -288,7 +291,7 @@ function commerce_stock_cart_state_validate($form_id, &$form, &$form_state) {
 
   // Integration with rules_form_alter().
   if (module_exists('rules_form_alter')) {
-    // make sure rules_form_alter actions work from the stock event.
+    // Make sure rules_form_alter actions work from the stock event.
     $rules_form_alter_data = &drupal_static('rules_form_alter_data', array());
     // Set the form data that will be used by rules.
     $rules_form_alter_data['id'] = $form_id;
@@ -311,7 +314,6 @@ function commerce_stock_token_info() {
   return $info;
 }
 
-
 /**
  * Implements hook_tokens().
  */
@@ -344,7 +346,8 @@ function commerce_stock_check_cart_product_level($product_id) {
   }
 
   // First let other modules attempt to provide a valid quantity for the given
-  // product id. Instead of invoking hook_commerce_stock_check_cart_product_level()
+  // product id. Instead of invoking
+  // hook_commerce_stock_check_cart_product_level()
   // directly, we invoke it in each module implementing the hook and return the
   // first valid quantity returned (if any).
   foreach (module_implements('commerce_stock_check_cart_product_level') as $module) {
@@ -376,7 +379,7 @@ function commerce_stock_check_cart_product_level($product_id) {
     // Cycle throw each line item ID.
     foreach ($order_wrapper->commerce_line_items as $index => $line_item_wrapper) {
       if (in_array($line_item_wrapper->getBundle(), commerce_product_line_item_types())) {
-        if ($line_item_wrapper->commerce_product->product_id->value() == $product_id){
+        if ($line_item_wrapper->commerce_product->product_id->value() == $product_id) {
           $cart_qty += $line_item_wrapper->quantity->value();
         }
       }
@@ -393,11 +396,12 @@ function commerce_stock_check_cart_product_level($product_id) {
  */
 function commerce_stock_check_product_rule($product, &$qty, $qty_ordered, &$stock_state, &$message) {
   // Set defaults to the global stock check array.
+  // @codingStandardsIgnoreLine
   global $stock_check_data;
   $stock_check_data = array(
     'state' => '0',
     'message' => '',
-    'qty' => $qty
+    'qty' => $qty,
   );
 
   // Invoke the stock check event.
@@ -418,11 +422,12 @@ function commerce_stock_check_product_rule($product, &$qty, $qty_ordered, &$stoc
  */
 function commerce_stock_check_product_checkout_rule($product, $qty_ordered, &$stock_state, &$message) {
   // Set defaults to the global stock check array.
+  // @codingStandardsIgnoreLine
   global $stock_check_data;
   $stock_check_data = array(
     'state' => '0',
     'message' => '',
-    'qty' => $qty_ordered
+    'qty' => $qty_ordered,
   );
 
   // Invoke the stock check event.
@@ -522,7 +527,8 @@ function commerce_stock_test_cart_action($form, &$form_state) {
   $product_id = $form_state['values']['product_id'];
   $product = commerce_product_load($product_id);
   drupal_set_message(t('%title was not added to your cart as this is a test action only.', array('%title' => $product->title)), 'error');
-  // Ensure that page redirects back to its original URL without losing query parameters, such as pagers.
+  // Ensure that page redirects back to its original URL without losing query
+  // parameters, such as pagers.
   // @todo Remove when http://drupal.org/node/171267 is fixed.
   $form_state['redirect'] = array(current_path(), array('query' => drupal_get_query_parameters()));
 }
diff --git a/commerce_stock.rules.inc b/commerce_stock.rules.inc
index 8fdcdc2..89fe191 100644
--- a/commerce_stock.rules.inc
+++ b/commerce_stock.rules.inc
@@ -114,7 +114,7 @@ function commerce_stock_rules_order_has_out_of_stock($order) {
 }
 
 /**
- * Implementation of hook_rules_action_info().
+ * Implements hook_rules_action_info().
  */
 function commerce_stock_rules_action_info() {
   $actions = array();
@@ -285,7 +285,7 @@ function commerce_stock_rules_access() {
 /**
  * Rules action: updates an order's status.
  *
- * updates an order's status to the default status of the given order state.
+ * Updates an order's status to the default status of the given order state.
  */
 function commerce_stock_rules_add_to_cart_set_state($stock_action, $message, $approved_quantity) {
   if ($approved_quantity < 0) {
@@ -295,6 +295,7 @@ function commerce_stock_rules_add_to_cart_set_state($stock_action, $message, $ap
     $stock_action = 1;
   }
   // Set the global stock check array.
+  // @codingStandardsIgnoreLine
   global $stock_check_data;
   $stock_check_data['state'] = $stock_action;
   $stock_check_data['message'] = $message;
@@ -302,10 +303,12 @@ function commerce_stock_rules_add_to_cart_set_state($stock_action, $message, $ap
 }
 
 /**
- * Rules action:
+ * Rules action:.
+ *
  * @todo: Define this function.
  */
 function commerce_stock_rules_set_add_to_cart_form_state($disabled, $text, $class_name) {
+  // @codingStandardsIgnoreLine
   global $stock_cart_check_data;
   $stock_cart_check_data['form']['submit']['#value'] = $text;
   $stock_cart_check_data['form']['submit']['#disabled'] = $disabled;
@@ -313,20 +316,32 @@ function commerce_stock_rules_set_add_to_cart_form_state($disabled, $text, $clas
 }
 
 /**
+ * Custom cart form state.
+ *
  * @todo: Define this function.
  */
-function commerce_stock_custom_cart_form_state($hide_qty, $text, $class_name,
-          $action_prefix, $action_suffix, $stock_action, $disabled_cart,
-          $custom_submit, $custom_submit_clear, $custom_validate,
-          $custom_validate_clear, $custom_url, $custom_html) {
+function commerce_stock_custom_cart_form_state($hide_qty,
+ $text,
+ $class_name,
+          $action_prefix,
+ $action_suffix,
+ $stock_action,
+ $disabled_cart,
+          $custom_submit,
+ $custom_submit_clear,
+ $custom_validate,
+          $custom_validate_clear,
+ $custom_url,
+ $custom_html) {
+  // @codingStandardsIgnoreLine
   global $stock_cart_check_data;
 
   // Read form values.
   $form_action = $stock_cart_check_data['form']['#action'];
-  if (isset ($stock_cart_check_data['form']['product_id']['#value'])) {
+  if (isset($stock_cart_check_data['form']['product_id']['#value'])) {
     $prod_id = $stock_cart_check_data['form']['product_id']['#value'];
   }
-  elseif (isset ($stock_cart_check_data['form']['product_id']['#default_value'])) {
+  elseif (isset($stock_cart_check_data['form']['product_id']['#default_value'])) {
     $prod_id = $stock_cart_check_data['form']['product_id']['#default_value'];
   }
 
@@ -400,7 +415,10 @@ function commerce_stock_custom_cart_form_state($hide_qty, $text, $class_name,
 }
 
 /**
- * Rules action: Set the state of the checkout process (called once per an item).
+ * Function to set checkout state.
+ *
+ * Rules action: Set the state of the checkout
+ * process (called once per an item).
  */
 function commerce_stock_rules_set_checkout_state($stock_action, $message, $approved_quantity) {
   if ($approved_quantity < 0) {
@@ -410,6 +428,7 @@ function commerce_stock_rules_set_checkout_state($stock_action, $message, $appro
     $stock_action = 1;
   }
   // Set the global stock check array.
+  // @codingStandardsIgnoreLine
   global $stock_check_data;
   $stock_check_data['state'] = $stock_action;
   $stock_check_data['message'] = $message;
@@ -423,7 +442,8 @@ function commerce_stock_check_state_options_list() {
   return array(
     0 => 'do nothing' ,
     1 => 'block transaction',
-    2 => 'display message only');
+    2 => 'display message only',
+  );
 }
 
 /**
@@ -434,5 +454,6 @@ function commerce_stock_custom_cart_form_state_action_options_list() {
     0 => 'Normal Submit' ,
     1 => 'Custom Submit',
     2 => 'URL Action',
-    3 => 'Custom HTML');
+    3 => 'Custom HTML',
+  );
 }
diff --git a/commerce_stock_ui.info b/commerce_stock_ui.info
index 6d09f27..d004d7b 100644
--- a/commerce_stock_ui.info
+++ b/commerce_stock_ui.info
@@ -5,4 +5,4 @@ dependencies[] = rules
 dependencies[] = commerce
 dependencies[] = commerce_stock
 core = 7.x
-configure = admin/commerce/config/stock
\ No newline at end of file
+configure = admin/commerce/config/stock
diff --git a/commerce_stock_ui.module b/commerce_stock_ui.module
index 61a3b03..e490a95 100644
--- a/commerce_stock_ui.module
+++ b/commerce_stock_ui.module
@@ -84,7 +84,6 @@ function commerce_stock_ui_menu() {
   return $items;
 }
 
-
 /**
  * Implements hook_menu_local_tasks_alter().
  */
@@ -126,7 +125,6 @@ function commerce_stock_ui_menu_local_tasks_alter(&$data, $router_item, $root_pa
   }
 }
 
-
 /**
  * Implements hook_forms().
  *
@@ -179,7 +177,6 @@ function commerce_stock_ui_form_commerce_stock_ui_add_checkout_rule_form_alter(&
   $form['submit']['#suffix'] = l(t('Cancel'), 'admin/commerce/config/stock/validation');
 }
 
-
 /**
  * Implements hook_form_FORM_ID_alter().
  */
diff --git a/includes/commerce_stock.admin.inc b/includes/commerce_stock.admin.inc
index 7e8f7fa..b1cc4f1 100644
--- a/includes/commerce_stock.admin.inc
+++ b/includes/commerce_stock.admin.inc
@@ -83,7 +83,6 @@ function commerce_stock_admin_event_rules() {
   return $content;
 }
 
-
 /**
  * Builds the stock control rules page.
  */
diff --git a/modules/commerce_sdf/commerce_sdf.module b/modules/commerce_sdf/commerce_sdf.module
index e2382dd..9a29460 100644
--- a/modules/commerce_sdf/commerce_sdf.module
+++ b/modules/commerce_sdf/commerce_sdf.module
@@ -47,10 +47,12 @@ function commerce_sdf_field_formatter_settings_summary($field, $instance, $view_
     foreach ($settings['display'] as $row => $seuilstr) {
       $seuil = $seuilstr['seuil'];
       if ($seuil !== '') {
+        // @codingStandardsIgnoreStart
         $summary .= t('Print @message when stock is <= @seuil.', array(
           '@seuil' => $settings['display'][$row]['seuil'],
           '@message' => $settings['display'][$row]['message'],
         )) . "<br />";
+        // @codingStandardsIgnoreEnd
       }
     }
     return $summary;
@@ -87,7 +89,7 @@ function commerce_sdf_field_formatter_settings_form($field, $instance, $view_mod
       </thead>',
     );
 
-    for ($i=0;$i<5;$i++) {
+    for ($i = 0; $i < 5; $i++) {
       $element['display'][$i] = array(
         '#prefix' => '<tr>',
         '#suffix' => '</tr>',
@@ -138,9 +140,11 @@ function commerce_sdf_field_formatter_view($entity_type, $entity, $field, $insta
     if (is_numeric($seuil)) {
       if ($stock > $anc_seuil && $stock <= $seuil) {
         if (isset($seuilstr['classname'])) {
+          // @codingStandardsIgnoreLine
           $element[0]['#markup'] = "<span class='" . $seuilstr['classname'] . "'>" . t($settings['display'][$row]['message'], array("@stock" => $stock)) . "</span>";
         }
         else {
+          // @codingStandardsIgnoreLine
           $element[0]['#markup'] = "<span>" . t($settings['display'][$row]['message'], array("@stock" => $stock)) . "</span>";
         }
         break;
diff --git a/modules/commerce_ss/commerce_ss.info b/modules/commerce_ss/commerce_ss.info
index b9cdd6f..19b4969 100644
--- a/modules/commerce_ss/commerce_ss.info
+++ b/modules/commerce_ss/commerce_ss.info
@@ -9,4 +9,4 @@ dependencies[] = commerce_checkout
 dependencies[] = rules
 dependencies[] = list
 core = 7.x
-configure = admin/commerce/config/stock/ss
\ No newline at end of file
+configure = admin/commerce/config/stock/ss
diff --git a/modules/commerce_ss/commerce_ss.install b/modules/commerce_ss/commerce_ss.install
index 257a79b..89d8624 100644
--- a/modules/commerce_ss/commerce_ss.install
+++ b/modules/commerce_ss/commerce_ss.install
@@ -5,8 +5,6 @@
  * Install, update, and uninstall functions for commerce_ss.
  */
 
-
-
 /**
  * Implements hook_uninstall().
  */
diff --git a/modules/commerce_ss/commerce_ss.module b/modules/commerce_ss/commerce_ss.module
index 6cd7e31..2617f43 100644
--- a/modules/commerce_ss/commerce_ss.module
+++ b/modules/commerce_ss/commerce_ss.module
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Allow commerce products to have stock levels associated with their SKU
+ * Allow commerce products to have stock levels associated with their SKU.
  *
  * Commerce Stock enables Commerce to manage stock for products. Store admins
  * can set the stock levels on a product edit page.
@@ -91,8 +91,6 @@ function commerce_ss_tokens($type, $tokens, array $data = array(), array $option
   return $replacements;
 }
 
-
-
 /**
  * Implements hook_form_ID_alter().
  *
@@ -105,10 +103,10 @@ function commerce_ss_form_commerce_product_ui_product_type_form_alter(&$form, &$
   // Check if stock enabled for the type.
   if (commerce_ss_product_type_enabled($type)) {
     $form['product_type']['decimal_admin'] = array(
-      // Provide a configuration option for decimal stock
+      // Provide a configuration option for decimal stock.
       '#type' => 'checkbox',
       '#title' => t('Allow decimal quantities for stock administration'),
-      '#default_value' => variable_get('commerce_stock_decimal_backend_'.$type, FALSE),
+      '#default_value' => variable_get('commerce_stock_decimal_backend_' . $type, FALSE),
       '#description' => t('Check this box if you want to allow the users to set decimal stock levels on product edit forms.'),
       '#element_validate' => array('commerce_ss_checkbox_validate'),
     );
@@ -124,11 +122,10 @@ function commerce_ss_checkbox_validate($element, &$form_state, $form) {
   // Check if stock enabled for the type.
   if (commerce_ss_product_type_enabled($type)) {
     // Set the configuration option for decimal stock.
-    variable_set('commerce_stock_decimal_backend_' . $type, $form_state['values']['product_type']['decimal_admin'] );
+    variable_set('commerce_stock_decimal_backend_' . $type, $form_state['values']['product_type']['decimal_admin']);
   }
 }
 
-
 /**
  * Implements hook_form_ID_alter().
  *
@@ -139,7 +136,7 @@ function commerce_ss_form_commerce_product_ui_product_form_alter(&$form, &$form_
   $type = $form_state['commerce_product']->type;
   // Check if stock enabled for the type.
   if (commerce_ss_product_type_enabled($type)) {
-    $decimal = variable_get('commerce_stock_decimal_backend_'.$type, FALSE);
+    $decimal = variable_get('commerce_stock_decimal_backend_' . $type, FALSE);
     if (!$decimal) {
       // Get the fields language.
       $language = $form['commerce_stock']['#language'];
@@ -162,7 +159,7 @@ function commerce_ss_inline_entity_form_entity_form_alter(&$entity_form, &$form_
     $type = $entity_form['#bundle'];
     // Check if stock enabled for the type.
     if (commerce_ss_product_type_enabled($type)) {
-      $decimal = variable_get('commerce_stock_decimal_backend_'.$type, FALSE);
+      $decimal = variable_get('commerce_stock_decimal_backend_' . $type, FALSE);
       if (!$decimal) {
         // Get the fields language.
         $language = $entity_form['commerce_stock']['#language'];
@@ -178,7 +175,7 @@ function commerce_ss_inline_entity_form_entity_form_alter(&$entity_form, &$form_
 /**
  * Determines whether stock management is enabled on a product type.
  *
- * @param $type
+ * @param string $type
  *   The product type.
  *
  * @return bool
@@ -192,7 +189,7 @@ function commerce_ss_product_type_enabled($type) {
 /**
  * Determines whether stock management override is enabled on a product type.
  *
- * @param $type
+ * @param string $type
  *   The product type.
  *
  * @return bool
@@ -206,7 +203,7 @@ function commerce_ss_product_type_override_enabled($type) {
 /**
  * Determines whether stock management is enabled for a product.
  *
- * @param $product
+ * @param object $product
  *   The product to check.
  *
  * @return bool
@@ -219,27 +216,30 @@ function commerce_ss_product_enabled($product) {
 /**
  * For a given a line item, determine whether stock management is enabled.
  *
- * @param $line_item
+ * @param array $line_item
  *   The line item to check.
  *
- * @return
+ * @return bool
  *   Boolean: TRUE if stock management is enabled on the product's product type.
  */
 function commerce_ss_line_item_product_enabled($line_item) {
   return commerce_ss_product_type_enabled($line_item->product->type);
 }
 
-
 /**
  * This function makes sure stock is enabled for product.
- * if true is return stock checking is enabled
- * if false stock checking is disabled
+ *
+ * If true is return stock checking is enabled
+ * if false stock checking is disabled.
  *
  * @todo rename function confusing name it's not product that's not disabled
  * its the stock check for the product that's disabled.
  *
- * @param type $product
- * @return boolean
+ * @param mixed $product
+ *   The product object.
+ *
+ * @return bool
+ *   Return bool with flag: $stock_check_enabled.
  */
 function commerce_ss_product_not_disabled_by_override($product) {
   $stock_check_enabled = TRUE;
diff --git a/modules/commerce_ss/commerce_ss.rules.inc b/modules/commerce_ss/commerce_ss.rules.inc
index edfabc3..ef987b6 100644
--- a/modules/commerce_ss/commerce_ss.rules.inc
+++ b/modules/commerce_ss/commerce_ss.rules.inc
@@ -77,11 +77,10 @@ function commerce_ss_rules_action_info() {
   return $actions;
 }
 
-
 /**
  * Subtracts from stock the sold amount in a line item.
  *
- * @param $line_item
+ * @param array $line_item
  *   A line item object.
  */
 function commerce_ss_decrease_by_line_item($line_item) {
@@ -101,14 +100,13 @@ function commerce_ss_decrease_by_line_item($line_item) {
   }
 }
 
-
 /**
  * Adds the sold amount in a line item to stock.
  *
  * Typically used when a line item is removed from an order (as when items are
  * added to and removed from cart).
  *
- * @param $line_item
+ * @param array $line_item
  *   A line item object.
  */
 function commerce_ss_increase_by_line_item($line_item) {
@@ -134,9 +132,9 @@ function commerce_ss_increase_by_line_item($line_item) {
  * A positive number will add to stock, a negative number will remove from
  * stock. Somewhat the equivalent of uc_stock_adjust().
  *
- * @param $product
+ * @param object $product
  *   The product for which to change the stock level.
- * @param $qty
+ * @param int $qty
  *   The quantity to add to the stock level.
  */
 function commerce_ss_stock_adjust($product, $qty) {
@@ -162,10 +160,10 @@ function commerce_ss_stock_adjust($product, $qty) {
 /**
  * Helper function to get product SKU from line item.
  *
- * @param $line_item
+ * @param array $line_item
  *   The cart line item for which to return a product SKU.
  */
 function commerce_ss_line_item_sku($line_item) {
   $line_item_wrapper = entity_metadata_wrapper('commerce_line_item', $line_item);
-  return($line_item_wrapper->commerce_product->sku->value());
+  return ($line_item_wrapper->commerce_product->sku->value());
 }
diff --git a/modules/commerce_ss/commerce_ss.rules_defaults.inc b/modules/commerce_ss/commerce_ss.rules_defaults.inc
index f982da1..4c7d672 100644
--- a/modules/commerce_ss/commerce_ss.rules_defaults.inc
+++ b/modules/commerce_ss/commerce_ss.rules_defaults.inc
@@ -31,7 +31,7 @@ function commerce_ss_default_rules_configuration() {
 
   $rules['rules_decrement_stock_completing_order'] = rules_import($rules_export);
 
-  $rules_export ='{ "rules_increment_stock_canceling_order" : {
+  $rules_export = '{ "rules_increment_stock_canceling_order" : {
       "LABEL" : "Stock: Increase when canceling the order process",
       "PLUGIN" : "reaction rule",
       "ACTIVE" : false,
diff --git a/modules/commerce_ss/includes/commerce_ss.admin.inc b/modules/commerce_ss/includes/commerce_ss.admin.inc
index af75ca6..7950db8 100644
--- a/modules/commerce_ss/includes/commerce_ss.admin.inc
+++ b/modules/commerce_ss/includes/commerce_ss.admin.inc
@@ -11,7 +11,6 @@
 function commerce_ss_admin_form($form, &$form_state) {
   // Find out what our status is. Use both the state of existing fields
   // and the state of variables to determine what's right.
-
   $field_name = 'commerce_stock';
   $field = field_info_field($field_name);
 
@@ -20,13 +19,13 @@ function commerce_ss_admin_form($form, &$form_state) {
   $form['product_types'] = array(
     '#type' => 'fieldset',
     '#title' => t('Enable stock management for these product types'),
-    '#description' => t('Note that disabling stock management removes the Stock field from the product type, deleting any existing stock data for that product type.')
+    '#description' => t('Note that disabling stock management removes the Stock field from the product type, deleting any existing stock data for that product type.'),
   );
 
   $form['product_types_override'] = array(
     '#type' => 'fieldset',
     '#title' => t('Enable stock management override for these product types'),
-    '#description' => t('Note that disabling stock management override removes the Stock override field from the product type, deleting any existing stock override data for that product type.')
+    '#description' => t('Note that disabling stock management override removes the Stock override field from the product type, deleting any existing stock override data for that product type.'),
   );
 
   // Create a checkbox for each product type, set with the current stock-
@@ -85,7 +84,9 @@ function commerce_ss_admin_form($form, &$form_state) {
 }
 
 /**
- * Form validator. If they are deleting and have not checked the confirmation
+ * Form validator.
+ *
+ * If they are deleting and have not checked the confirmation
  * checkbox, make them do so.
  */
 function commerce_ss_admin_form_validate($form, &$form_state) {
@@ -123,11 +124,17 @@ function commerce_ss_admin_form_submit($form, &$form_state) {
       commerce_ss_admin_create_instance('commerce_stock', 'number_decimal', TRUE, 'commerce_product', $type, t('Stock'));
       drupal_set_message(t('Stock field has been added to the %type product type.', array('%type' => $type)));
       // Add the operation to process this type to the batch.
-      $batch['operations'][] = array('commerce_ss_batch_product_type_init_process', array($type, 0));
+      $batch['operations'][] = array(
+        'commerce_ss_batch_product_type_init_process',
+        array(
+          $type,
+          0,
+        ),
+      );
     }
     // Conversely, if they *don't* want it and it's currently enabled,
     // warn them about the consequences or do it.
-    else if (!$enable && $currently_enabled) {
+    elseif (!$enable && $currently_enabled) {
       // If they haven't clicked the "confirm" checkbox, rebuild and get them
       // to do it.
       if (empty($form_state['values']['confirmation'])) {
@@ -139,7 +146,7 @@ function commerce_ss_admin_form_submit($form, &$form_state) {
         // Remove the instance.
         field_delete_instance($instance);
 
-        // Remove override if enabled
+        // Remove override if enabled.
         if (commerce_ss_product_type_override_enabled($type)) {
           $override = field_info_instance('commerce_product', 'commerce_stock_override', $type);
           field_delete_instance($override);
@@ -156,14 +163,15 @@ function commerce_ss_admin_form_submit($form, &$form_state) {
 
       $currently_enabled = commerce_ss_product_type_override_enabled($type);
       $stock_enabled = commerce_ss_product_type_enabled($type);
-      // If they want us to enable it and it doesn't currently exist, do the work.
+      // If they want us to enable it and it doesn't currently exist,
+      // do the work.
       if ($enable && $stock_enabled && !$currently_enabled) {
         commerce_ss_admin_create_instance('commerce_stock_override', 'list_boolean', FALSE, 'commerce_product', $type, t('Disable stock for this product'));
         drupal_set_message(t('Stock management override has been enabled on the %type product type', array('%type' => $type)));
       }
       // Conversely, if they *don't* want it and it's currently enabled,
       // warn them about the consequences or do it.
-      else if (!$enable && $currently_enabled) {
+      elseif (!$enable && $currently_enabled) {
         // If they haven't clicked the "confirm" checkbox, rebuild and get them
         // to do it.
         if (empty($form_state['values']['confirmation'])) {
@@ -189,10 +197,10 @@ function commerce_ss_admin_form_submit($form, &$form_state) {
 /**
  * Batch Operation Callback.
  *
- * @param $type
- *  The product type to process.
- * @param $init_stock_value
- *  The initial value to give to the stock field.
+ * @param string $type
+ *   The product type to process.
+ * @param int $init_stock_value
+ *   The initial value to give to the stock field.
  */
 function commerce_ss_batch_product_type_init_process($type, $init_stock_value, &$context) {
   if (!isset($context['sandbox']['progress'])) {
@@ -215,18 +223,20 @@ function commerce_ss_batch_product_type_init_process($type, $init_stock_value, &
     $current_count++;
     $context['sandbox']['progress']++;
 
-    //ddl("$current_count < $limit, progress: " . $context['sandbox']['progress']);
+    // ddl("$current_count < $limit, progress: "
+    // . $context['sandbox']['progress']);
     // Load the product and get its wrapper.
     $product_data = array_shift($context['sandbox']['product_data']);
     $product = commerce_product_load($product_data->product_id);
 
     $wrapper = entity_metadata_wrapper('commerce_product', $product);
-    $wrapper->commerce_stock = $init_stock_value; //@todo: the name of the stock field should probably be a variable for commerce_stock v2
+    // @todo: the name of the stock field should probably be a variable for commerce_stock v2
+    $wrapper->commerce_stock = $init_stock_value;
     $wrapper->save();
 
     $context['message'] = t('Processing product type %type %progress% complete.', array(
       '%type' => $type,
-      '%progress' => intval( $context['sandbox']['progress'] / $context['sandbox']['max'] * 100 ),
+      '%progress' => intval($context['sandbox']['progress'] / $context['sandbox']['max'] * 100),
     ));
   } // product processing loop
 
@@ -245,20 +255,25 @@ function commerce_ss_batch_product_type_init_finished($success, $results, $opera
     // We display the number of things we processed...
     drupal_set_message(t('All stock levels have been initialized to zero'));
 
+    // @codingStandardsIgnoreStart
     // @todo: get the batch process to provide more meaningfull information
     // using $context['results']
-//    drupal_set_message(t('@count results processed.', array(
-//      '@count' => count($results),
-//    )));
-//    foreach ($results as $result) {
-//      drupal_set_message($result);
-//    }
+    //    drupal_set_message(t('@count results processed.', array(
+    //      '@count' => count($results),
+    //    )));
+    //    foreach ($results as $result) {
+    //      drupal_set_message($result);
+    //    }
+    // @codingStandardsIgnoreEnd
   }
   else {
     // An error occurred.
     // $operations contains the operations that remained unprocessed.
     $error_operation = reset($operations);
-    drupal_set_message(t('An error occurred while processing @operation with arguments : @args', array('@operation' => $error_operation[0], '@args' => print_r($error_operation[0], TRUE))));
+    drupal_set_message(t('An error occurred while processing @operation with arguments : @args', array(
+      '@operation' => $error_operation[0],
+      '@args' => print_r($error_operation[0], TRUE),
+    )));
   }
 }
 
@@ -272,24 +287,27 @@ function commerce_ss_admin_configure_product_type($type) {
 /**
  * Creates a required instance of a stock field on the specified bundle.
  *
- * @param $field_name
+ * @param string $field_name
  *   The name of the field; if it already exists, a new instance of the existing
  *   field will be created. For fields governed by the Commerce modules, this
  *   should begin with commerce_.
- * @param $entity_type
+ * @param string $entity_type
  *   The type of entity the field instance will be attached to.
- * @param $bundle
+ * @param string $bundle
  *   The bundle name of the entity the field instance will be attached to.
- * @param $label
+ * @param string $label
  *   The label of the field instance.
- * @param $weight
+ * @param int $weight
  *   The default weight of the field instance widget and display.
  */
 function commerce_ss_admin_create_instance($field_name, $field_type, $required, $entity_type, $bundle, $label, $description = NULL, $weight = 0) {
+
+  // @codingStandardsIgnoreStart
   // If a field type we know should exist isn't found, clear the Field cache.
-//  if (!field_info_field_types('commerce_stock')) {
-//    field_cache_clear();
-//  }
+  //  if (!field_info_field_types('commerce_stock')) {
+  //    field_cache_clear();
+  //  }
+  // @codingStandardsIgnoreEnd
 
   // Look for or add the specified stock field to the requested entity bundle.
   $field = field_info_field($field_name);
@@ -330,9 +348,9 @@ function commerce_ss_admin_create_instance($field_name, $field_type, $required,
       $instance['widget'] = array(
         'type' => 'options_onoff',
         'settings' => array(
-        'display_label' => TRUE,
-       ),
-     );
+          'display_label' => TRUE,
+        ),
+      );
     }
 
     $entity_info = entity_get_info($entity_type);
diff --git a/modules/commerce_ssr/commerce_ssr.info b/modules/commerce_ssr/commerce_ssr.info
index 87edc5f..7653e48 100644
--- a/modules/commerce_ssr/commerce_ssr.info
+++ b/modules/commerce_ssr/commerce_ssr.info
@@ -7,4 +7,4 @@ dependencies[] = commerce_order
 dependencies[] = commerce_stock
 dependencies[] = commerce_ss
 dependencies[] = rules
-core = 7.x
\ No newline at end of file
+core = 7.x
diff --git a/modules/commerce_ssr/commerce_ssr.module b/modules/commerce_ssr/commerce_ssr.module
index a4abe2d..d5b4bcb 100644
--- a/modules/commerce_ssr/commerce_ssr.module
+++ b/modules/commerce_ssr/commerce_ssr.module
@@ -1,2 +1,6 @@
 <?php
 
+/**
+ * @file
+ * Commerce Simple Stock Rules module.
+ */
