aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Dispatcher.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-01-01 11:26:56 +0100
committerGravatar GitHub <noreply@github.com> 2022-01-01 11:26:56 +0100
commit3f6aa42b817145a3b00f4d615f87728b55c4413a (patch)
treee5b31941b0acc3a2f4c47e4846afcfe987b9852f /lib/Minz/Dispatcher.php
parent77e9877316fcfacb26799afdf32d94c8411da80e (diff)
Fix most PHPDocs errors (#4107)
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 https://phpstan.org/writing-php-code/phpdoc-types
Diffstat (limited to 'lib/Minz/Dispatcher.php')
-rw-r--r--lib/Minz/Dispatcher.php24
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/Minz/Dispatcher.php b/lib/Minz/Dispatcher.php
index b326d4b62..f2664cbe0 100644
--- a/lib/Minz/Dispatcher.php
+++ b/lib/Minz/Dispatcher.php
@@ -31,7 +31,7 @@ class Minz_Dispatcher {
/**
* Lance le controller indiqué dans Request
* Remplit le body de Response à partir de la Vue
- * @exception Minz_Exception
+ * @throws Minz_Exception
*/
public function run () {
do {
@@ -68,10 +68,9 @@ class Minz_Dispatcher {
/**
* Instancie le Controller
- * @param $base_name le nom du controller à instancier
- * @exception ControllerNotExistException le controller n'existe pas
- * @exception ControllerNotActionControllerException controller n'est
- * > pas une instance de ActionController
+ * @param string $base_name le nom du controller à instancier
+ * @throws Minz_ControllerNotExistException le controller n'existe pas
+ * @throws Minz_ControllerNotActionControllerException controller n'est pas une instance de ActionController
*/
private function createController ($base_name) {
if (self::isRegistered($base_name)) {
@@ -98,9 +97,8 @@ class Minz_Dispatcher {
/**
* Lance l'action sur le controller du dispatcher
- * @param $action_name le nom de l'action
- * @exception ActionException si on ne peut pas exécuter l'action sur
- * le controller
+ * @param string $action_name le nom de l'action
+ * @throws Minz_ActionException si on ne peut pas exécuter l'action sur le controller
*/
private function launchAction ($action_name) {
if (!is_callable (array (
@@ -122,8 +120,8 @@ class Minz_Dispatcher {
/**
* Register a controller file.
*
- * @param $base_name the base name of the controller (i.e. ./?c=<base_name>)
- * @param $base_path the base path where we should look into to find info.
+ * @param string $base_name the base name of the controller (i.e. ./?c=<base_name>)
+ * @param string $base_path the base path where we should look into to find info.
*/
public static function registerController($base_name, $base_path) {
if (!self::isRegistered($base_name)) {
@@ -134,8 +132,8 @@ class Minz_Dispatcher {
/**
* Return if a controller is registered.
*
- * @param $base_name the base name of the controller.
- * @return true if the controller has been registered, false else.
+ * @param string $base_name the base name of the controller.
+ * @return boolean true if the controller has been registered, false else.
*/
public static function isRegistered($base_name) {
return isset(self::$registrations[$base_name]);
@@ -144,7 +142,7 @@ class Minz_Dispatcher {
/**
* Load a controller file (include).
*
- * @param $base_name the base name of the controller.
+ * @param string $base_name the base name of the controller.
*/
private static function loadController($base_name) {
$base_path = self::$registrations[$base_name];