From 161f74f6bdf4367d2e9f90ac7f491012fc44d404 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Fri, 29 Nov 2024 18:47:18 +0200 Subject: [PATCH] Cleans up the phpdoc comments --- app/classes/host.php | 3 ++- app/classes/log.php | 5 +++-- app/classes/participant.php | 3 ++- app/classes/platform.php | 3 ++- app/classes/server.php | 3 ++- app/classes/user.php | 3 ++- app/helpers/errors.php | 1 + 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/classes/host.php b/app/classes/host.php index 32d3b34..677c23f 100644 --- a/app/classes/host.php +++ b/app/classes/host.php @@ -13,8 +13,9 @@ class Host { /** * Host constructor. + * Initializes the database connection. * - * @param Database $database The database connection object. + * @param object $database The database object to initialize the connection. */ public function __construct($database) { $this->db = $database->getConnection(); diff --git a/app/classes/log.php b/app/classes/log.php index c4a1859..324a8d5 100644 --- a/app/classes/log.php +++ b/app/classes/log.php @@ -12,9 +12,10 @@ class Log { private $db; /** - * Constructor to initialize the database connection. + * Logs constructor. + * Initializes the database connection. * - * @param object $database An object providing the database connection. + * @param object $database The database object to initialize the connection. */ public function __construct($database) { $this->db = $database->getConnection(); diff --git a/app/classes/participant.php b/app/classes/participant.php index 2043819..c15381f 100644 --- a/app/classes/participant.php +++ b/app/classes/participant.php @@ -14,8 +14,9 @@ class Participant { /** * Constructor + * Initializes the database connection. * - * @param object $database Database instance to retrieve a connection. + * @param object $database The database object to initialize the connection. */ public function __construct($database) { $this->db = $database->getConnection(); diff --git a/app/classes/platform.php b/app/classes/platform.php index fe5e60c..8bd55aa 100644 --- a/app/classes/platform.php +++ b/app/classes/platform.php @@ -13,8 +13,9 @@ class Platform { /** * Platform constructor. + * Initializes the database connection. * - * @param Database $database The database connection object. + * @param object $database The database object to initialize the connection. */ public function __construct($database) { $this->db = $database->getConnection(); diff --git a/app/classes/server.php b/app/classes/server.php index b33c589..3000b6b 100644 --- a/app/classes/server.php +++ b/app/classes/server.php @@ -13,8 +13,9 @@ class Server { /** * Server constructor. + * Initializes the database connection. * - * @param object $database An instance of a database connection handler. + * @param object $database The database object to initialize the connection. */ public function __construct($database) { $this->db = $database->getConnection(); diff --git a/app/classes/user.php b/app/classes/user.php index b12d7f8..bc66c60 100644 --- a/app/classes/user.php +++ b/app/classes/user.php @@ -13,8 +13,9 @@ class User { /** * User constructor. + * Initializes the database connection. * - * @param object $database Database instance to retrieve a connection. + * @param object $database The database object to initialize the connection. */ public function __construct($database) { $this->db = $database->getConnection(); diff --git a/app/helpers/errors.php b/app/helpers/errors.php index ec8416b..2dfbfb1 100644 --- a/app/helpers/errors.php +++ b/app/helpers/errors.php @@ -9,6 +9,7 @@ * @param string $message A user-friendly message to display. * @param string $error The detailed error message for debugging (optional). * @param string|null $environment The environment type ('production', 'development', etc.). If null, defaults to the configured environment. + * * @return string The appropriate message based on the environment. */ function getError($message, $error = '', $environment = null) {