forked from ag_kommunikation/webseite
feat: Type hinting all the way.
This commit is contained in:
parent
aebb53e5c1
commit
590cbfbb65
@ -33,7 +33,7 @@ function prepare_message_body(string $message, string $name) {
|
||||
* mail(): Braucht auf dem Server einen korrekt konfigurierten Mailserver
|
||||
* phpmailer: Bibliothek, der per Composer installiert wird. Tut ganz gut mit SMTP.
|
||||
*/
|
||||
function send_message_to_office($subject, $message, $name, $email) {
|
||||
function send_message_to_office(string $subject, string $message, string $name, string $email) {
|
||||
return mail(
|
||||
getenv('WTF_CONTACT_TO'),
|
||||
"=?UTF-8?B?" . base64_encode($subject) . "?=",
|
||||
@ -48,7 +48,7 @@ function send_message_to_office($subject, $message, $name, $email) {
|
||||
);
|
||||
}
|
||||
|
||||
function send_response($response_data) {
|
||||
function send_response(array $response_data) {
|
||||
$json = json_encode($response_data);
|
||||
if ($json === false) {
|
||||
// Avoid echo of empty string (which is invalid JSON), and
|
||||
|
Loading…
Reference in New Issue
Block a user