chore: cleanup, add PHPStan type annotations

This commit is contained in:
Björn Fromme
2026-04-03 13:45:41 +02:00
parent a264526127
commit fce6d1615a
14 changed files with 91 additions and 41 deletions
+15
View File
@@ -14,6 +14,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class Mailer
{
/**
* @param array<string, mixed> $defaults
*/
public function __construct(
private readonly MailerInterface $mailer,
private readonly BodyRendererInterface $bodyRenderer,
@@ -22,6 +25,10 @@ class Mailer
) {
}
/**
* @param array<string, mixed> $context
* @param array<string, mixed> $options
*/
public function createAndSendEmail(array $context, array $options): void
{
$config = $this->resolveConfig($options);
@@ -35,6 +42,10 @@ class Mailer
}
}
/**
* @param array<string, mixed> $context
* @param array<string, mixed> $config
*/
public function create(array $context, array $config): TemplatedEmail
{
$email = (new TemplatedEmail())
@@ -73,6 +84,10 @@ class Mailer
}
}
/**
* @param array<string, mixed> $options
* @return array<string, mixed>
*/
private function resolveConfig(array $options): array
{
$resolver = new OptionsResolver();