Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Entity/BlockedEmailAddressHash.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class BlockedEmailAddressHash implements BlockedEmailAddressHashInterface

public static function fromEmailAddress(
EmailAddress $emailAddress,
DateTimeImmutable $blockDate = null
?DateTimeImmutable $blockDate = null
): BlockedEmailAddressHashInterface {
return new self($emailAddress->getHash(), $blockDate);
}

public function __construct(string $hash, DateTimeImmutable $blockDate = null)
public function __construct(string $hash, ?DateTimeImmutable $blockDate = null)
{
$this->hash = $hash;
$this->blockDate = $blockDate ?? new DateTimeImmutable();
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/BlockedEmailAddressHashInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

interface BlockedEmailAddressHashInterface
{
public static function fromEmailAddress(EmailAddress $emailAddress, DateTimeImmutable $blockDate = null): self;
public static function fromEmailAddress(EmailAddress $emailAddress, ?DateTimeImmutable $blockDate = null): self;

public function getBlockedUntilDate(DateInterval $blockDuration): DateTimeImmutable;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class EmailAddressCanNotBeHashedWithoutSecretException extends WebfactoryNewsletterRegistrationException
{
public function __construct(EmailAddress $emailAddress, $code = 0, Throwable $previous = null)
public function __construct(EmailAddress $emailAddress, $code = 0, ?Throwable $previous = null)
{
parent::__construct(
'The email address "'.$emailAddress->getEmailAddress().'" could not be hashed as this email '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct(
EmailAddress $emailAddress,
PendingOptInInterface $pendingOptIn,
$code = 0,
Throwable $previous = null
?Throwable $previous = null
) {
parent::__construct(
'The email address "'.$emailAddress->getEmailAddress().'" does not correspond to the hash of the '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class PendingOptInClassCouldNotBeDeterminedException extends WebfactoryNewsletterRegistrationException
{
public function __construct($code = 0, Throwable $previous = null)
public function __construct($code = 0, ?Throwable $previous = null)
{
parent::__construct(
'We were unable to determine your '.RecipientInterface::class.' implementation. Consider replacing'
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/PendingOptInIsOutdatedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class PendingOptInIsOutdatedException extends WebfactoryNewsletterRegistrationException
{
public function __construct(PendingOptInInterface $pendingOptIn, $code = 0, Throwable $previous = null)
public function __construct(PendingOptInInterface $pendingOptIn, $code = 0, ?Throwable $previous = null)
{
parent::__construct(
'The PendingOptIn with uuid '.$pendingOptIn->getUuid().' is outdated and can no longer be '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class RecipientClassCouldNotBeDeterminedException extends WebfactoryNewsletterRegistrationException
{
public function __construct($code = 0, Throwable $previous = null)
public function __construct($code = 0, ?Throwable $previous = null)
{
parent::__construct(
'We were unable to determine your '.RecipientInterface::class.' implementation. Consider replacing'
Expand Down
2 changes: 1 addition & 1 deletion src/StartRegistration/HoneypotType.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class HoneypotType extends AbstractType
protected TranslatorInterface $translator;
protected LoggerInterface $logger;

public function __construct(TranslatorInterface $translator, LoggerInterface $logger = null)
public function __construct(TranslatorInterface $translator, ?LoggerInterface $logger = null)
{
$this->translator = $translator;
$this->logger = $logger ?: new NullLogger();
Expand Down
Loading