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
3 changes: 1 addition & 2 deletions backend/src/Api/Local/TemplateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Twig\Environment;
use function PHPUnit\Framework\assertNotNull;

/**
* @codeCoverageIgnore
Expand Down Expand Up @@ -56,7 +55,7 @@ public function __construct(
public function basicTemplate(): Response
{
$newsletter = $this->em->getRepository(Newsletter::class)->find(1);
assertNotNull($newsletter);
assert($newsletter !== null);
$meta = $newsletter->getMeta();
$meta->address = '10 Rue de Penthievre, 75008 Paris, France';
//$meta->unsubscribe_text = 'Unsubscribe.';
Expand Down
3 changes: 1 addition & 2 deletions backend/src/Service/Template/TextTemplateRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use App\Entity\Issue;
use App\Entity\Send;
use App\Service\Content\ContentService;
use function PHPUnit\Framework\assertNotNull;

class TextTemplateRenderer
{
Expand All @@ -32,7 +31,7 @@ public function renderFromSend(Send $send): string

public function renderFromIssue(Issue $issue): string
{
assertNotNull($issue->getContent());
assert($issue->getContent() !== null);

$variables = $this->templateVariableService->variablesFromIssue($issue);

Expand Down