summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Carlos Ribeiro <acr@antoniocarlosribeiro.com>2016-08-03 16:16:31 -0400
committerStyleCI Bot <bot@styleci.io>2016-08-03 16:16:31 -0400
commit5766b336c9b86fcb77a5d77fc3fddf28ac195408 (patch)
tree34cc2390a9289198e8f8b9033be4048770057cf7
parenta93c23a766a71cfa486daaa0eaba883e63bb84b4 (diff)
downloadgoogle2fa-origin/analysis-XaVjEV.zip
google2fa-origin/analysis-XaVjEV.tar.gz
google2fa-origin/analysis-XaVjEV.tar.bz2
Applied fixes from StyleCIorigin/analysis-XaVjEV
-rw-r--r--src/Google2FA.php5
-rw-r--r--tests/spec/Google2FASpec.php2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/Google2FA.php b/src/Google2FA.php
index cc2d0d1..4387123 100644
--- a/src/Google2FA.php
+++ b/src/Google2FA.php
@@ -65,11 +65,12 @@ class Google2FA implements Google2FAContract
* Check if all secret key characters are valid.
*
* @param $b32
+ *
* @throws InvalidCharactersException
*/
private function checkForValidCharacters($b32)
{
- if (!preg_match('/^[' . static::VALID_FOR_B32 . ']+$/', $b32, $match)) {
+ if (!preg_match('/^['.static::VALID_FOR_B32.']+$/', $b32, $match)) {
throw new InvalidCharactersException();
}
}
@@ -78,6 +79,7 @@ class Google2FA implements Google2FAContract
* Check if the secret key is compatible with Google Authenticator.
*
* @param $b32
+ *
* @throws IncompatibleWithGoogleAuthenticatorException
*/
private function checkGoogleAuthenticatorCompatibility($b32)
@@ -186,6 +188,7 @@ class Google2FA implements Google2FAContract
* Setter for the enforce Google Authenticator compatibility property.
*
* @param mixed $enforceGoogleAuthenticatorCompatibility
+ *
* @return $this
*/
public function setEnforceGoogleAuthenticatorCompatibility($enforceGoogleAuthenticatorCompatibility)
diff --git a/tests/spec/Google2FASpec.php b/tests/spec/Google2FASpec.php
index a778385..84d4bc6 100644
--- a/tests/spec/Google2FASpec.php
+++ b/tests/spec/Google2FASpec.php
@@ -3,8 +3,8 @@
namespace spec\PragmaRX\Google2FA;
use PhpSpec\ObjectBehavior;
-use PragmaRX\Google2FA\Google2FA;
use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException;
+use PragmaRX\Google2FA\Google2FA;
class Google2FASpec extends ObjectBehavior
{