Return types

This commit is contained in:
2024-07-22 02:36:28 +02:00
parent af588ab174
commit 2168e37413
12 changed files with 35 additions and 46 deletions
+2 -2
View File
@@ -12,13 +12,13 @@ class Response
return SimpleRouter::response();
}
public static function json($value, int $options = 0, int $dept = 512)
public static function json($value, int $options = 0, int $dept = 512): void
{
if (is_bool($value)) {
Response::response()->header('Content-Type: application/json; charset=utf-8');
echo json_encode($value, $options, $dept);
exit(0);
}
return SimpleRouter::response()->json($value, $options, $dept);
SimpleRouter::response()->json($value, $options, $dept);
}
}