diff options
author | Antonio Carlos Ribeiro <acr@antoniocarlosribeiro.com> | 2017-06-22 11:00:49 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-22 11:00:49 -0300 |
commit | 9aeb582d2d6c0c434328c390a5016e29e4c87710 (patch) | |
tree | c7dc20fcbdc37f638c7220a2ef795aba41f84adb | |
parent | b04b1ca50fbb6d876bde53c8f75929d91c98e4c9 (diff) | |
parent | 03b751abfb34bc67e66a272838ed3295530867df (diff) | |
download | google2fa-9aeb582d2d6c0c434328c390a5016e29e4c87710.zip google2fa-9aeb582d2d6c0c434328c390a5016e29e4c87710.tar.gz google2fa-9aeb582d2d6c0c434328c390a5016e29e4c87710.tar.bz2 |
Merge pull request #75 from antonioribeiro/analysis-zOAJVav2.0.3
Apply fixes from StyleCI
[ci skip] [skip ci]
-rw-r--r-- | src/Google2FA.php | 2 | ||||
-rw-r--r-- | src/Support/Base32.php | 4 | ||||
-rw-r--r-- | src/Support/Constants.php | 2 | ||||
-rw-r--r-- | tests/spec/Google2FASpec.php | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/Google2FA.php b/src/Google2FA.php index 1b4e3e2..c30330c 100644 --- a/src/Google2FA.php +++ b/src/Google2FA.php @@ -88,7 +88,7 @@ class Google2FA /** * Generate a digit secret key in base32 format. * - * @param int $length + * @param int $length * @param string $prefix * * @return string diff --git a/src/Support/Base32.php b/src/Support/Base32.php index a1228c0..2bdf82c 100644 --- a/src/Support/Base32.php +++ b/src/Support/Base32.php @@ -4,6 +4,7 @@ namespace PragmaRX\Google2FA\Support; use ParagonIE\ConstantTime\Base32 as ParagonieBase32; use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException; + // use PragmaRX\Google2FA\Exceptions\InvalidCharactersException; trait Base32 { @@ -53,12 +54,13 @@ trait Base32 * * @param $string * @param $length + * * @return string */ private function strPadBase32($string, $length) { for ($i = 0; $i < $length; $i++) { - $string .= Constants::VALID_FOR_B32_SCRAMBLED[ $this->getRandomNumber() ]; + $string .= Constants::VALID_FOR_B32_SCRAMBLED[$this->getRandomNumber()]; } return $string; diff --git a/src/Support/Constants.php b/src/Support/Constants.php index 632e04b..ba37e62 100644 --- a/src/Support/Constants.php +++ b/src/Support/Constants.php @@ -15,7 +15,7 @@ class Constants const VALID_FOR_B32_SCRAMBLED = '234567QWERTYUIOPASDFGHJKLZXCVBNM'; /** - * Argument not set constant + * Argument not set constant. */ const ARGUMENT_NOT_SET = '__not_set__'; } diff --git a/tests/spec/Google2FASpec.php b/tests/spec/Google2FASpec.php index a6e94c2..d14f2cf 100644 --- a/tests/spec/Google2FASpec.php +++ b/tests/spec/Google2FASpec.php @@ -3,9 +3,8 @@ namespace spec\PragmaRX\Google2FA; use PhpSpec\ObjectBehavior; -use PragmaRX\Google2FA\Support\Constants; -use PragmaRX\Google2FA\Exceptions\InvalidCharactersException; use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException; +use PragmaRX\Google2FA\Support\Constants; class Google2FASpec extends ObjectBehavior { |