@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $this->privateKey = 'privateKey'; |
| 41 | 41 | $this->reflector = new \ReflectionClass(HashHmac::class); |
| 42 | 42 | $this->data = ['foo' => 'bar']; |
| 43 | - $this->hmac = new HashHmac($this->privateKey,$this->algo); |
|
| 43 | + $this->hmac = new HashHmac($this->privateKey, $this->algo); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | $actual = $this->hmac->create($this->data); |
| 52 | 52 | $token = base64_decode($actual); |
| 53 | - $tokenParts = explode('=',$token); |
|
| 53 | + $tokenParts = explode('=', $token); |
|
| 54 | 54 | $tokenHash = $tokenParts[1]; |
| 55 | - $expected = hash_hmac($this->algo, json_encode($this->data) , $this->privateKey); |
|
| 55 | + $expected = hash_hmac($this->algo, json_encode($this->data), $this->privateKey); |
|
| 56 | 56 | $this->assertEquals($tokenHash, $expected); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | public function testCompareHash() |
| 63 | 63 | { |
| 64 | 64 | $encodedHash = $this->hmac->create($this->data); |
| 65 | - $this->assertEquals(true, $this->hmac->verify($encodedHash,$this->data)); |
|
| 65 | + $this->assertEquals(true, $this->hmac->verify($encodedHash, $this->data)); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |