pareview.sh coding standards warnings
pareview.sh coding standards warnings

--- a/vcaching.class.php
+++ b/vcaching.class.php
@@ -87,7 +87,7 @@
             $purgemethod = 'default';
             $purgeurl = $path;
         }
-        foreach ($this->ipsToHosts as $key => $ipToHost) {
+        foreach ($this->ipsToHosts as $ipToHost) {
             $headers = array('host' => $ipToHost['host'], 'X-VC-Purge-Method' => $purgemethod, 'X-VC-Purge-Host' => $ipToHost['host']);
             if (!is_null($this->purgeKey)) {
                 $headers['X-VC-Purge-Key'] = $this->purgeKey;
@@ -97,7 +97,7 @@
                 $this->noticeMessage .= 'Error ' . $response['message'];
             } else {
                 $this->noticeMessage .= '<br />' . t('Trying to purge URL :') . $purgeurl;
-                $message = preg_match("/<title>(.*)<\/title>/i", $response['message'], $matches);
+                preg_match("/<title>(.*)<\/title>/i", $response['message'], $matches);
                 $this->noticeMessage .= ' => <br /> ' . isset($matches[1]) ? ' => ' . $matches[1] : $response['message'];
                 $this->noticeMessage .= '<br />';
                 if ($this->debug) {

--- a/vcaching.module
+++ b/vcaching.module
@@ -9,10 +9,8 @@
     switch ($path) {
         case 'admin/config/system/vcaching':
             //return '<p>' . t('') . '</p>';
-
         case 'admin/config/system/vcaching/console':
             //return '<p>' . t('') . '</p>';
-
         case 'admin/config/system/vcaching/stats':
             //return '<p>' . t('') . '</p>';
     }
@@ -37,7 +35,7 @@
             }
         }
         drupal_add_http_header('X-VC-TTL', $ttl);
-        if ($debug = variable_get('vcaching_debug')) {
+        if (variable_get('vcaching_debug')) {
             drupal_add_http_header('X-VC-Debug', 'true');
         }
     } else {

comments