Skip to content

Commit ef7dba7

Browse files
authored
minor #329 [ci] php-cs-fixer it up
1 parent 564db7c commit ef7dba7

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

src/Command/ResetPasswordRemoveExpiredCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4242

4343
$intRemoved = $this->cleaner->handleGarbageCollection(true);
4444

45-
$output->writeln(sprintf('Garbage collection successful. Removed %s reset password request object(s).', $intRemoved));
45+
$output->writeln(\sprintf('Garbage collection successful. Removed %s reset password request object(s).', $intRemoved));
4646

4747
return 0;
4848
}

src/Model/ResetPasswordToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function getExpirationMessageData(): array
135135
public function getExpiresAtIntervalInstance(): \DateInterval
136136
{
137137
if (null === $this->generatedAt) {
138-
throw new \LogicException(sprintf('%s initialized without setting the $generatedAt timestamp.', self::class));
138+
throw new \LogicException(\sprintf('%s initialized without setting the $generatedAt timestamp.', self::class));
139139
}
140140

141141
$createdAtTime = \DateTimeImmutable::createFromFormat('U', (string) $this->generatedAt);

src/ResetPasswordHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function generateResetToken(object $user, ?int $resetRequestLifetime = nu
7272

7373
$resetRequestLifetime = $resetRequestLifetime ?? $this->resetRequestLifetime;
7474

75-
$expiresAt = new \DateTimeImmutable(sprintf('+%d seconds', $resetRequestLifetime));
75+
$expiresAt = new \DateTimeImmutable(\sprintf('+%d seconds', $resetRequestLifetime));
7676

7777
$generatedAt = ($expiresAt->getTimestamp() - $resetRequestLifetime);
7878

@@ -164,7 +164,7 @@ public function getTokenLifetime(): int
164164
public function generateFakeResetToken(?int $resetRequestLifetime = null): ResetPasswordToken
165165
{
166166
$resetRequestLifetime = $resetRequestLifetime ?? $this->resetRequestLifetime;
167-
$expiresAt = new \DateTimeImmutable(sprintf('+%d seconds', $resetRequestLifetime));
167+
$expiresAt = new \DateTimeImmutable(\sprintf('+%d seconds', $resetRequestLifetime));
168168

169169
$generatedAt = ($expiresAt->getTimestamp() - $resetRequestLifetime);
170170

tests/Fixtures/App/src/Controller/ResetPasswordController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function reset(Request $request, UserPasswordHasherInterface $passwordHas
101101
/** @var User $user */
102102
$user = $this->resetPasswordHelper->validateTokenAndFetchUser($token);
103103
} catch (ResetPasswordExceptionInterface $e) {
104-
$this->addFlash('reset_password_error', sprintf(
104+
$this->addFlash('reset_password_error', \sprintf(
105105
'%s - %s',
106106
$translator->trans(ResetPasswordExceptionInterface::MESSAGE_PROBLEM_VALIDATE, [], 'ResetPasswordBundle'),
107107
$translator->trans($e->getReason(), [], 'ResetPasswordBundle')

tests/FunctionalTests/ResetPasswordFunctionalTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testAppResetPasswordWorksInAWebApp(): void
3434

3535
// Copy over app fixtures that were "generated" by maker-bundle - we should replace this with make:reset-password like
3636
// we do above for make:user... reason for the fixtures: lazy
37-
$fixturesPath = sprintf('%s/tests/Fixtures/App', $this->appTestHelper->rootPath);
37+
$fixturesPath = \sprintf('%s/tests/Fixtures/App', $this->appTestHelper->rootPath);
3838
$this->appTestHelper->fs->mirror($fixturesPath, $appPath, options: ['override' => true]);
3939

4040
// Setup persistence

tests/UnitTests/Model/ResetPasswordRequestTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testORMAnnotationSetOnProperty(string $propertyName, string $exp
4040
$property = new \ReflectionProperty(ResetPasswordRequestTrait::class, $propertyName);
4141
$result = $property->getDocComment();
4242

43-
self::assertStringContainsString($expectedAnnotation, $result, sprintf('%s::%s does not contain "%s" in the docBlock.', ResetPasswordRequestTrait::class, $propertyName, $expectedAnnotation));
43+
self::assertStringContainsString($expectedAnnotation, $result, \sprintf('%s::%s does not contain "%s" in the docBlock.', ResetPasswordRequestTrait::class, $propertyName, $expectedAnnotation));
4444
}
4545

4646
public function isExpiredDataProvider(): \Generator

tests/UnitTests/Model/ResetPasswordTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testTranslations(int $lifetime, int $expectedInterval, string $u
4141
$token = new ResetPasswordToken('token', $expire, $created);
4242

4343
self::assertSame(
44-
sprintf('%%count%% %s|%%count%% %ss', $unitOfMeasure, $unitOfMeasure),
44+
\sprintf('%%count%% %s|%%count%% %ss', $unitOfMeasure, $unitOfMeasure),
4545
$token->getExpirationMessageKey()
4646
);
4747

0 commit comments

Comments
 (0)