Cleans up the phpdoc comments

main
Yasen Pramatarov 2024-11-29 19:06:27 +02:00
parent 7add95dd1b
commit eb998a555b
7 changed files with 27 additions and 1 deletions

View File

@ -50,6 +50,7 @@ class Database {
}
}
/**
* Establishes a connection to a SQLite database.
*
@ -80,6 +81,7 @@ class Database {
}
}
/**
* Establishes a connection to a MySQL (or MariaDB) database.
*
@ -113,6 +115,7 @@ class Database {
}
}
/**
* Retrieves the current PDO connection instance.
*

View File

@ -21,6 +21,7 @@ class Host {
$this->db = $database->getConnection();
}
/**
* Get details of a specified host ID (or all hosts) in a specified platform ID.
*
@ -91,6 +92,7 @@ class Host {
}
}
/**
* Edit an existing host in the database.
*

View File

@ -21,6 +21,7 @@ class Log {
$this->db = $database->getConnection();
}
/**
* Insert a log event into the database.
*
@ -51,6 +52,7 @@ class Log {
}
}
/**
* Retrieve log entries from the database.
*

View File

@ -21,6 +21,7 @@ class Platform {
$this->db = $database->getConnection();
}
/**
* Retrieve details of a specific platform or all platforms.
*
@ -43,6 +44,7 @@ class Platform {
return $query->fetchAll(PDO::FETCH_ASSOC);
}
/**
* Add a new platform to the database.
*
@ -74,6 +76,7 @@ class Platform {
}
}
/**
* Edit an existing platform in the database.
*
@ -109,6 +112,7 @@ class Platform {
}
}
/**
* Delete a platform from the database.
*
@ -133,7 +137,6 @@ class Platform {
}
}
}
?>

View File

@ -12,6 +12,7 @@ class Router {
*/
private $routes = [];
/**
* Adds a new route to the router.
*
@ -24,6 +25,7 @@ class Router {
$this->routes[$pattern] = $callback;
}
/**
* Dispatches a request to the appropriate route callback.
*
@ -49,6 +51,7 @@ class Router {
echo '404 page not found';
}
/**
* Invokes the callback for a matched route.
*

View File

@ -21,6 +21,7 @@ class Server {
$this->db = $database->getConnection();
}
/**
* Checks the status of a Jilo server by sending a GET request to its health endpoint.
*

View File

@ -21,6 +21,7 @@ class User {
$this->db = $database->getConnection();
}
/**
* Registers a new user.
*
@ -77,6 +78,7 @@ class User {
}
}
/**
* Logs in a user by verifying credentials.
*
@ -100,6 +102,7 @@ class User {
}
}
/**
* Retrieves a user ID based on the username.
*
@ -119,6 +122,7 @@ class User {
}
/**
* Fetches user details by user ID.
*
@ -146,6 +150,7 @@ class User {
}
/**
* Grants a user a specific right.
*
@ -166,6 +171,7 @@ class User {
]);
}
/**
* Revokes a specific right from a user.
*
@ -187,6 +193,7 @@ class User {
]);
}
/**
* Retrieves all rights in the system.
*
@ -205,6 +212,7 @@ class User {
}
/**
* Retrieves the rights assigned to a specific user.
*
@ -267,6 +275,7 @@ class User {
}
/**
* Check if the user has a specific right.
*
@ -295,6 +304,7 @@ class User {
}
/**
* Updates a user's metadata in the database.
*
@ -332,6 +342,7 @@ class User {
}
/**
* Removes a user's avatar from the database and deletes the associated file.
*
@ -364,6 +375,7 @@ class User {
}
/**
* Updates a user's avatar by uploading a new file and saving its path in the database.
*