|
1 | 1 | <?php |
| 2 | +declare(strict_types=1); |
2 | 3 |
|
3 | 4 | namespace Flownative\OAuth2\Client; |
4 | 5 |
|
@@ -472,10 +473,10 @@ public function renderFinishAuthorizationUri(): string |
472 | 473 | $this->uriBuilder->setCreateAbsoluteUri(true); |
473 | 474 |
|
474 | 475 | try { |
475 | | - $uri = $this->uriBuilder-> |
476 | | - reset()-> |
477 | | - setCreateAbsoluteUri(true)-> |
478 | | - uriFor('finishAuthorization', ['serviceType' => $this->getServiceType(), 'serviceName' => $this->getServiceName()], 'OAuth', 'Flownative.OAuth2.Client'); |
| 476 | + $uri = $this->uriBuilder |
| 477 | + ->reset() |
| 478 | + ->setCreateAbsoluteUri(true) |
| 479 | + ->uriFor('finishAuthorization', ['serviceType' => $this->getServiceType(), 'serviceName' => $this->getServiceName()], 'OAuth', 'Flownative.OAuth2.Client'); |
479 | 480 | return $uri; |
480 | 481 | } catch (MissingActionNameException $e) { |
481 | 482 | return ''; |
@@ -527,13 +528,12 @@ protected function removeExpiredAuthorizations(): void |
527 | 528 | */ |
528 | 529 | public function shutdownObject(): void |
529 | 530 | { |
530 | | - $decimals = (integer)strlen(strrchr($this->garbageCollectionProbability, '.')) - 1; |
| 531 | + $decimals = strlen(strrchr($this->garbageCollectionProbability, '.')) - 1; |
531 | 532 | $factor = ($decimals > -1) ? $decimals * 10 : 1; |
532 | 533 | try { |
533 | 534 | if (random_int(1, 100 * $factor) <= ($this->garbageCollectionProbability * $factor)) { |
534 | 535 | $this->removeExpiredAuthorizations(); |
535 | 536 | } |
536 | | - } catch (InvalidQueryException $e) { |
537 | 537 | } catch (\Exception $e) { |
538 | 538 | } |
539 | 539 | } |
|
0 commit comments