@@ -148,7 +148,7 @@  | 
                                                    ||
| 148 | 148 | protected function checkForValidCharacters($b32)  | 
                                                        
| 149 | 149 |      { | 
                                                        
| 150 | 150 | if (  | 
                                                        
| 151 | -            preg_replace('/[^' . Constants::VALID_FOR_B32 . ']/', '', $b32) !== | 
                                                        |
| 151 | +            preg_replace('/[^'.Constants::VALID_FOR_B32.']/', '', $b32) !== | 
                                                        |
| 152 | 152 | $b32  | 
                                                        
| 153 | 153 |          ) { | 
                                                        
| 154 | 154 | throw new InvalidCharactersException();  | 
                                                        
@@ -11,10 +11,10 @@  | 
                                                    ||
| 11 | 11 | $qrCodeUrl  | 
                                                        
| 12 | 12 |      ) { | 
                                                        
| 13 | 13 | $url =  | 
                                                        
| 14 | - $domain .  | 
                                                        |
| 15 | - rawurlencode($page) .  | 
                                                        |
| 16 | - '?' .  | 
                                                        |
| 17 | - $queryParameters .  | 
                                                        |
| 14 | + $domain.  | 
                                                        |
| 15 | + rawurlencode($page).  | 
                                                        |
| 16 | + '?'.  | 
                                                        |
| 17 | + $queryParameters.  | 
                                                        |
| 18 | 18 | urlencode($qrCodeUrl);  | 
                                                        
| 19 | 19 | |
| 20 | 20 | return $url;  | 
                                                        
@@ -298,7 +298,7 @@ discard block  | 
                                                    ||
| 298 | 298 | public function removeInvalidChars($string)  | 
                                                        
| 299 | 299 |      { | 
                                                        
| 300 | 300 | return preg_replace(  | 
                                                        
| 301 | - '/[^' . Constants::VALID_FOR_B32 . ']/',  | 
                                                        |
| 301 | + '/[^'.Constants::VALID_FOR_B32.']/',  | 
                                                        |
| 302 | 302 | '',  | 
                                                        
| 303 | 303 | $string  | 
                                                        
| 304 | 304 | );  | 
                                                        
@@ -328,7 +328,7 @@ discard block  | 
                                                    ||
| 328 | 328 | public function setAlgorithm($algorithm)  | 
                                                        
| 329 | 329 |      { | 
                                                        
| 330 | 330 | // Default to SHA1 HMAC algorithm  | 
                                                        
| 331 | -        if (! in_array($algorithm, $this->getValidAlgorithms())) { | 
                                                        |
| 331 | +        if (!in_array($algorithm, $this->getValidAlgorithms())) { | 
                                                        |
| 332 | 332 | throw new InvalidAlgorithmException();  | 
                                                        
| 333 | 333 | }  | 
                                                        
| 334 | 334 | |
@@ -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((string) $this->getOneTimePasswordLength())) .  | 
                                                        |
| 30 | - '&period=' .  | 
                                                        |
| 31 | - rawurlencode(strtoupper((string) $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((string) $this->getOneTimePasswordLength())).  | 
                                                        |
| 30 | + '&period='.  | 
                                                        |
| 31 | + rawurlencode(strtoupper((string) $this->getKeyRegeneration())).  | 
                                                        |
| 32 | 32 | '';  | 
                                                        
| 33 | 33 | }  | 
                                                        
| 34 | 34 | }  |