[TASK] CGL FunctionCallArgumentSpacingNoSpaceAfterComma in saltedpasswords
authorRoland Waldner <most.wanted@gmx.at>
Mon, 11 Jun 2012 08:12:16 +0000 (10:12 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 11 Jun 2012 17:05:24 +0000 (19:05 +0200)
There are CGL violations "FunctionCallArgumentSpacingNoSpaceAfterComma"
in typo3/sysext/saltedpasswords/.

These will be reduced.

Change-Id: I7d05359029f9e5a93515c428e5f915292f37f7a7
Resolves: #37880
Releases: 6.0
Reviewed-on: http://review.typo3.org/11924
Reviewed-by: Oliver Klee
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/saltedpasswords/classes/class.tx_saltedpasswords_emconfhelper.php
typo3/sysext/saltedpasswords/classes/salts/class.tx_saltedpasswords_salts_blowfish.php
typo3/sysext/saltedpasswords/classes/salts/class.tx_saltedpasswords_salts_md5.php
typo3/sysext/saltedpasswords/classes/salts/class.tx_saltedpasswords_salts_phpass.php
typo3/sysext/saltedpasswords/sv1/class.tx_saltedpasswords_sv1.php

index f0986e2..ff1cb43 100644 (file)
@@ -255,7 +255,7 @@ Please disable either one of them.
 EOT;
                        }
                                // check if the configured hash-method is available on system
-                       if (!$instance = tx_saltedpasswords_salts_factory::getSaltingInstance(NULL,'BE') || !$instance->isAvailable()) {
+                       if (!$instance = tx_saltedpasswords_salts_factory::getSaltingInstance(NULL, 'BE') || !$instance->isAvailable()) {
                                $this->setErrorLevel('error');
                                $problems[] = <<< EOT
 The selected method for hashing your salted passwords is not available on this
index 92329cb..b3b9559 100644 (file)
@@ -263,7 +263,7 @@ class tx_saltedpasswords_salts_blowfish extends tx_saltedpasswords_salts_md5 {
 
                                // checking base64 characters
                        if (!$skip && (strlen($salt) >= $reqLenBase64)) {
-                               if (preg_match('/^[' . preg_quote($this->getItoa64(),'/') . ']{' . $reqLenBase64 . ',' . $reqLenBase64 . '}$/', substr($salt, 0, $reqLenBase64))) {
+                               if (preg_match('/^[' . preg_quote($this->getItoa64(), '/') . ']{' . $reqLenBase64 . ',' . $reqLenBase64 . '}$/', substr($salt, 0, $reqLenBase64))) {
                                        $isValid = TRUE;
                                }
                        }
index 671bac2..4e3e1a9 100644 (file)
@@ -104,7 +104,7 @@ class tx_saltedpasswords_salts_md5 extends tx_saltedpasswords_abstract_salts imp
                $isCorrect = FALSE;
 
                if ($this->isValidSalt($saltedHashPW)) {
-                       $isCorrect = (crypt($plainPW,$saltedHashPW) == $saltedHashPW);
+                       $isCorrect = (crypt($plainPW, $saltedHashPW) == $saltedHashPW);
                }
 
                return $isCorrect;
@@ -231,7 +231,7 @@ class tx_saltedpasswords_salts_md5 extends tx_saltedpasswords_abstract_salts imp
 
                                // checking base64 characters
                        if (!$skip && (strlen($salt) >= $reqLenBase64)) {
-                               if (preg_match('/^[' . preg_quote($this->getItoa64(),'/') . ']{' . $reqLenBase64 . ',' . $reqLenBase64 . '}$/', substr($salt, 0, $reqLenBase64))) {
+                               if (preg_match('/^[' . preg_quote($this->getItoa64(), '/') . ']{' . $reqLenBase64 . ',' . $reqLenBase64 . '}$/', substr($salt, 0, $reqLenBase64))) {
                                        $isValid = TRUE;
                                }
                        }
index 218098d..9ad44ea 100644 (file)
@@ -370,7 +370,7 @@ class tx_saltedpasswords_salts_phpass extends tx_saltedpasswords_abstract_salts
 
                                // checking base64 characters
                        if (!$skip && (strlen($salt) >= $reqLenBase64)) {
-                               if (preg_match('/^[' . preg_quote($this->getItoa64(),'/') . ']{' . $reqLenBase64 . ',' . $reqLenBase64 . '}$/', substr($salt, 0, $reqLenBase64))) {
+                               if (preg_match('/^[' . preg_quote($this->getItoa64(), '/') . ']{' . $reqLenBase64 . ',' . $reqLenBase64 . '}$/', substr($salt, 0, $reqLenBase64))) {
                                        $isValid = TRUE;
                                }
                        }
index c682e15..5f56f7a 100644 (file)
@@ -135,7 +135,7 @@ class tx_saltedpasswords_sv1 extends tx_sv_authbase {
 
                        // existing record is in format of Salted Hash password
                if (is_object($this->objInstanceSaltedPW)) {
-                       $validPasswd = $this->objInstanceSaltedPW->checkPassword($password,$user['password']);
+                       $validPasswd = $this->objInstanceSaltedPW->checkPassword($password, $user['password']);
 
                                // record is in format of Salted Hash password but authentication failed
                                // skip further authentication methods