From 9691acbe6d296892b0c1148283b50b61d988ca43 Mon Sep 17 00:00:00 2001 From: Matthieu Marcillaud <marcimat@rezo.net> Date: Sun, 11 Jun 2023 22:44:10 +0200 Subject: [PATCH] docs: Types sur PHPdoc --- ecrire/action/editer_liens.php | 2 +- ecrire/auth/ldap.php | 6 +++--- ecrire/base/objets.php | 20 ++++++++++---------- ecrire/inc/acces.php | 4 ++-- ecrire/inc/cvt_autosave.php | 2 +- ecrire/inc/cvt_multietapes.php | 6 +++--- ecrire/inc/editer.php | 4 ++-- ecrire/inc/filtres.php | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ecrire/action/editer_liens.php b/ecrire/action/editer_liens.php index 25a80d0f9f..cc5f5cc576 100644 --- a/ecrire/action/editer_liens.php +++ b/ecrire/action/editer_liens.php @@ -526,7 +526,7 @@ function lien_ordonner($objet_source, $primary, $table_lien, $id, $objets) { /** * Une table de lien est-elle triable ? * elle doit disposer d'un champ rang_lien pour cela - * @param $table_lien + * @param string $table_lien * @return mixed */ function lien_triables($table_lien) { diff --git a/ecrire/auth/ldap.php b/ecrire/auth/ldap.php index 72ca46e72b..f91cd3d284 100644 --- a/ecrire/auth/ldap.php +++ b/ecrire/auth/ldap.php @@ -309,9 +309,9 @@ function auth_ldap_autoriser_modifier_pass($serveur = '') { * compte générique defini dans config/ldap.php n'a généralement pas (et * ne devrait pas avoir) les droits suffisants pour faire la modification. * - * @param $login - * @param $new_pass - * @param $id_auteur + * @param string $login + * @param string $new_pass + * @param int $id_auteur * @param string $serveur * @return bool * Informe du succès ou de l'echec du changement du mot de passe diff --git a/ecrire/base/objets.php b/ecrire/base/objets.php index d172e3ec09..021a955333 100644 --- a/ecrire/base/objets.php +++ b/ecrire/base/objets.php @@ -788,8 +788,8 @@ function renseigner_table_objet_sql($table_sql, &$infos) { * statut * tables_jointures * - * @param $table_sql - * @param $infos + * @param string $table_sql + * @param array $infos * @return array */ function renseigner_table_objet_interfaces($table_sql, &$infos) { @@ -1429,8 +1429,8 @@ function objet_lister_parents($objet, $id_objet, $parent_direct_seulement = fals * Fonction helper qui permet de récupérer une liste simplifiée des parents, regroupés par objet * [ 'objet1' => [ids...], 'objet2' => [ids...] ] * - * @param $objet - * @param $id_objet + * @param string $objet + * @param int $id_objet * @return array */ function objet_lister_parents_par_type($objet, $id_objet) { @@ -1469,9 +1469,9 @@ function objet_lister_parents_par_type($objet, $id_objet) { * le tableau contient en plus en entrée 'lien' qui contient les informations complètes du lien (rang, role...) * * @api - * @param $objet + * @param string $objet * Type de l'objet dont on cherche les enfants - * @param $id_objet + * @param int $id_objet * Identifiant de l'objet dont on cherche les enfants * @return array * Retourne un tableau de tableaux, avec comme clés les types des objets, et dans chacun un tableau des identifiants trouvés @@ -1562,8 +1562,8 @@ function objet_lister_enfants($objet, $id_objet) { * Fonction helper qui permet de récupérer une liste simplifiée des enfants, regroupés par objet * [ 'objet1' => [ids...], 'objet2' => [ids...] ] * - * @param $objet - * @param $id_objet + * @param string $objet + * @param int $id_objet * @return array */ function objet_lister_enfants_par_type($objet, $id_objet) { @@ -1583,7 +1583,7 @@ function objet_lister_enfants_par_type($objet, $id_objet) { /** * Donne les informations de parenté directe d'un type d'objet si on en trouve * - * @param $objet + * @param string $objet * Type de l'objet dont on cherche les informations de parent * @return array|false * Retourne un tableau de tableau contenant les informations de type et de champ pour trouver le parent ou false sinon @@ -1619,7 +1619,7 @@ function objet_type_decrire_infos_parents($objet) { /** * Donne les informations des enfants directs d'un type d'objet si on en trouve * - * @param $objet + * @param string $objet * Type de l'objet dont on cherche les informations des enfants * @return array * Retourne un tableau de tableaux contenant chacun les informations d'un type d'enfant diff --git a/ecrire/inc/acces.php b/ecrire/inc/acces.php index e5f236d98a..0af3c4a5e6 100644 --- a/ecrire/inc/acces.php +++ b/ecrire/inc/acces.php @@ -310,8 +310,8 @@ function ecrire_acces() { /** * Generer le fichier de htpasswd contenant les htpass - * @param $htpasswd - * @param $htpasswd_admin + * @param string $htpasswd + * @param string $htpasswd_admin */ function generer_htpasswd_files($htpasswd, $htpasswd_admin) { if ($generer_htpasswd = charger_fonction('generer_htpasswd_files', 'inc', true)) { diff --git a/ecrire/inc/cvt_autosave.php b/ecrire/inc/cvt_autosave.php index abea4d3d3a..70ad9b6417 100644 --- a/ecrire/inc/cvt_autosave.php +++ b/ecrire/inc/cvt_autosave.php @@ -22,7 +22,7 @@ if (!defined('_ECRIRE_INC_VERSION')) { /** * Nettoyer les échappements * - * @param $val + * @param string $val * @return string */ function autosave_clean_value($val) { diff --git a/ecrire/inc/cvt_multietapes.php b/ecrire/inc/cvt_multietapes.php index f81009eb1a..790fe7619f 100644 --- a/ecrire/inc/cvt_multietapes.php +++ b/ecrire/inc/cvt_multietapes.php @@ -154,8 +154,8 @@ function cvtmulti_sauver_post($form, $je_suis_poste, &$valeurs) { /** * Charger une etape du cvt multi - * @param $args - * @param $valeurs + * @param array $args + * @param array $valeurs * @return array */ function cvtmulti_formulaire_charger_etapes($args, $valeurs) { @@ -178,7 +178,7 @@ function cvtmulti_formulaire_charger_etapes($args, $valeurs) { * Verifier les etapes de saisie * * @param array $args - * @param $erreurs + * @param array $erreurs * @return array */ function cvtmulti_formulaire_verifier_etapes($args, $erreurs) { diff --git a/ecrire/inc/editer.php b/ecrire/inc/editer.php index 86d7d7319d..3da12bfa5d 100644 --- a/ecrire/inc/editer.php +++ b/ecrire/inc/editer.php @@ -380,8 +380,8 @@ function coupe_trop_long($texte) { /** * auto-renseigner le titre si il n'existe pas * - * @param $champ_titre - * @param $champs_contenu + * @param string $champ_titre + * @param string $champs_contenu * @param int $longueur */ function titre_automatique($champ_titre, $champs_contenu, $longueur = null) { diff --git a/ecrire/inc/filtres.php b/ecrire/inc/filtres.php index de91393e61..befc388331 100644 --- a/ecrire/inc/filtres.php +++ b/ecrire/inc/filtres.php @@ -4778,7 +4778,7 @@ function wrap($texte, $wrap) { * les tableaux-listes (qui n'ont que des cles numeriques), sont affiches sous forme de liste separee par des virgules : * c'est VOULU ! * - * @param $u + * @param mixed $u * @param string $join * @param int $indent * @return array|mixed|string -- GitLab