Add Larastan level 7 analysis
All checks were successful
Tests / Laravel tests (pull_request) Successful in 2m36s

This commit is contained in:
2026-06-03 22:09:33 +02:00
parent 53c4823b22
commit eb9c8796de
27 changed files with 341 additions and 71 deletions

View File

@@ -21,9 +21,9 @@ class NotifyTelegramAboutContactMessage implements ShouldQueue
protected string $userAgent;
protected string $email;
protected ?string $email;
protected string $phone;
protected ?string $phone;
public function __construct(string $name, string $message, string $ip, string $userAgent, ?string $email = null, ?string $phone = null)
{
@@ -35,7 +35,7 @@ class NotifyTelegramAboutContactMessage implements ShouldQueue
$this->phone = $phone;
}
public function handle()
public function handle(): void
{
$email = $this->email ?? '';
$phone = $this->phone ?? '';

View File

@@ -14,27 +14,30 @@ class NotifyTelegramAboutPersonaliaClick implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $personalia;
protected Personalia $personalia;
protected $ip;
protected ?string $ip;
protected $userAgent;
protected ?string $userAgent;
public function __construct(Personalia $personalia, $ip, $userAgent)
public function __construct(Personalia $personalia, ?string $ip, ?string $userAgent)
{
$this->personalia = $personalia;
$this->ip = $ip;
$this->userAgent = $userAgent;
}
public function handle()
public function handle(): void
{
$ip = $this->ip ?? '';
$userAgent = $this->userAgent ?? '';
$message = <<<TEXT
👤 *Persoonlijke gegevens bekeken*
Naam: {$this->personalia->value}
IP: {$this->ip}
User Agent: `{$this->userAgent}`
IP: {$ip}
User Agent: `{$userAgent}`
📅 Tijdstip: *{now()->format('d-m-Y H:i')}*
TEXT;