Teilnahmerechnungen erstellen

This commit is contained in:
2026-09-03 00:08:46 +02:00
parent a61344395a
commit 9c4c28e566
79 changed files with 4303 additions and 75 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace App\Support;
/**
* Zustandslose Helfer rund um Texteingaben.
*/
final class Text
{
/**
* Leergelassene Eingaben als NULL, sonst getrimmt.
*
* Optionale Felder aus Formularen kommen als Leerstring statt als NULL an. In der Datenbank
* gespeichert würden sie später als "vorhanden, aber leer" gelten -- im Briefkopf einer Rechnung
* etwa als leere Zeile oder als Beschriftung ohne Wert.
*
* Laravels `blank()` erkennt auch reine Whitespace-Eingaben.
*/
public static function nullIfBlank(?string $value): ?string
{
return blank($value) ? null : trim($value);
}
}