:octocat: switch phan for phpstan (see #277)

This commit is contained in:
smiley
2024-07-21 05:25:26 +02:00
parent f65d9d2815
commit 89cdd09044
72 changed files with 539 additions and 217 deletions
+9 -11
View File
@@ -13,6 +13,15 @@ use chillerlan\QRCode\Data\QRMatrix;
require_once '../vendor/autoload.php';
/**
* @param array<string, mixed> $response
*/
function sendResponse(array $response):never{
header('Content-type: application/json;charset=utf-8;');
echo json_encode($response);
exit;
}
try{
$moduleValues = [
@@ -89,14 +98,3 @@ catch(Throwable $e){
header('HTTP/1.1 500 Internal Server Error');
sendResponse(['error' => $e->getMessage()]);
}
exit;
/**
* @param array $response
*/
function sendResponse(array $response){
header('Content-type: application/json;charset=utf-8;');
echo json_encode($response);
exit;
}