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 sendToTroy($data) {
declare(strict_types=1);
function sendToTroy(array $data): string|false {
$url = 'https://troy-grunt.de/api.php';
$options = array (
'http' => array (
@@ -14,7 +16,7 @@ function sendToTroy($data) {
return file_get_contents ( $url, false, $context );
}
function sendToGitea($title, $message) {
function sendToGitea(string $title, string $message): array|null {
// secret.php liegt in lib/
require 'secret.php';