code comments/indent 2
code comments/indent 2

--- a/css/vcaching.css
+++ b/css/vcaching.css
@@ -1,37 +1,37 @@
 /**
  * Icons
  */
-#page-title .path-admin-config-system-vcaching span.icon {
-    width:35px;
-    height:30px;
-    display:block;
-    background-color:transparent;
-    background-image:url(images/icon.png);
-    background-repeat:no-repeat;
-    background-position: 0px 0px;
+ #page-title .path-admin-config-system-vcaching span.icon {
+  width:35px;
+  height:30px;
+  display:block;
+  background-color:transparent;
+  background-image:url(images/icon.png);
+  background-repeat:no-repeat;
+  background-position: 0px 0px;
 }
 
 #block-system-main .path-admin-config-system-vcaching span.icon {
-    width:35px;
-    height:30px;
-    display:block;
-    background-color:transparent;
-    background-image:url(images/icon.png);
-    background-repeat:no-repeat;
-    background-position: 0px 0px;
+  width:35px;
+  height:30px;
+  display:block;
+  background-color:transparent;
+  background-image:url(images/icon.png);
+  background-repeat:no-repeat;
+  background-position: 0px 0px;
 }
 
 #vcaching-settings-form span.vcaching-reload {
-    width:20px;
-    height:20px;
-    font-size: 20px;
-    line-height: 1;
-    vertical-align: top;
-    text-align: center;
-    display:inline-block;
-    background-color:transparent;
-    background-image:url(images/refresh.png);
-    background-repeat:no-repeat;
-    background-position: 0px 0px;
+  width:20px;
+  height:20px;
+  font-size: 20px;
+  line-height: 1;
+  vertical-align: top;
+  text-align: center;
+  display:inline-block;
+  background-color:transparent;
+  background-image:url(images/refresh.png);
+  background-repeat:no-repeat;
+  background-position: 0px 0px;
 }
 

--- a/vcaching.drush.inc
+++ b/vcaching.drush.inc
@@ -7,11 +7,8 @@
 
 /**
  * Implements hook_drush_command().
- *
- * @return array
  */
-function vcaching_drush_command()
-{
+function vcaching_drush_command() {
   $items = array();
   $items['vcaching-purge-all'] = array(
     'description' => 'Purge all pages in varnish.',
@@ -36,8 +33,7 @@
  *
  * @return void
  */
-function vcaching_purge_all()
-{
+function vcaching_purge_all() {
   $vcaching = new VCaching('vcaching_');
   drush_log(t('Purging all Varnish cache'), 'ok');
   $vcaching->purgeUrl(base_path() . '?vc-regex');
@@ -48,10 +44,8 @@
  * Callback for vcaching-purge-urls drush command.
  *
  * @param string $paths A space separated list of paths.
- * @return void
  */
-function vcaching_purge_urls($paths)
-{
+function vcaching_purge_urls($paths) {
   $vcaching = new VCaching('vcaching_');
   $paths = explode(";", $paths);
   foreach ($paths as $path) {
@@ -63,12 +57,8 @@
 
 /**
  * Implements hook_drush_cache_clear().
- *
- * @param array $types
- * @return void
  */
-function vcaching_drush_cache_clear(&$types)
-{
+function vcaching_drush_cache_clear(&$types) {
   $types['vcaching'] = 'vcaching_purge_all';
 }
 

--- a/vcaching.install
+++ b/vcaching.install
@@ -1,23 +1,25 @@
 <?php
 
 /**
+ * @file
+ * This file contains uninstall information
+ */
+
+/**
  * Implements hook_uninstall().
- *
- * @return void
  */
-function vcaching_uninstall()
-{
-    // Delete variables.
-    variable_del('vcaching_enable');
-    variable_del('vcaching_homepage_ttl');
-    variable_del('vcaching_ttl');
-    variable_del('vcaching_ips');
-    variable_del('vcaching_dynamic_host');
-    variable_del('vcaching_hosts');
-    variable_del('vcaching_purge_key');
-    variable_del('vcaching_stats_json_file');
-    variable_del('vcaching_clear_cache_node_save');
-    variable_del('vcaching_debug');
-    variable_del('vcaching_console_url');
+function vcaching_uninstall() {
+  // Delete variables.
+  variable_del('vcaching_enable');
+  variable_del('vcaching_homepage_ttl');
+  variable_del('vcaching_ttl');
+  variable_del('vcaching_ips');
+  variable_del('vcaching_dynamic_host');
+  variable_del('vcaching_hosts');
+  variable_del('vcaching_purge_key');
+  variable_del('vcaching_stats_json_file');
+  variable_del('vcaching_clear_cache_node_save');
+  variable_del('vcaching_debug');
+  variable_del('vcaching_console_url');
 }
 

--- a/vcaching.module
+++ b/vcaching.module
@@ -13,19 +13,21 @@
 function vcaching_help($path, $arg) {
   switch ($path) {
     case 'admin/config/system/vcaching':
-    return '';
+      return '';
+
     case 'admin/config/system/vcaching/console':
-    return '';
+      return '';
+
     case 'admin/config/system/vcaching/stats':
-    return '';
+      return '';
+
   }
 }
 
 /**
  * Implements hook_init().
  */
-function vcaching_init()
-{
+function vcaching_init() {
   $enable = variable_get('vcaching_enable');
   if ($enable) {
     drupal_add_http_header('X-VC-Enabled', 'true');
@@ -51,8 +53,7 @@
 /**
  * Implements hook_node_presave().
  */
-function vcaching_node_presave($node)
-{
+function vcaching_node_presave($node) {
   if (variable_get('vcaching_enable')) {
     $vcaching = new VCaching('vcaching_');
     if (variable_get('vcaching_clear_cache_node_save')) {
@@ -66,12 +67,8 @@
 
 /**
  * Implements hook_node_delete().
- *
- * @param  object $node
- * @return void
- */
-function varnish_node_delete($node)
-{
+ */
+function varnish_node_delete($node) {
   if (variable_get('vcaching_enable')) {
     $vcaching = new VCaching('vcaching_');
     $vcaching->purgeUrl(base_path() . $node->path['alias']);
@@ -81,11 +78,8 @@
 
 /**
  * Implements hook_menu().
- *
- * @return array
- */
-function vcaching_menu()
-{
+ */
+function vcaching_menu() {
   $items = array();
 
   $items['admin/config/system/vcaching'] = array(
@@ -125,7 +119,7 @@
     'description' => 'Varnish Caching Stats',
     'page callback' => 'vcaching_stats_form',
     'page arguments' => array(),
-    'access callback' => true,
+    'access callback' => TRUE,
     'access arguments' => array('varnish caching stats access'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 30
@@ -156,8 +150,6 @@
 
 /**
  * Implements hook_permission().
- *
- * @return array
  */
 function vcaching_permission() {
   return array(
@@ -181,15 +173,14 @@
  *
  * @return array
  */
-function vcaching_settings_form()
-{
+function vcaching_settings_form() {
   $form = array();
   $form['general'] = array(
     '#type' => 'fieldset',
     '#title' => t('Settings'),
     '#weight' => 5,
-    '#collapsible' => false,
-    '#collapsed' => false
+    '#collapsible' => FALSE,
+    '#collapsed' => FALSE
     );
   $form['general']['vcaching_enable'] = array(
     '#type' => 'checkbox',
@@ -305,15 +296,14 @@
  *
  * @return array
  */
-function vcaching_console_form()
-{
+function vcaching_console_form() {
   $form = array();
   $form['action'] = array(
     '#type' => 'fieldset',
     '#title' => t('Console'),
     '#weight' => 5,
-    '#collapsible' => false,
-    '#collapsed' => false
+    '#collapsible' => FALSE,
+    '#collapsed' => FALSE
     );
   $form['action']['vcaching_console_url'] = array(
     '#type' => 'textfield',
@@ -329,12 +319,11 @@
 }
 
 /**
- * Console form submit
+ * Console form submit.
  *
  * @return void
  */
-function vcaching_console_form_submit($form, &$form_state)
-{
+function vcaching_console_form_submit($form, &$form_state) {
   if (variable_get('vcaching_enable')) {
     $vcaching = new VCaching('vcaching_');
     $vcaching->purgeUrl($_POST['vcaching_console_url']);
@@ -343,12 +332,11 @@
 }
 
 /**
- * Stats form
+ * Stats form.
  *
  * @return void|string
  */
-function vcaching_stats_form()
-{
+function vcaching_stats_form() {
   if (variable_get('vcaching_enable')) {
     $vcaching = new VCaching('vcaching_');
     return $vcaching->stats();
@@ -356,19 +344,18 @@
 }
 
 /**
- * Conf form
+ * Conf form.
  *
  * @return array
  */
-function vcaching_conf_form()
-{
+function vcaching_conf_form() {
   $form = array();
   $form['general'] = array(
     '#type' => 'fieldset',
     '#title' => t('Varnish Cache configuration'),
     '#weight' => 5,
-    '#collapsible' => false,
-    '#collapsed' => false
+    '#collapsible' => FALSE,
+    '#collapsed' => FALSE
     );
   $form['general']['vcaching_conf_backends'] = array(
     '#type' => 'textfield',
@@ -376,7 +363,7 @@
     '#description' => t('Comma separated ip/ip:port. Example : 192.168.0.2,192.168.0.3:8080'),
     '#default_value' => variable_get('vcaching_conf_backends'),
     '#size' => 60,
-    '#required' => true
+    '#required' => TRUE
     );
   $form['general']['vcaching_conf_acls'] = array(
     '#type' => 'textfield',
@@ -384,15 +371,15 @@
     '#description' => t('Comma separated ip/ip range. Example : 192.168.0.2,192.168.1.1/24'),
     '#default_value' => variable_get('vcaching_conf_acls'),
     '#size' => 60,
-    '#required' => true
+    '#required' => TRUE
     );
   $form['general']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
   $form['action'] = array(
     '#type' => 'fieldset',
     '#title' => t('Get configuration files'),
     '#weight' => 5,
-    '#collapsible' => false,
-    '#collapsed' => false
+    '#collapsible' => FALSE,
+    '#collapsed' => FALSE
     );
   $form['action']['vcaching_conf_version'] = array(
     '#type' => 'select',
@@ -400,16 +387,14 @@
     '#description' => t('Varnish Cache version'),
     '#options' => array(3 => 3,4 => 4),
     '#default_value' => 3,
-    '#required' => true
+    '#required' => TRUE
     );
   $form['action']['submit'] = array('#type' => 'submit', '#value' => t('Download'), '#submit' => array('vcaching_conf_form_submit'));
   return system_settings_form($form);
 }
 
 /**
- * Implements form_alter()
- *
- * @return void
+ * Implements form_alter().
  */
 function vcaching_form_alter(&$form, &$form_state, $form_id)
 {
@@ -419,7 +404,7 @@
 }
 
 /**
- * Conf form submit
+ * Conf form submit.
  *
  * @return void
  */
@@ -435,7 +420,7 @@
 }
 
 /**
- * Shortcut callback
+ * Shortcut callback.
  *
  * @return void
  */
@@ -450,9 +435,7 @@
 }
 
 /**
- * Implements hook_user_login()
- *
- * @return void
+ * Implements hook_user_login().
  */
 function vcaching_user_login(&$edit, $account)
 {
@@ -460,9 +443,7 @@
 }
 
 /**
- * Implements hook_user_logout()
- *
- * @return void
+ * Implements hook_user_logout().
  */
 function vcaching_user_logout($account)
 {

comments