Completed
Push — master ( aa8f4f...e4c4a7 )
by cam
05:04
created
ecrire/req/pg.exp.php 1 patch
Doc Comments   +29 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,6 +132,11 @@  discard block
 block discarded – undo
132 132
 
133 133
 // Par ou ca passe une fois les traductions faites
134 134
 // https://code.spip.net/@spip_pg_trace_query
135
+/**
136
+ * @param string $query
137
+ *
138
+ * @return resource
139
+ */
135 140
 function spip_pg_trace_query($query, $serveur = '') {
136 141
 	$connexion = &$GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0];
137 142
 	$prefixe = $connexion['prefixe'];
@@ -291,6 +296,9 @@  discard block
 block discarded – undo
291 296
 }
292 297
 
293 298
 // https://code.spip.net/@spip_pg_alter_change
299
+/**
300
+ * @param string $arg
301
+ */
294 302
 function spip_pg_alter_change($table, $arg, $serveur = '', $requeter = true) {
295 303
 	if (!preg_match('/^`?(\w+)`?\s+`?(\w+)`?\s+(.*?)\s*(DEFAULT .*?)?(NOT\s+NULL)?\s*(DEFAULT .*?)?$/i', $arg, $r)) {
296 304
 		spip_log("alter change: $arg  incompris", 'pg.' . _LOG_ERREUR);
@@ -417,6 +425,7 @@  discard block
 block discarded – undo
417 425
  * @param string /array $champs : liste de champs sur lesquels s'applique l'index
418 426
  * @param string $serveur : nom de la connexion sql utilisee
419 427
  * @param bool $requeter : true pour executer la requete ou false pour retourner le texte de la requete
428
+ * @param string $champs
420 429
  *
421 430
  * @return bool ou requete
422 431
  */
@@ -592,6 +601,9 @@  discard block
 block discarded – undo
592 601
 }
593 602
 
594 603
 // https://code.spip.net/@spip_pg_orderby
604
+/**
605
+ * @param string $order
606
+ */
595 607
 function spip_pg_orderby($order, $select) {
596 608
 	$res = array();
597 609
 	$arg = (is_array($order) ? $order : preg_split('/\s*,\s*/', $order));
@@ -766,6 +778,9 @@  discard block
 block discarded – undo
766 778
 }
767 779
 
768 780
 // https://code.spip.net/@calculer_pg_where
781
+/**
782
+ * @param string $v
783
+ */
769 784
 function calculer_pg_where($v) {
770 785
 	if (!is_array($v)) {
771 786
 		return spip_pg_frommysql($v);
@@ -791,6 +806,9 @@  discard block
 block discarded – undo
791 806
 
792 807
 
793 808
 // https://code.spip.net/@calculer_pg_expression
809
+/**
810
+ * @param string $expression
811
+ */
794 812
 function calculer_pg_expression($expression, $v, $join = 'AND') {
795 813
 	if (empty($v)) {
796 814
 		return '';
@@ -842,6 +860,9 @@  discard block
 block discarded – undo
842 860
 }
843 861
 
844 862
 // https://code.spip.net/@spip_pg_fetch
863
+/**
864
+ * @param resource $res
865
+ */
845 866
 function spip_pg_fetch($res, $t = '', $serveur = '', $requeter = true) {
846 867
 
847 868
 	if ($res) {
@@ -913,6 +934,10 @@  discard block
 block discarded – undo
913 934
 }
914 935
 
915 936
 // https://code.spip.net/@spip_pg_insert
937
+/**
938
+ * @param string $champs
939
+ * @param string $valeurs
940
+ */
916 941
 function spip_pg_insert($table, $champs, $valeurs, $desc = array(), $serveur = '', $requeter = true) {
917 942
 	$connexion = &$GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0];
918 943
 	$prefixe = $connexion['prefixe'];
@@ -1149,6 +1174,9 @@  discard block
 block discarded – undo
1149 1174
 // Pas extensible pour le moment,
1150 1175
 
1151 1176
 // https://code.spip.net/@spip_pg_sequence
1177
+/**
1178
+ * @return string
1179
+ */
1152 1180
 function spip_pg_sequence($table, $raw = false) {
1153 1181
 
1154 1182
 	include_spip('base/serial');
@@ -1312,7 +1340,7 @@  discard block
 block discarded – undo
1312 1340
  * @param bool $requeter
1313 1341
  *     true pour éxecuter la requête
1314 1342
  *     false pour retourner le texte de la requête.
1315
- * @return ressource
1343
+ * @return resource
1316 1344
  *     Ressource à utiliser avec sql_fetch()
1317 1345
  **/
1318 1346
 function spip_pg_showbase($match, $serveur = '', $requeter = true) {
Please login to merge, or discard this patch.
ecrire/xml/analyser_dtd.php 1 patch
Doc Comments   +24 added lines patch added patch discarded remove patch
@@ -167,6 +167,9 @@  discard block
 block discarded – undo
167 167
 }
168 168
 
169 169
 // https://code.spip.net/@analyser_dtd_comment
170
+/**
171
+ * @param string $dtd
172
+ */
170 173
 function analyser_dtd_comment($dtd, &$dtc, $grammaire) {
171 174
 	// ejecter les commentaires, surtout quand ils contiennent du code.
172 175
 	// Option /s car sur plusieurs lignes parfois
@@ -179,6 +182,9 @@  discard block
 block discarded – undo
179 182
 }
180 183
 
181 184
 // https://code.spip.net/@analyser_dtd_pi
185
+/**
186
+ * @param string $dtd
187
+ */
182 188
 function analyser_dtd_pi($dtd, &$dtc, $grammaire) {
183 189
 	if (!preg_match('/^<\?.*?>\s*(.*)$/s', $dtd, $m)) {
184 190
 		return -10;
@@ -188,6 +194,9 @@  discard block
 block discarded – undo
188 194
 }
189 195
 
190 196
 // https://code.spip.net/@analyser_dtd_lexeme
197
+/**
198
+ * @param string $dtd
199
+ */
191 200
 function analyser_dtd_lexeme($dtd, &$dtc, $grammaire) {
192 201
 
193 202
 	if (!preg_match(_REGEXP_ENTITY_DEF, $dtd, $m)) {
@@ -215,6 +224,9 @@  discard block
 block discarded – undo
215 224
 // ca ne depasse pas 3 ici.
216 225
 
217 226
 // https://code.spip.net/@analyser_dtd_data
227
+/**
228
+ * @param string $dtd
229
+ */
218 230
 function analyser_dtd_data($dtd, &$dtc, $grammaire) {
219 231
 
220 232
 	if (!preg_match(_REGEXP_INCLUDE_USE, $dtd, $m)) {
@@ -236,6 +248,9 @@  discard block
 block discarded – undo
236 248
 }
237 249
 
238 250
 // https://code.spip.net/@analyser_dtd_notation
251
+/**
252
+ * @param string $dtd
253
+ */
239 254
 function analyser_dtd_notation($dtd, &$dtc, $grammaire) {
240 255
 	if (!preg_match('/^<!NOTATION.*?>\s*(.*)$/s', $dtd, $m)) {
241 256
 		return -8;
@@ -246,6 +261,9 @@  discard block
 block discarded – undo
246 261
 }
247 262
 
248 263
 // https://code.spip.net/@analyser_dtd_entity
264
+/**
265
+ * @param string $dtd
266
+ */
249 267
 function analyser_dtd_entity($dtd, &$dtc, $grammaire) {
250 268
 	if (!preg_match(_REGEXP_ENTITY_DECL, $dtd, $m)) {
251 269
 		return -2;
@@ -303,6 +321,9 @@  discard block
 block discarded – undo
303 321
 // Fin du controle en finElement
304 322
 
305 323
 // https://code.spip.net/@analyser_dtd_element
324
+/**
325
+ * @param string $dtd
326
+ */
306 327
 function analyser_dtd_element($dtd, &$dtc, $grammaire) {
307 328
 	if (!preg_match('/^<!ELEMENT\s+([^>\s]+)([^>]*)>\s*(.*)$/s', $dtd, $m)) {
308 329
 		return -3;
@@ -351,6 +372,9 @@  discard block
 block discarded – undo
351 372
 
352 373
 
353 374
 // https://code.spip.net/@analyser_dtd_attlist
375
+/**
376
+ * @param string $dtd
377
+ */
354 378
 function analyser_dtd_attlist($dtd, &$dtc, $grammaire) {
355 379
 	if (!preg_match('/^<!ATTLIST\s+(\S+)\s+([^>]*)>\s*(.*)/s', $dtd, $m)) {
356 380
 		return -5;
Please login to merge, or discard this patch.
ecrire/xml/sax.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -102,6 +102,9 @@  discard block
 block discarded – undo
102 102
 		: xml_entites_html($data);
103 103
 }
104 104
 
105
+/**
106
+ * @param IndenteurXML $phraseur
107
+ */
105 108
 function xml_piElement($phraseur, $target, $data) {
106 109
 	$depth = $phraseur->depth;
107 110
 
@@ -118,6 +121,9 @@  discard block
 block discarded – undo
118 121
 
119 122
 
120 123
 // https://code.spip.net/@xml_defautElement
124
+/**
125
+ * @param IndenteurXML $phraseur
126
+ */
121 127
 function xml_defaultElement($phraseur, $data) {
122 128
 	$depth = $phraseur->depth;
123 129
 
@@ -149,6 +155,9 @@  discard block
 block discarded – undo
149 155
 }
150 156
 
151 157
 // https://code.spip.net/@coordonnees_erreur
158
+/**
159
+ * @param string $msg
160
+ */
152 161
 function coordonnees_erreur($phraseur, $msg) {
153 162
 	$entete_length = substr_count($phraseur->entete, "\n");
154 163
 	$phraseur->err[] = array(
Please login to merge, or discard this patch.
ecrire/public/phraser_html.php 1 patch
Doc Comments   +22 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,6 +102,10 @@  discard block
 block discarded – undo
102 102
 }
103 103
 
104 104
 // https://code.spip.net/@phraser_polyglotte
105
+/**
106
+ * @param string $texte
107
+ * @param integer $ligne
108
+ */
105 109
 function phraser_polyglotte($texte, $ligne, $result) {
106 110
 
107 111
 	if (preg_match_all(BALISE_POLYGLOTTE, $texte, $m, PREG_SET_ORDER)) {
@@ -266,6 +270,9 @@  discard block
 block discarded – undo
266 270
 // on recommence tant qu'il y a des [...] en substituant a l'appel suivant
267 271
 
268 272
 // https://code.spip.net/@phraser_champs_etendus
273
+/**
274
+ * @param integer $ligne
275
+ */
269 276
 function phraser_champs_etendus($texte, $ligne, $result) {
270 277
 	if ($texte === "") {
271 278
 		return $result;
@@ -314,6 +321,10 @@  discard block
 block discarded – undo
314 321
 }
315 322
 
316 323
 // https://code.spip.net/@phraser_arg
324
+/**
325
+ * @param string $texte
326
+ * @param string $sep
327
+ */
317 328
 function phraser_arg(&$texte, $sep, $result, &$pointeur_champ) {
318 329
 	preg_match(",^(\|?[^}{)|]*)(.*)$,ms", $texte, $match);
319 330
 	$suite = ltrim($match[2]);
@@ -451,6 +462,9 @@  discard block
 block discarded – undo
451 462
 
452 463
 
453 464
 // https://code.spip.net/@phraser_champs_exterieurs
465
+/**
466
+ * @param string $texte
467
+ */
454 468
 function phraser_champs_exterieurs($texte, $ligne, $sep, $nested) {
455 469
 	$res = array();
456 470
 	while (($p = strpos($texte, "%$sep")) !== false) {
@@ -470,6 +484,9 @@  discard block
 block discarded – undo
470 484
 }
471 485
 
472 486
 // https://code.spip.net/@phraser_champs_interieurs
487
+/**
488
+ * @param string $sep
489
+ */
473 490
 function phraser_champs_interieurs($texte, $ligne, $sep, $result) {
474 491
 	$i = 0; // en fait count($result)
475 492
 	$x = "";
@@ -766,6 +783,10 @@  discard block
 block discarded – undo
766 783
 }
767 784
 
768 785
 // https://code.spip.net/@phraser_critere_infixe
786
+/**
787
+ * @param string $arg1
788
+ * @param string $arg2
789
+ */
769 790
 function phraser_critere_infixe($arg1, $arg2, $args, $op, $not, $cond) {
770 791
 	$args[0] = new Texte;
771 792
 	$args[0]->texte = $arg1;
@@ -895,7 +916,7 @@  discard block
 block discarded – undo
895 916
  * @param $texte
896 917
  * @param $id_parent
897 918
  * @param $boucle
898
- * @param $pos_debut_texte
919
+ * @param integer $pos_debut_texte
899 920
  * @param $result
900 921
  * @return mixed
901 922
  */
Please login to merge, or discard this patch.
ecrire/inc/puce_statut.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -412,6 +412,13 @@
 block discarded – undo
412 412
 }
413 413
 
414 414
 
415
+/**
416
+ * @param integer $id
417
+ * @param string $type
418
+ * @param double $n
419
+ * @param string|null $img
420
+ * @param string $titre
421
+ */
415 422
 function afficher_script_statut($id, $type, $n, $img, $statut, $titre, $act = '') {
416 423
 	$h = generer_action_auteur("instituer_objet", "$type-$id-$statut");
417 424
 	$t = supprimer_tags($titre);
Please login to merge, or discard this patch.
ecrire/public/assembler.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -467,7 +467,7 @@
 block discarded – undo
467 467
  *
468 468
  * @param string|null $arg
469 469
  * @param string $operation
470
- * @return mixed
470
+ * @return null|string
471 471
  */
472 472
 function arguments_balise_dyn_depuis_modele($arg, $operation = 'set') {
473 473
 	static $balise_dyn_appellee_par_modele = null;
Please login to merge, or discard this patch.
ecrire/inc/lang.php 1 patch
Doc Comments   +11 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
  *     La langue à utiliser
34 34
  * @param string|array $liste_langues
35 35
  *     La liste des langues valides
36
- * @return string|bool
36
+ * @return false|string
37 37
  *     string : La langue qui a été utilisée si trouvée
38 38
  *     false : aucune langue ne correspondait à la demande
39 39
  **/
@@ -89,6 +89,9 @@  discard block
 block discarded – undo
89 89
 // retourne son 2e argument si c'est un index du premier
90 90
 // ou un index approchant sinon et si possible, 
91 91
 // la langue X etant consideree comme une approche de X_Y
92
+/**
93
+ * @return string
94
+ */
92 95
 function approcher_langue($trads, $lang = '') {
93 96
 
94 97
 	if (!$lang) {
@@ -184,6 +187,9 @@  discard block
 block discarded – undo
184 187
 // pour 'changer_lang' (langue de l'article, espace prive), c'est en Ajax
185 188
 // 
186 189
 // https://code.spip.net/@menu_langues
190
+/**
191
+ * @param string $nom_select
192
+ */
187 193
 function menu_langues($nom_select, $default = '') {
188 194
 	include_spip('inc/actions');
189 195
 
@@ -218,6 +224,10 @@  discard block
 block discarded – undo
218 224
 }
219 225
 
220 226
 // https://code.spip.net/@select_langues
227
+/**
228
+ * @param string $change
229
+ * @param string $options
230
+ */
221 231
 function select_langues($nom_select, $change, $options, $label = "") {
222 232
 	static $cpt = 0;
223 233
 	$id = "menu_langues" . $cpt++;
Please login to merge, or discard this patch.
ecrire/inc/actions.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
  *     - -1 : renvoyer action, arg et hash sous forme de array()
36 36
  *     - true ou false : renvoyer une url, avec `&amp;` (false) ou `&` (true)
37 37
  *     - string : renvoyer un formulaire
38
- * @param string|int $att
38
+ * @param string $att
39 39
  *     - id_auteur pour lequel générer l'action en mode url ou array()
40 40
  *     - attributs du formulaire en mode formulaire
41 41
  * @param bool $public
42
- * @return array|string
42
+ * @return string
43 43
  *     URL, code HTML du formulaire ou tableau (action, arg, hash)
44 44
  */
45 45
 function generer_action_auteur($action, $arg = '', $redirect = '', $mode = false, $att = '', $public = false) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
  *     que l'on peut récupérer dans une fonction d'action par `_request('redirect')`
67 67
  * @param string $gra
68 68
  *     Arguments transmis au script exec de retour `arg1=yy&arg2=zz`
69
- * @param bool|string|int $mode
69
+ * @param boolean $mode
70 70
  *     - -1 : renvoyer action, arg et hash sous forme de array()
71 71
  *     - true ou false : renvoyer une url, avec `&amp;` (false) ou `&` (true)
72 72
  *     - string : renvoyer un formulaire
Please login to merge, or discard this patch.
ecrire/public/cacher.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
  * Attention a modifier simultanement le sanity check de
42 42
  * la fonction retire_cache() de inc/invalideur
43 43
  *
44
- * @param $nom_cache
44
+ * @param string $nom_cache
45 45
  * @return string
46 46
  */
47 47
 function cache_chemin_fichier($nom_cache, $ecrire = false) {
Please login to merge, or discard this patch.