strikt types
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user