chore: flatten namespace
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Newsletter;
|
||||
namespace App\Service;
|
||||
|
||||
use App\Exception\NewsletterProviderException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Newsletter;
|
||||
|
||||
class NewsletterConfirmationResult
|
||||
{
|
||||
public const STATUS_CONFIRMED = 'confirmed';
|
||||
public const STATUS_INVALID = 'invalid';
|
||||
public const STATUS_EXPIRED = 'expired';
|
||||
public const STATUS_ALREADY_USED = 'already_used';
|
||||
|
||||
public function __construct(
|
||||
public readonly string $status,
|
||||
public readonly ?string $email = null,
|
||||
) {
|
||||
}
|
||||
|
||||
public function isSuccess(): bool
|
||||
{
|
||||
return self::STATUS_CONFIRMED === $this->status;
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -2,11 +2,12 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Newsletter;
|
||||
namespace App\Service;
|
||||
|
||||
use App\Email\Mailer;
|
||||
use App\Exception\NewsletterProviderException;
|
||||
use App\Entity\NewsletterOptInConfirmation;
|
||||
use App\Model\NewsletterConfirmationResult;
|
||||
use App\Repository\NewsletterOptInConfirmationRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
Reference in New Issue
Block a user