@@ -273,8 +273,8 @@ discard block |
||
| 273 | 273 | $encodedSecret = Base32::encode($secret); |
| 274 | 274 | $totp = TOTP::create( |
| 275 | 275 | $encodedSecret, |
| 276 | - 30, // 30 second window |
|
| 277 | - 'sha256', // SHA256 for the hashing algorithm |
|
| 276 | + 30, // 30 second window |
|
| 277 | + 'sha256', // SHA256 for the hashing algorithm |
|
| 278 | 278 | 6 // 6 digits |
| 279 | 279 | ); |
| 280 | 280 | $totp->setLabel($this->username); |
@@ -328,8 +328,8 @@ discard block |
||
| 328 | 328 | { |
| 329 | 329 | $totp = TOTP::create( |
| 330 | 330 | $this->otp_secret, |
| 331 | - 30, // 30 second window |
|
| 332 | - 'sha256', // SHA256 for the hashing algorithm |
|
| 331 | + 30, // 30 second window |
|
| 332 | + 'sha256', // SHA256 for the hashing algorithm |
|
| 333 | 333 | 6 // 6 digits |
| 334 | 334 | ); |
| 335 | 335 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | parent::init(); |
| 52 | 52 | $this->client = new Client($this->clientOptions); |
| 53 | 53 | |
| 54 | - $this->client->on(Client::EVENT_BEFORE_SEND, function (RequestEvent $e) { |
|
| 54 | + $this->client->on(Client::EVENT_BEFORE_SEND, function(RequestEvent $e) { |
|
| 55 | 55 | Yii::debug([ |
| 56 | 56 | 'message' => sprintf('Sending HTTP request [%s] %s', $e->request->getMethod(), $e->request->getFullUrl()), |
| 57 | 57 | 'data' => $e->request->getData(), |
@@ -59,10 +59,10 @@ discard block |
||
| 59 | 59 | ], 'yrc\components\HttpClientComponent:beforeSendEvent'); |
| 60 | 60 | }); |
| 61 | 61 | |
| 62 | - $this->client->on(Client::EVENT_AFTER_SEND, function (RequestEvent $e) { |
|
| 62 | + $this->client->on(Client::EVENT_AFTER_SEND, function(RequestEvent $e) { |
|
| 63 | 63 | Yii::debug([ |
| 64 | 64 | 'message' => sprintf('Recieved HTTP response HTTP [%s] | [%s] %s', $e->response->getStatusCode(), $e->request->getMethod(), $e->request->getFullUrl()), |
| 65 | - 'data' => (function () use ($e) { |
|
| 65 | + 'data' => (function() use ($e) { |
|
| 66 | 66 | $content = $e->response->getContent(); |
| 67 | 67 | if (preg_match('~[^\x20-\x7E\t\r\n]~', $content) > 0) { |
| 68 | 68 | return '[binary data]'; |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | { |
| 123 | 123 | $access = [ |
| 124 | 124 | 'class' => AccessControl::class, |
| 125 | - 'denyCallback' => function ($rule, $action) { |
|
| 125 | + 'denyCallback' => function($rule, $action) { |
|
| 126 | 126 | throw new ForbiddenHttpException(Yii::t('yrc', 'You do not have permission to access this resource')); |
| 127 | 127 | } |
| 128 | 128 | ]; |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * Returns the decrypted body |
| 59 | 59 | * @return string |
| 60 | 60 | */ |
| 61 | - public function getDecryptedBody() :? string |
|
| 61 | + public function getDecryptedBody() : ? string |
|
| 62 | 62 | { |
| 63 | 63 | $rawContentType = $this->getContentType(); |
| 64 | 64 | |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | * |
| 28 | 28 | * @return string |
| 29 | 29 | */ |
| 30 | - public function getDecryptedBody() :? string |
|
| 30 | + public function getDecryptedBody() : ? string |
|
| 31 | 31 | { |
| 32 | 32 | return $this->decryptedBody; |
| 33 | 33 | } |