@@ -490,7 +490,7 @@ |
||
| 490 | 490 | * handling applied. If the $mode and $options parameters are not |
| 491 | 491 | * specified, the object's defaults are used. |
| 492 | 492 | * |
| 493 | - * @param mixed $message a text error message or a PEAR error object |
|
| 493 | + * @param string|null $message a text error message or a PEAR error object |
|
| 494 | 494 | * |
| 495 | 495 | * @param int $code a numeric error code (it is up to your class |
| 496 | 496 | * to define these if you want to use codes) |
@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | /**#@+ |
| 29 | 29 | * ERROR constants |
| 30 | 30 | */ |
| 31 | -define('references_PEAR_ERROR_RETURN', 1); |
|
| 32 | -define('references_PEAR_ERROR_PRINT', 2); |
|
| 33 | -define('references_PEAR_ERROR_TRIGGER', 4); |
|
| 34 | -define('references_PEAR_ERROR_DIE', 8); |
|
| 35 | -define('references_PEAR_ERROR_CALLBACK', 16); |
|
| 31 | +define('references_PEAR_ERROR_RETURN', 1); |
|
| 32 | +define('references_PEAR_ERROR_PRINT', 2); |
|
| 33 | +define('references_PEAR_ERROR_TRIGGER', 4); |
|
| 34 | +define('references_PEAR_ERROR_DIE', 8); |
|
| 35 | +define('references_PEAR_ERROR_CALLBACK', 16); |
|
| 36 | 36 | /** |
| 37 | 37 | * WARNING: obsolete |
| 38 | 38 | * @deprecated |
@@ -44,12 +44,12 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | if (substr(PHP_OS, 0, 3) == 'WIN') { |
| 46 | 46 | define('references_OS_WINDOWS', true); |
| 47 | - define('references_OS_UNIX', false); |
|
| 48 | - define('references_PEAR_OS', 'Windows'); |
|
| 47 | + define('references_OS_UNIX', false); |
|
| 48 | + define('references_PEAR_OS', 'Windows'); |
|
| 49 | 49 | } else { |
| 50 | 50 | define('references_OS_WINDOWS', false); |
| 51 | - define('references_OS_UNIX', true); |
|
| 52 | - define('references_PEAR_OS', 'Unix'); // blatant assumption |
|
| 51 | + define('references_OS_UNIX', true); |
|
| 52 | + define('references_PEAR_OS', 'Unix'); // blatant assumption |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | // instant backwards compatibility |
@@ -460,9 +460,9 @@ discard block |
||
| 460 | 460 | // $error_code is a non-empty array here; |
| 461 | 461 | // we walk through it trying to unset all |
| 462 | 462 | // values |
| 463 | - foreach($error_code as $key => $error) { |
|
| 463 | + foreach ($error_code as $key => $error) { |
|
| 464 | 464 | if ($this->_checkDelExpect($error)) { |
| 465 | - $deleted = true; |
|
| 465 | + $deleted = true; |
|
| 466 | 466 | } else { |
| 467 | 467 | $deleted = false; |
| 468 | 468 | } |
@@ -870,7 +870,7 @@ discard block |
||
| 870 | 870 | unset($this->backtrace[0]['object']); |
| 871 | 871 | } |
| 872 | 872 | } |
| 873 | - if ($mode & references_PEAR_ERROR_CALLBACK) { |
|
| 873 | + if ($mode&references_PEAR_ERROR_CALLBACK) { |
|
| 874 | 874 | $this->level = E_USER_NOTICE; |
| 875 | 875 | $this->callback = $options; |
| 876 | 876 | } else { |
@@ -880,7 +880,7 @@ discard block |
||
| 880 | 880 | $this->level = $options; |
| 881 | 881 | $this->callback = null; |
| 882 | 882 | } |
| 883 | - if ($this->mode & references_PEAR_ERROR_PRINT) { |
|
| 883 | + if ($this->mode&references_PEAR_ERROR_PRINT) { |
|
| 884 | 884 | if (is_null($options) || is_int($options)) { |
| 885 | 885 | $format = "%s"; |
| 886 | 886 | } else { |
@@ -888,10 +888,10 @@ discard block |
||
| 888 | 888 | } |
| 889 | 889 | printf($format, $this->getMessage()); |
| 890 | 890 | } |
| 891 | - if ($this->mode & references_PEAR_ERROR_TRIGGER) { |
|
| 891 | + if ($this->mode&references_PEAR_ERROR_TRIGGER) { |
|
| 892 | 892 | trigger_error($this->getMessage(), $this->level); |
| 893 | 893 | } |
| 894 | - if ($this->mode & references_PEAR_ERROR_DIE) { |
|
| 894 | + if ($this->mode&references_PEAR_ERROR_DIE) { |
|
| 895 | 895 | $msg = $this->getMessage(); |
| 896 | 896 | if (is_null($options) || is_int($options)) { |
| 897 | 897 | $format = "%s"; |
@@ -903,12 +903,12 @@ discard block |
||
| 903 | 903 | } |
| 904 | 904 | die(sprintf($format, $msg)); |
| 905 | 905 | } |
| 906 | - if ($this->mode & references_PEAR_ERROR_CALLBACK) { |
|
| 906 | + if ($this->mode&references_PEAR_ERROR_CALLBACK) { |
|
| 907 | 907 | if (is_callable($this->callback)) { |
| 908 | 908 | call_user_func($this->callback, $this); |
| 909 | 909 | } |
| 910 | 910 | } |
| 911 | - if ($this->mode & references_PEAR_ERROR_EXCEPTION) { |
|
| 911 | + if ($this->mode&references_PEAR_ERROR_EXCEPTION) { |
|
| 912 | 912 | trigger_error("references_PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING); |
| 913 | 913 | eval('$e = new Exception($this->message, $this->code);throw($e);'); |
| 914 | 914 | } |
@@ -952,7 +952,7 @@ discard block |
||
| 952 | 952 | */ |
| 953 | 953 | function getMessage() |
| 954 | 954 | { |
| 955 | - return ($this->error_message_prefix . $this->message); |
|
| 955 | + return ($this->error_message_prefix.$this->message); |
|
| 956 | 956 | } |
| 957 | 957 | |
| 958 | 958 | |
@@ -1060,11 +1060,10 @@ discard block |
||
| 1060 | 1060 | $levels = array(E_USER_NOTICE => 'notice', |
| 1061 | 1061 | E_USER_WARNING => 'warning', |
| 1062 | 1062 | E_USER_ERROR => 'error'); |
| 1063 | - if ($this->mode & references_PEAR_ERROR_CALLBACK) { |
|
| 1063 | + if ($this->mode&references_PEAR_ERROR_CALLBACK) { |
|
| 1064 | 1064 | if (is_array($this->callback)) { |
| 1065 | 1065 | $callback = (is_object($this->callback[0]) ? |
| 1066 | - strtolower(get_class($this->callback[0])) : |
|
| 1067 | - $this->callback[0]) . '::' . |
|
| 1066 | + strtolower(get_class($this->callback[0])) : $this->callback[0]).'::'. |
|
| 1068 | 1067 | $this->callback[1]; |
| 1069 | 1068 | } else { |
| 1070 | 1069 | $callback = $this->callback; |
@@ -1075,16 +1074,16 @@ discard block |
||
| 1075 | 1074 | $callback, $this->error_message_prefix, |
| 1076 | 1075 | $this->userinfo); |
| 1077 | 1076 | } |
| 1078 | - if ($this->mode & references_PEAR_ERROR_PRINT) { |
|
| 1077 | + if ($this->mode&references_PEAR_ERROR_PRINT) { |
|
| 1079 | 1078 | $modes[] = 'print'; |
| 1080 | 1079 | } |
| 1081 | - if ($this->mode & references_PEAR_ERROR_TRIGGER) { |
|
| 1080 | + if ($this->mode&references_PEAR_ERROR_TRIGGER) { |
|
| 1082 | 1081 | $modes[] = 'trigger'; |
| 1083 | 1082 | } |
| 1084 | - if ($this->mode & references_PEAR_ERROR_DIE) { |
|
| 1083 | + if ($this->mode&references_PEAR_ERROR_DIE) { |
|
| 1085 | 1084 | $modes[] = 'die'; |
| 1086 | 1085 | } |
| 1087 | - if ($this->mode & references_PEAR_ERROR_RETURN) { |
|
| 1086 | + if ($this->mode&references_PEAR_ERROR_RETURN) { |
|
| 1088 | 1087 | $modes[] = 'return'; |
| 1089 | 1088 | } |
| 1090 | 1089 | return sprintf('[%s: message="%s" code=%d mode=%s level=%s '. |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | * @param boolean $as_object |
| 231 | 231 | * @param string $fields Requested fields from the query |
| 232 | 232 | * |
| 233 | - * @return array |
|
| 233 | + * @return string |
|
| 234 | 234 | */ |
| 235 | 235 | protected function convertResultSet($result, $id_as_key = false, $as_object = true, $fields='*') { |
| 236 | 236 | $ret = array(); |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | /** |
| 490 | 490 | * delete an object from the database |
| 491 | 491 | * |
| 492 | - * @param object $obj reference to the object to delete |
|
| 492 | + * @param references_articles $obj reference to the object to delete |
|
| 493 | 493 | * @param bool $force |
| 494 | 494 | * @return bool FALSE if failed. |
| 495 | 495 | */ |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | /** |
| 498 | 498 | * Notification de la publication d'une nouvelle référence |
| 499 | 499 | * |
| 500 | - * @param object $article L'annonce pour laquelle on fait la notification |
|
| 500 | + * @param references_articles $article L'annonce pour laquelle on fait la notification |
|
| 501 | 501 | */ |
| 502 | 502 | function notifyNewArticle(references_articles $article) |
| 503 | 503 | { |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | /** |
| 567 | 567 | * Indique si une référence est visible d'un utilisateur |
| 568 | 568 | * |
| 569 | - * @param object $article L'article à controler |
|
| 569 | + * @param references_articles $article L'article à controler |
|
| 570 | 570 | * @param integer $uid L'id de l'utilisateur à controler |
| 571 | 571 | * @return boolean |
| 572 | 572 | */ |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | /** |
| 182 | 182 | * Notification de la création d'une nouvelle catégorie |
| 183 | 183 | * |
| 184 | - * @param object $category |
|
| 184 | + * @param references_categories $category |
|
| 185 | 185 | */ |
| 186 | 186 | function notifyNewCategory(references_categories $category) |
| 187 | 187 | { |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | /** |
| 194 | 194 | * Indique si une catégorie est visible d'un utilisateur |
| 195 | 195 | * |
| 196 | - * @param object $category La catégorie à controler |
|
| 196 | + * @param references_categories $category La catégorie à controler |
|
| 197 | 197 | * @param integer $uid L'id de l'utilisateur à controler |
| 198 | 198 | * @return boolean |
| 199 | 199 | */ |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | /** |
| 45 | 45 | * Retourne l'instance unique de la clanss |
| 46 | 46 | * |
| 47 | - * @return object |
|
| 47 | + * @return references_handler |
|
| 48 | 48 | */ |
| 49 | 49 | public static function getInstance() |
| 50 | 50 | { |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | /** |
| 254 | 254 | * Retourne les noms à utiliser pour les champs de tri (sélecteur de champ et ordre de tri) |
| 255 | 255 | * |
| 256 | - * @return array [0] = Nom du sélecteur de champs, [1] = Nom du sélecteur pour le sens du tri |
|
| 256 | + * @return string[] [0] = Nom du sélecteur de champs, [1] = Nom du sélecteur pour le sens du tri |
|
| 257 | 257 | */ |
| 258 | 258 | private function getSortPlaceHolderNames() |
| 259 | 259 | { |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | * |
| 279 | 279 | * @param string $optionName |
| 280 | 280 | * @param mixed $optionValue |
| 281 | - * @return object |
|
| 281 | + * @return references_listFilter |
|
| 282 | 282 | */ |
| 283 | 283 | public function setOption($optionName, $optionValue) |
| 284 | 284 | { |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | * [data] A ne pas renseigner, contient la valeur saisie par l'utilisateur |
| 402 | 402 | * [operator] Opérateur de comparaison pour le Criteria |
| 403 | 403 | * [autoComplete] Indique si on active l'auto complétion sur le champs |
| 404 | - * @return object L'objet courant pour pouvoir chainer |
|
| 404 | + * @return references_listFilter L'objet courant pour pouvoir chainer |
|
| 405 | 405 | */ |
| 406 | 406 | function initFilter($fieldName, $parameters) |
| 407 | 407 | { |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | /** |
| 457 | 457 | * Ajoute les critères par défaut au critère général |
| 458 | 458 | * |
| 459 | - * @return void |
|
| 459 | + * @return references_listFilter |
|
| 460 | 460 | */ |
| 461 | 461 | private function addDefaultCriterias() |
| 462 | 462 | { |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | /** |
| 582 | 582 | * Méthode à appeler juste après le constructeur pour qu'elle récupère les données saisies |
| 583 | 583 | * |
| 584 | - * @return object L'objet courant pour pouvoir chainer |
|
| 584 | + * @return references_listFilter L'objet courant pour pouvoir chainer |
|
| 585 | 585 | */ |
| 586 | 586 | function filter() |
| 587 | 587 | { |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | * |
| 704 | 704 | * @param string $key |
| 705 | 705 | * @param string $value |
| 706 | - * @return object |
|
| 706 | + * @return references_listFilter |
|
| 707 | 707 | */ |
| 708 | 708 | function addAdditionnalParameterToPager($key, $value = '') |
| 709 | 709 | { |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | * |
| 717 | 717 | * @param string $key |
| 718 | 718 | * @param string $value |
| 719 | - * @return object |
|
| 719 | + * @return references_listFilter |
|
| 720 | 720 | */ |
| 721 | 721 | function addAdditionnalParameterToClearButton($key, $value = '') |
| 722 | 722 | { |
@@ -727,9 +727,7 @@ discard block |
||
| 727 | 727 | /** |
| 728 | 728 | * Permet d'ajouter des paramètres supplémentaires au pager |
| 729 | 729 | * |
| 730 | - * @param string $key |
|
| 731 | - * @param string $value |
|
| 732 | - * @return object |
|
| 730 | + * @return references_listFilter |
|
| 733 | 731 | */ |
| 734 | 732 | function addAditionnalArrayParametersToPager($array) |
| 735 | 733 | { |
@@ -744,7 +742,7 @@ discard block |
||
| 744 | 742 | /** |
| 745 | 743 | * Retourne le pager à utiliser |
| 746 | 744 | * |
| 747 | - * @return mixed Null s'il n'y a pas lieu d'y avoir un pager, sinon un objet de type {@link XoopsPageNav} |
|
| 745 | + * @return XoopsPageNav|null Null s'il n'y a pas lieu d'y avoir un pager, sinon un objet de type {@link XoopsPageNav} |
|
| 748 | 746 | */ |
| 749 | 747 | function getPager() |
| 750 | 748 | { |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * |
| 40 | 40 | * @param string $key Le nom du champ à traiter |
| 41 | 41 | * @param mixed $value La valeur à lui attribuer |
| 42 | - * @return object |
|
| 42 | + * @return references_parameters |
|
| 43 | 43 | */ |
| 44 | 44 | function __set($key, $value) |
| 45 | 45 | { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | /** |
| 99 | 99 | * Retourne l'instance unique de la classe |
| 100 | 100 | * |
| 101 | - * @return object |
|
| 101 | + * @return references_plugins |
|
| 102 | 102 | */ |
| 103 | 103 | public static function getInstance() |
| 104 | 104 | { |
@@ -181,8 +181,8 @@ discard block |
||
| 181 | 181 | * Déclenchement d'une action et appel des plugins liés |
| 182 | 182 | * |
| 183 | 183 | * @param string $eventToFire L'action déclenchée |
| 184 | - * @param object $parameters Les paramètres à passer à chaque plugin |
|
| 185 | - * @return object L'objet lui même pour chaîner |
|
| 184 | + * @param references_parameters $parameters Les paramètres à passer à chaque plugin |
|
| 185 | + * @return references_plugins L'objet lui même pour chaîner |
|
| 186 | 186 | */ |
| 187 | 187 | function fireAction($eventToFire, references_parameters $parameters = null) |
| 188 | 188 | { |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | * Déclenchement d'un filtre et appel des plugins liés |
| 215 | 215 | * |
| 216 | 216 | * @param string $eventToFire Le filtre appelé |
| 217 | - * @param object $parameters Les paramètres à passer à chaque plugin |
|
| 217 | + * @param references_parameters $parameters Les paramètres à passer à chaque plugin |
|
| 218 | 218 | * @return object Le contenu de l'objet passé en paramètre |
| 219 | 219 | */ |
| 220 | 220 | function fireFilter($eventToFire, references_parameters &$parameters) |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | /** |
| 49 | 49 | * Access the only instance of this class |
| 50 | 50 | * |
| 51 | - * @return object |
|
| 51 | + * @return references_utils |
|
| 52 | 52 | * |
| 53 | 53 | * @static |
| 54 | 54 | * @staticvar object |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | /** |
| 274 | 274 | * Send an email from a template to a list of recipients |
| 275 | 275 | * |
| 276 | - * @param string $tpl_name Template's name |
|
| 276 | + * @param string $tplName Template's name |
|
| 277 | 277 | * @param array $recipients List of recipients |
| 278 | 278 | * @param string $subject Email's subject |
| 279 | 279 | * @param array $variables Varirables to give to the template |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | /** |
| 387 | 387 | * Internal function used to get the handler of the current module |
| 388 | 388 | * |
| 389 | - * @return object The module |
|
| 389 | + * @return integer The module |
|
| 390 | 390 | */ |
| 391 | 391 | function getModule() |
| 392 | 392 | { |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | /** |
| 471 | 471 | * Retourne la liste des emails des utilisateurs membres d'un groupe |
| 472 | 472 | * |
| 473 | - * @param int $group_id Group's number |
|
| 473 | + * @param int $groupId Group's number |
|
| 474 | 474 | * @return array Emails list |
| 475 | 475 | */ |
| 476 | 476 | function getEmailsFromGroup($groupId) |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | /** |
| 488 | 488 | * Vérifie que l'utilisateur courant fait partie du groupe des administrateurs |
| 489 | 489 | * |
| 490 | - * @return booleean Admin or not |
|
| 490 | + * @return boolean Admin or not |
|
| 491 | 491 | */ |
| 492 | 492 | function isAdmin() |
| 493 | 493 | { |
@@ -589,7 +589,6 @@ discard block |
||
| 589 | 589 | * Mark the mandatory fields of a form with a star |
| 590 | 590 | * |
| 591 | 591 | * @param object $sform The form to modify |
| 592 | - * @param string $caracter The character to use to mark fields |
|
| 593 | 592 | * @return object The modified form |
| 594 | 593 | */ |
| 595 | 594 | function &formMarkRequiredFields(&$sform) |
@@ -931,7 +930,7 @@ discard block |
||
| 931 | 930 | * Fonction chargée de gérer l'upload |
| 932 | 931 | * |
| 933 | 932 | * @param integer $indice L'indice du fichier à télécharger |
| 934 | - * @return mixed True si l'upload s'est bien déroulé sinon le message d'erreur correspondant |
|
| 933 | + * @return boolean|string True si l'upload s'est bien déroulé sinon le message d'erreur correspondant |
|
| 935 | 934 | */ |
| 936 | 935 | function uploadFile($indice, $dstpath = XOOPS_UPLOAD_PATH, $mimeTypes = null, $uploadMaxSize = null, $maxWidth = null, $maxHeight = null) |
| 937 | 936 | { |
@@ -1016,7 +1015,7 @@ discard block |
||
| 1016 | 1015 | /** |
| 1017 | 1016 | * Ajoute des jours à une date et retourne la nouvelle date au format Date de Mysql |
| 1018 | 1017 | * |
| 1019 | - * @param integer $durations Durée en jours |
|
| 1018 | + * @param integer $duration Durée en jours |
|
| 1020 | 1019 | * @param integer $startingDate Date de départ (timestamp) |
| 1021 | 1020 | */ |
| 1022 | 1021 | function addDaysToDate($duration = 1, $startingDate = 0) |
@@ -1056,6 +1055,9 @@ discard block |
||
| 1056 | 1055 | return $breadcrumb; |
| 1057 | 1056 | } |
| 1058 | 1057 | |
| 1058 | + /** |
|
| 1059 | + * @param string $string |
|
| 1060 | + */ |
|
| 1059 | 1061 | function close_tags($string) |
| 1060 | 1062 | { |
| 1061 | 1063 | // match opened tags |
@@ -1369,7 +1371,7 @@ discard block |
||
| 1369 | 1371 | * Create the <option> of an html select |
| 1370 | 1372 | * |
| 1371 | 1373 | * @param array $array Array of index and labels |
| 1372 | - * @param mixed $default the default value |
|
| 1374 | + * @param integer $default the default value |
|
| 1373 | 1375 | * @return string |
| 1374 | 1376 | */ |
| 1375 | 1377 | private function htmlSelectOptions($array, $default = 0, $withNull = true) |