mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-18 02:36:11 +00:00
:octocat: switch phan for phpstan (see #277)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user