Skip to content

Commit d4742e8

Browse files
revert changed argument name
1 parent 764412d commit d4742e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Grant/DeviceCodeGrant.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(
5151
RefreshTokenRepositoryInterface $refreshTokenRepository,
5252
private DateInterval $deviceCodeTTL,
5353
string $verificationUri,
54-
private readonly int $defaultInterval = 5
54+
private readonly int $retryInterval = 5
5555
) {
5656
$this->setDeviceCodeRepository($deviceCodeRepository);
5757
$this->setRefreshTokenRepository($refreshTokenRepository);
@@ -220,7 +220,7 @@ protected function validateDeviceCode(ServerRequestInterface $request, ClientEnt
220220

221221
private function deviceCodePolledTooSoon(?DateTimeImmutable $lastPoll): bool
222222
{
223-
return $lastPoll !== null && $lastPoll->getTimestamp() + $this->defaultInterval > time();
223+
return $lastPoll !== null && $lastPoll->getTimestamp() + $this->retryInterval > time();
224224
}
225225

226226
/**
@@ -264,7 +264,7 @@ protected function issueDeviceCode(
264264
$deviceCode->setExpiryDateTime((new DateTimeImmutable())->add($deviceCodeTTL));
265265
$deviceCode->setClient($client);
266266
$deviceCode->setVerificationUri($verificationUri);
267-
$deviceCode->setInterval($this->defaultInterval);
267+
$deviceCode->setInterval($this->retryInterval);
268268

269269
foreach ($scopes as $scope) {
270270
$deviceCode->addScope($scope);

0 commit comments

Comments
 (0)