strikt types

This commit is contained in:
Troy Grunt
2026-02-15 14:45:02 +01:00
parent a093603c3c
commit cd031464e6
13 changed files with 77 additions and 69 deletions

View File

@@ -1,5 +1,7 @@
<?php
function send_mail($an, $betreff, $text, $ok = '', $error = '') {
declare(strict_types=1);
function send_mail(string $an, string $betreff, string $text, string $ok = '', string $error = ''): void {
global $absender;
$sender = 'noreply@troy-grunt.de';
if(isset($absender) && $absender) {
@@ -23,7 +25,7 @@ function send_mail($an, $betreff, $text, $ok = '', $error = '') {
}
}
function send_html_mail($an, $betreff, $text, $ok = '', $error = '') {
function send_html_mail(string $an, string $betreff, string $text, string $ok = '', string $error = ''): void {
global $absender;
$sender = 'noreply@troy-grunt.de';
if(isset($absender) && $absender) {
@@ -57,7 +59,7 @@ function send_html_mail($an, $betreff, $text, $ok = '', $error = '') {
}
}
function send_php_mail($an, $betreff, $text, $ok = '', $error = '') {
function send_php_mail(string $an, string $betreff, string $text, string $ok = '', string $error = ''): void {
global $_sendermail;
$sender = 'noreply@troy-grunt.de';
if (isset ( $_sendermail )) {
@@ -78,4 +80,4 @@ function send_php_mail($an, $betreff, $text, $ok = '', $error = '') {
echo 'Message sent!';
}
}
?>
?>