diff --git a/Backend/Controllers/Admin/Admin.php b/Backend/Controllers/Admin/Admin.php index 097b9a2..51232d5 100644 --- a/Backend/Controllers/Admin/Admin.php +++ b/Backend/Controllers/Admin/Admin.php @@ -8,6 +8,9 @@ function isAdmin(): bool return isset($_SESSION['admin']); } +/** + * @param string $userName + */ function makeAdminLogin(string $userName) { setcookie("userName", $userName, [ diff --git a/Backend/Controllers/FileHandler/FileHandler.php b/Backend/Controllers/FileHandler/FileHandler.php index 5cbb8eb..e31cb14 100644 --- a/Backend/Controllers/FileHandler/FileHandler.php +++ b/Backend/Controllers/FileHandler/FileHandler.php @@ -5,7 +5,8 @@ * @return string */ -function ZipFileHandler(string $gameFileName, string $gameFileTmp){ +function ZipFileHandler(string $gameFileName, string $gameFileTmp): string +{ $fileExtGame = explode('.', $gameFileName); $fileActualExtGame = strtolower(end($fileExtGame)); @@ -25,7 +26,6 @@ function ZipFileHandler(string $gameFileName, string $gameFileTmp){ echo json_encode(["message" => "Wrong file type gameFile"]); exit(); } -return NULL; } /** @@ -33,7 +33,8 @@ return NULL; * @param string $thumbnailFileTmp * @return string */ -function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp){ +function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp): string +{ $fileExtThumb = explode('.', $thumbnailFileName); $fileActualExtThumb = strtolower(end($fileExtThumb)); @@ -53,5 +54,4 @@ function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp){ echo json_encode(["message" => "Wrong file type thumbnailFile"]); exit(); } - return NULL; } \ No newline at end of file