Skip to content

Commit

Permalink
[ci] php-cs-fixer it up (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed Feb 20, 2024
1 parent b79a28c commit df64d82
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Exception/TooManyPasswordRequestsException.php
Expand Up @@ -16,7 +16,7 @@ final class TooManyPasswordRequestsException extends \Exception implements Reset
{
private $availableAt;

public function __construct(\DateTimeInterface $availableAt, string $message = '', int $code = 0, \Throwable $previous = null)
public function __construct(\DateTimeInterface $availableAt, string $message = '', int $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);

Expand Down
2 changes: 1 addition & 1 deletion src/Generator/ResetPasswordTokenGenerator.php
Expand Up @@ -43,7 +43,7 @@ public function __construct(string $signingKey, ResetPasswordRandomGenerator $ge
* @param mixed $userId Unique user identifier
* @param string $verifier Only required for token comparison
*/
public function createToken(\DateTimeInterface $expiresAt, $userId, string $verifier = null): ResetPasswordTokenComponents
public function createToken(\DateTimeInterface $expiresAt, $userId, ?string $verifier = null): ResetPasswordTokenComponents
{
if (null === $verifier) {
$verifier = $this->randomGenerator->getRandomAlphaNumStr();
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ResetPasswordToken.php
Expand Up @@ -35,7 +35,7 @@ final class ResetPasswordToken
*/
private $transInterval = 0;

public function __construct(string $token, \DateTimeInterface $expiresAt, int $generatedAt = null)
public function __construct(string $token, \DateTimeInterface $expiresAt, ?int $generatedAt = null)
{
$this->token = $token;
$this->expiresAt = $expiresAt;
Expand Down
4 changes: 2 additions & 2 deletions src/ResetPasswordHelper.php
Expand Up @@ -60,7 +60,7 @@ public function __construct(ResetPasswordTokenGenerator $generator, ResetPasswor
*
* @throws TooManyPasswordRequestsException
*/
public function generateResetToken(object $user, int $resetRequestLifetime = null): ResetPasswordToken
public function generateResetToken(object $user, ?int $resetRequestLifetime = null): ResetPasswordToken
{
$this->resetPasswordCleaner->handleGarbageCollection();

Expand Down Expand Up @@ -159,7 +159,7 @@ public function getTokenLifetime(): int
*
* This method should not be used when timing attacks are a concern.
*/
public function generateFakeResetToken(int $resetRequestLifetime = null): ResetPasswordToken
public function generateFakeResetToken(?int $resetRequestLifetime = null): ResetPasswordToken
{
$resetRequestLifetime = $resetRequestLifetime ?? $this->resetRequestLifetime;
$expiresAt = new \DateTimeImmutable(sprintf('+%d seconds', $resetRequestLifetime));
Expand Down
2 changes: 1 addition & 1 deletion tests/ResetPasswordTestKernel.php
Expand Up @@ -36,7 +36,7 @@ class ResetPasswordTestKernel extends Kernel
* @param array $routes Routes to be added to the container e.g. ['name' => 'path']
* @param BundleInterface[] $bundles Additional bundles to be registered e.g. [new Bundle()]
*/
public function __construct(ContainerBuilder $builder = null, array $routes = [], array $bundles = [])
public function __construct(?ContainerBuilder $builder = null, array $routes = [], array $bundles = [])
{
$this->builder = $builder;
$this->routes = $routes;
Expand Down

0 comments on commit df64d82

Please sign in to comment.