documentaiont update

This commit is contained in:
RundelhausCode 2021-03-26 14:03:02 +01:00
parent 1365c00c78
commit bcc69a88ad
2 changed files with 7 additions and 4 deletions

View File

@ -8,6 +8,9 @@ function isAdmin(): bool
return isset($_SESSION['admin']); return isset($_SESSION['admin']);
} }
/**
* @param string $userName
*/
function makeAdminLogin(string $userName) function makeAdminLogin(string $userName)
{ {
setcookie("userName", $userName, [ setcookie("userName", $userName, [

View File

@ -5,7 +5,8 @@
* @return string * @return string
*/ */
function ZipFileHandler(string $gameFileName, string $gameFileTmp){ function ZipFileHandler(string $gameFileName, string $gameFileTmp): string
{
$fileExtGame = explode('.', $gameFileName); $fileExtGame = explode('.', $gameFileName);
$fileActualExtGame = strtolower(end($fileExtGame)); $fileActualExtGame = strtolower(end($fileExtGame));
@ -25,7 +26,6 @@ function ZipFileHandler(string $gameFileName, string $gameFileTmp){
echo json_encode(["message" => "Wrong file type gameFile"]); echo json_encode(["message" => "Wrong file type gameFile"]);
exit(); exit();
} }
return NULL;
} }
/** /**
@ -33,7 +33,8 @@ return NULL;
* @param string $thumbnailFileTmp * @param string $thumbnailFileTmp
* @return string * @return string
*/ */
function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp){ function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp): string
{
$fileExtThumb = explode('.', $thumbnailFileName); $fileExtThumb = explode('.', $thumbnailFileName);
$fileActualExtThumb = strtolower(end($fileExtThumb)); $fileActualExtThumb = strtolower(end($fileExtThumb));
@ -53,5 +54,4 @@ function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp){
echo json_encode(["message" => "Wrong file type thumbnailFile"]); echo json_encode(["message" => "Wrong file type thumbnailFile"]);
exit(); exit();
} }
return NULL;
} }