Skip to content

Commit 6656940

Browse files
committed
Some code tweaks
1 parent f3d26ad commit 6656940

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Classes/OAuthClient.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
declare(strict_types=1);
23

34
namespace Flownative\OAuth2\Client;
45

@@ -472,10 +473,10 @@ public function renderFinishAuthorizationUri(): string
472473
$this->uriBuilder->setCreateAbsoluteUri(true);
473474

474475
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');
479480
return $uri;
480481
} catch (MissingActionNameException $e) {
481482
return '';
@@ -527,13 +528,12 @@ protected function removeExpiredAuthorizations(): void
527528
*/
528529
public function shutdownObject(): void
529530
{
530-
$decimals = (integer)strlen(strrchr($this->garbageCollectionProbability, '.')) - 1;
531+
$decimals = strlen(strrchr($this->garbageCollectionProbability, '.')) - 1;
531532
$factor = ($decimals > -1) ? $decimals * 10 : 1;
532533
try {
533534
if (random_int(1, 100 * $factor) <= ($this->garbageCollectionProbability * $factor)) {
534535
$this->removeExpiredAuthorizations();
535536
}
536-
} catch (InvalidQueryException $e) {
537537
} catch (\Exception $e) {
538538
}
539539
}

0 commit comments

Comments
 (0)