@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | public function removeInvalidChars($string) |
| 272 | 272 | { |
| 273 | 273 | return preg_replace( |
| 274 | - '/[^' . Constants::VALID_FOR_B32 . ']/', |
|
| 274 | + '/[^'.Constants::VALID_FOR_B32.']/', |
|
| 275 | 275 | '', |
| 276 | 276 | $string |
| 277 | 277 | ); |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | ]; |
| 307 | 307 | |
| 308 | 308 | // Default to SHA1 HMAC algorithm |
| 309 | - if (! in_array($algorithm, $validAlgorithms)) { |
|
| 309 | + if (!in_array($algorithm, $validAlgorithms)) { |
|
| 310 | 310 | $this->algorithm = Constants::SHA1; |
| 311 | 311 | |
| 312 | 312 | return; |
@@ -15,20 +15,20 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function getQRCodeUrl($company, $holder, $secret) |
| 17 | 17 | { |
| 18 | - return 'otpauth://totp/' . |
|
| 19 | - rawurlencode($company) . |
|
| 20 | - ':' . |
|
| 21 | - rawurlencode($holder) . |
|
| 22 | - '?secret=' . |
|
| 23 | - $secret . |
|
| 24 | - '&issuer=' . |
|
| 25 | - rawurlencode($company) . |
|
| 26 | - '&algorithm=' . |
|
| 27 | - rawurlencode(strtoupper($this->getAlgorithm())) . |
|
| 28 | - '&digits=' . |
|
| 29 | - rawurlencode(strtoupper($this->getOneTimePasswordLength())) . |
|
| 30 | - '&period=' . |
|
| 31 | - rawurlencode(strtoupper($this->getKeyRegeneration())) . |
|
| 18 | + return 'otpauth://totp/'. |
|
| 19 | + rawurlencode($company). |
|
| 20 | + ':'. |
|
| 21 | + rawurlencode($holder). |
|
| 22 | + '?secret='. |
|
| 23 | + $secret. |
|
| 24 | + '&issuer='. |
|
| 25 | + rawurlencode($company). |
|
| 26 | + '&algorithm='. |
|
| 27 | + rawurlencode(strtoupper($this->getAlgorithm())). |
|
| 28 | + '&digits='. |
|
| 29 | + rawurlencode(strtoupper($this->getOneTimePasswordLength())). |
|
| 30 | + '&period='. |
|
| 31 | + rawurlencode(strtoupper($this->getKeyRegeneration())). |
|
| 32 | 32 | ''; |
| 33 | 33 | } |
| 34 | 34 | } |