@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $this->app->bind(P256EncryptedMessageBuilderContract::class, P256EncryptedMessageBuilder::class); |
| 25 | 25 | $this->app->bind(P256EncryptedMessageContract::class, P256EncryptedMessage::class); |
| 26 | 26 | $this->app->bind(JWTGeneratorContract::class, JWTGenerator::class); |
| 27 | - $this->app->bind(EC::class, function () { |
|
| 27 | + $this->app->bind(EC::class, function() { |
|
| 28 | 28 | return new EC('p256'); |
| 29 | 29 | }); |
| 30 | 30 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function willExpireIn(int $time): JWTGeneratorContract |
| 76 | 76 | { |
| 77 | - $this->expires_as = time()+$time; |
|
| 77 | + $this->expires_as = time() + $time; |
|
| 78 | 78 | |
| 79 | 79 | return $this; |
| 80 | 80 | } |
@@ -85,11 +85,11 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function getPayload(): string |
| 87 | 87 | { |
| 88 | - if( !$this->audience ){ |
|
| 88 | + if (!$this->audience) { |
|
| 89 | 89 | throw new \Exception('No audience set'); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if( !$this->expires_as ){ |
|
| 92 | + if (!$this->expires_as) { |
|
| 93 | 93 | $this->willExpireIn($this->getConfigVariable('expiration', Constants::DEFAULT_EXPIRE)); |
| 94 | 94 | } |
| 95 | 95 | |
@@ -175,6 +175,6 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | private function getConfigVariable(string $key, $default = null) |
| 177 | 177 | { |
| 178 | - return $this->config_repository->get(Constants::CONFIG_KEY.'.'.$key, $default); |
|
| 178 | + return $this->config_repository->get(Constants::CONFIG_KEY . '.' . $key, $default); |
|
| 179 | 179 | } |
| 180 | 180 | } |