@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | * utile pour les textes > 32ko |
| 315 | 315 | * |
| 316 | 316 | * @param string $texte |
| 317 | - * @return array |
|
| 317 | + * @return string[] |
|
| 318 | 318 | */ |
| 319 | 319 | function coupe_trop_long($texte) { |
| 320 | 320 | $aider = charger_fonction('aider', 'inc'); |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | * |
| 348 | 348 | * @param string $texte |
| 349 | 349 | * @param string $att_text |
| 350 | - * @return array |
|
| 350 | + * @return string[] |
|
| 351 | 351 | */ |
| 352 | 352 | function editer_texte_recolle($texte, $att_text) { |
| 353 | 353 | if ((strlen($texte) < 29 * 1024) |
@@ -373,8 +373,8 @@ discard block |
||
| 373 | 373 | /** |
| 374 | 374 | * auto-renseigner le titre si il n'existe pas |
| 375 | 375 | * |
| 376 | - * @param $champ_titre |
|
| 377 | - * @param $champs_contenu |
|
| 376 | + * @param string $champ_titre |
|
| 377 | + * @param string[] $champs_contenu |
|
| 378 | 378 | * @param int $longueur |
| 379 | 379 | */ |
| 380 | 380 | function titre_automatique($champ_titre, $champs_contenu, $longueur = null) { |
@@ -187,7 +187,7 @@ |
||
| 187 | 187 | * @param string $to |
| 188 | 188 | * @param string $texte |
| 189 | 189 | * @param string $parts |
| 190 | - * @return array |
|
| 190 | + * @return string[] |
|
| 191 | 191 | */ |
| 192 | 192 | function mail_normaliser_headers($headers, $from, $to, $texte, $parts = '') { |
| 193 | 193 | $charset = $GLOBALS['meta']['charset']; |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | * |
| 70 | 70 | * @param string $fonc |
| 71 | 71 | * Nom du filtre |
| 72 | - * @param null $default |
|
| 72 | + * @param string $default |
|
| 73 | 73 | * Nom du filtre appliqué par défaut si celui demandé n'est pas trouvé |
| 74 | 74 | * @return string |
| 75 | 75 | * Fonction PHP correspondante du filtre demandé |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * |
| 117 | 117 | * @see filtrer() Assez proche |
| 118 | 118 | * |
| 119 | - * @param mixed $arg |
|
| 119 | + * @param string $arg |
|
| 120 | 120 | * Texte (le plus souvent) sur lequel appliquer le filtre |
| 121 | 121 | * @param string $filtre |
| 122 | 122 | * Nom du filtre à appliquer |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | * corriger toutes les `&xx;` en `&xx;` |
| 674 | 674 | * @param bool $quote |
| 675 | 675 | * Échapper aussi les simples quotes en `'` |
| 676 | - * @return mixed|string |
|
| 676 | + * @return string |
|
| 677 | 677 | */ |
| 678 | 678 | function entites_html($texte, $tout = false, $quote = true) { |
| 679 | 679 | if (!is_string($texte) or !$texte |
@@ -1310,7 +1310,7 @@ discard block |
||
| 1310 | 1310 | * |
| 1311 | 1311 | * @param mixed $texte |
| 1312 | 1312 | * Contenu de reference a tester |
| 1313 | - * @param mixed $sinon |
|
| 1313 | + * @param string|null $sinon |
|
| 1314 | 1314 | * Contenu a retourner si le contenu de reference est vide |
| 1315 | 1315 | * @return mixed |
| 1316 | 1316 | * Retourne $texte, sinon $sinon. |
@@ -1568,7 +1568,7 @@ discard block |
||
| 1568 | 1568 | * @param string $letexte |
| 1569 | 1569 | * @param string $lang |
| 1570 | 1570 | * Langue à retrouver (si vide, utilise la langue en cours). |
| 1571 | - * @param array $options Options { |
|
| 1571 | + * @param boolean $options Options { |
|
| 1572 | 1572 | * @type bool $echappe_span |
| 1573 | 1573 | * True pour échapper les balises span (false par défaut) |
| 1574 | 1574 | * @type string $lang_defaut |
@@ -1658,7 +1658,7 @@ discard block |
||
| 1658 | 1658 | * @param string $letexte |
| 1659 | 1659 | * @param string $lang |
| 1660 | 1660 | * Langue à retrouver (si vide, utilise la langue en cours). |
| 1661 | - * @param array $options Options { |
|
| 1661 | + * @param boolean $options Options { |
|
| 1662 | 1662 | * @type bool $echappe_span |
| 1663 | 1663 | * True pour échapper les balises span (false par défaut) |
| 1664 | 1664 | * @type string $lang_defaut |
@@ -2042,6 +2042,9 @@ discard block |
||
| 2042 | 2042 | // Quelques fonctions de calcul arithmetique |
| 2043 | 2043 | // |
| 2044 | 2044 | function floatstr($a) { return str_replace(',','.',(string)floatval($a)); } |
| 2045 | +/** |
|
| 2046 | + * @param string $f |
|
| 2047 | + */ |
|
| 2045 | 2048 | function strize($f, $a, $b) { return floatstr($f(floatstr($a),floatstr($b))); } |
| 2046 | 2049 | |
| 2047 | 2050 | /** |
@@ -2184,7 +2187,7 @@ discard block |
||
| 2184 | 2187 | * |
| 2185 | 2188 | * @param string $adresses |
| 2186 | 2189 | * Adresse ou liste d'adresse |
| 2187 | - * @return bool|string |
|
| 2190 | + * @return false|string |
|
| 2188 | 2191 | * - false si pas conforme, |
| 2189 | 2192 | * - la normalisation de la dernière adresse donnée sinon |
| 2190 | 2193 | **/ |
@@ -2518,7 +2521,7 @@ discard block |
||
| 2518 | 2521 | * @param int $a |
| 2519 | 2522 | * @param int $b |
| 2520 | 2523 | * @param int $c |
| 2521 | - * @return int |
|
| 2524 | + * @return double |
|
| 2522 | 2525 | * Retourne `$a*$b/$c` |
| 2523 | 2526 | **/ |
| 2524 | 2527 | function regledetrois($a, $b, $c) { |
@@ -4551,7 +4554,7 @@ discard block |
||
| 4551 | 4554 | * Nombre d'éléments |
| 4552 | 4555 | * @param string $objet |
| 4553 | 4556 | * Objet |
| 4554 | - * @return mixed|string |
|
| 4557 | + * @return string |
|
| 4555 | 4558 | * Texte traduit du comptage, tel que '3 articles' |
| 4556 | 4559 | */ |
| 4557 | 4560 | function objet_afficher_nb($nb, $objet) { |
@@ -234,6 +234,9 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | |
| 236 | 236 | // http://code.spip.net/@info_etape |
| 237 | +/** |
|
| 238 | + * @param string $titre |
|
| 239 | + */ |
|
| 237 | 240 | function info_etape($titre, $complement = '') { |
| 238 | 241 | return "<h2>" . $titre . "</h2>\n" . |
| 239 | 242 | ($complement ? "" . $complement . "\n" : ''); |
@@ -259,6 +262,11 @@ discard block |
||
| 259 | 262 | } |
| 260 | 263 | |
| 261 | 264 | // http://code.spip.net/@info_progression_etape |
| 265 | +/** |
|
| 266 | + * @param integer $en_cours |
|
| 267 | + * @param string $phase |
|
| 268 | + * @param string $dir |
|
| 269 | + */ |
|
| 262 | 270 | function info_progression_etape($en_cours, $phase, $dir, $erreur = false) { |
| 263 | 271 | //$en_cours = _request('etape')?_request('etape'):""; |
| 264 | 272 | $liste = find_all_in_path($dir, $phase . '(([0-9])+|fin)[.]php$'); |
@@ -315,6 +323,9 @@ discard block |
||
| 315 | 323 | |
| 316 | 324 | |
| 317 | 325 | // http://code.spip.net/@fieldset |
| 326 | +/** |
|
| 327 | + * @param string $legend |
|
| 328 | + */ |
|
| 318 | 329 | function fieldset($legend, $champs = array(), $apres = '', $avant = '') { |
| 319 | 330 | return "<fieldset>\n" . |
| 320 | 331 | $avant . |
@@ -382,6 +393,10 @@ discard block |
||
| 382 | 393 | } |
| 383 | 394 | |
| 384 | 395 | // http://code.spip.net/@install_connexion_form |
| 396 | +/** |
|
| 397 | + * @param string[] $pass |
|
| 398 | + * @param integer $etape |
|
| 399 | + */ |
|
| 385 | 400 | function install_connexion_form($db, $login, $pass, $predef, $hidden, $etape, $jquery = true) { |
| 386 | 401 | $server_db = (is_string($predef[0])) ? $predef[0] : ''; |
| 387 | 402 | |
@@ -549,6 +564,9 @@ discard block |
||
| 549 | 564 | return array($checked, $bases); |
| 550 | 565 | } |
| 551 | 566 | |
| 567 | +/** |
|
| 568 | + * @param string[] $hidden |
|
| 569 | + */ |
|
| 552 | 570 | function install_propager($hidden) { |
| 553 | 571 | $res = ''; |
| 554 | 572 | foreach ($hidden as $k) { |
@@ -21,6 +21,9 @@ |
||
| 21 | 21 | // |
| 22 | 22 | |
| 23 | 23 | // http://code.spip.net/@image_math |
| 24 | +/** |
|
| 25 | + * @param string $tex |
|
| 26 | + */ |
|
| 24 | 27 | function produire_image_math($tex) { |
| 25 | 28 | |
| 26 | 29 | switch ($GLOBALS['traiter_math']) { |
@@ -623,11 +623,11 @@ |
||
| 623 | 623 | * |
| 624 | 624 | * @param $liste |
| 625 | 625 | * Liste de description des plugins |
| 626 | - * @param $nom |
|
| 626 | + * @param string $nom |
|
| 627 | 627 | * Le plugin donc on cherche la presence |
| 628 | 628 | * @param $intervalle |
| 629 | 629 | * L'éventuelle intervalle de compatibilité de la dépendance. ex: [1.1.0;] |
| 630 | - * @param $balise |
|
| 630 | + * @param string $balise |
|
| 631 | 631 | * Permet de définir si on teste un utilise ou un nécessite |
| 632 | 632 | * @return string. |
| 633 | 633 | * Vide si ok, |
@@ -165,7 +165,7 @@ |
||
| 165 | 165 | * @param string $primary |
| 166 | 166 | * @param array $rows |
| 167 | 167 | * @param string $serveur |
| 168 | - * @return array |
|
| 168 | + * @return string[] |
|
| 169 | 169 | */ |
| 170 | 170 | function generer_select_where_explicites($table, $primary, $rows, $serveur) { |
| 171 | 171 | # calculer le {id_article IN()} et le {... as points} |
@@ -30,6 +30,9 @@ discard block |
||
| 30 | 30 | include_spip('inc/filtres_boites'); |
| 31 | 31 | |
| 32 | 32 | // http://code.spip.net/@debut_cadre |
| 33 | +/** |
|
| 34 | + * @param string $style |
|
| 35 | + */ |
|
| 33 | 36 | function debut_cadre($style, $icone = "", $fonction = "", $titre = "", $id = "", $class = "", $padding = true) { |
| 34 | 37 | $style_mapping = array( |
| 35 | 38 | 'r' => 'simple', |
@@ -183,6 +186,10 @@ discard block |
||
| 183 | 186 | function fin_onglet() { return "</ul></div>\n"; } |
| 184 | 187 | |
| 185 | 188 | // http://code.spip.net/@onglet |
| 189 | +/** |
|
| 190 | + * @param string $texte |
|
| 191 | + * @param string $onglet |
|
| 192 | + */ |
|
| 186 | 193 | function onglet($texte, $lien, $onglet_ref, $onglet, $icone = "") { |
| 187 | 194 | return "<li>" |
| 188 | 195 | . ($icone ? http_img_pack($icone, '', " class='cadre-icone'") : '') |
@@ -415,6 +415,13 @@ |
||
| 415 | 415 | } |
| 416 | 416 | |
| 417 | 417 | |
| 418 | +/** |
|
| 419 | + * @param integer $id |
|
| 420 | + * @param string $type |
|
| 421 | + * @param double $n |
|
| 422 | + * @param string|null $img |
|
| 423 | + * @param string $titre |
|
| 424 | + */ |
|
| 418 | 425 | function afficher_script_statut($id, $type, $n, $img, $statut, $titre, $act = '') { |
| 419 | 426 | $h = generer_action_auteur("instituer_objet", "$type-$id-$statut"); |
| 420 | 427 | $h = "selec_statut('$id', '$type', $n, jQuery('img',this).attr('src'), '$h');return false;"; |