Completed
Pull Request — master (#36)
by
unknown
06:08
created
ecrire/req/pg.exp.php 1 patch
Doc Comments   +32 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
 // http://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'];
@@ -290,6 +295,9 @@  discard block
 block discarded – undo
290 295
 }
291 296
 
292 297
 // http://code.spip.net/@spip_pg_alter_change
298
+/**
299
+ * @param string $arg
300
+ */
293 301
 function spip_pg_alter_change($table, $arg, $serveur = '', $requeter = true) {
294 302
 	if (!preg_match('/^`?(\w+)`?\s+`?(\w+)`?\s+(.*?)\s*(DEFAULT .*?)?(NOT\s+NULL)?\s*(DEFAULT .*?)?$/i', $arg, $r)) {
295 303
 		spip_log("alter change: $arg  incompris", 'pg.' . _LOG_ERREUR);
@@ -416,6 +424,7 @@  discard block
 block discarded – undo
416 424
  * @param string /array $champs : liste de champs sur lesquels s'applique l'index
417 425
  * @param string $serveur : nom de la connexion sql utilisee
418 426
  * @param bool $requeter : true pour executer la requete ou false pour retourner le texte de la requete
427
+ * @param string $champs
419 428
  *
420 429
  * @return bool ou requete
421 430
  */
@@ -591,6 +600,9 @@  discard block
 block discarded – undo
591 600
 }
592 601
 
593 602
 // http://code.spip.net/@spip_pg_orderby
603
+/**
604
+ * @param string $order
605
+ */
594 606
 function spip_pg_orderby($order, $select) {
595 607
 	$res = array();
596 608
 	$arg = (is_array($order) ? $order : preg_split('/\s*,\s*/', $order));
@@ -765,6 +777,9 @@  discard block
 block discarded – undo
765 777
 }
766 778
 
767 779
 // http://code.spip.net/@calculer_pg_where
780
+/**
781
+ * @param string $v
782
+ */
768 783
 function calculer_pg_where($v) {
769 784
 	if (!is_array($v)) {
770 785
 		return spip_pg_frommysql($v);
@@ -790,6 +805,9 @@  discard block
 block discarded – undo
790 805
 
791 806
 
792 807
 // http://code.spip.net/@calculer_pg_expression
808
+/**
809
+ * @param string $expression
810
+ */
793 811
 function calculer_pg_expression($expression, $v, $join = 'AND') {
794 812
 	if (empty($v)) {
795 813
 		return '';
@@ -841,6 +859,9 @@  discard block
 block discarded – undo
841 859
 }
842 860
 
843 861
 // http://code.spip.net/@spip_pg_fetch
862
+/**
863
+ * @param resource $res
864
+ */
844 865
 function spip_pg_fetch($res, $t = '', $serveur = '', $requeter = true) {
845 866
 
846 867
 	if ($res) {
@@ -912,6 +933,10 @@  discard block
 block discarded – undo
912 933
 }
913 934
 
914 935
 // http://code.spip.net/@spip_pg_insert
936
+/**
937
+ * @param string $champs
938
+ * @param string $valeurs
939
+ */
915 940
 function spip_pg_insert($table, $champs, $valeurs, $desc = array(), $serveur = '', $requeter = true) {
916 941
 	$connexion = &$GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0];
917 942
 	$prefixe = $connexion['prefixe'];
@@ -1148,6 +1173,9 @@  discard block
 block discarded – undo
1148 1173
 // Pas extensible pour le moment,
1149 1174
 
1150 1175
 // http://code.spip.net/@spip_pg_sequence
1176
+/**
1177
+ * @return string
1178
+ */
1151 1179
 function spip_pg_sequence($table, $raw = false) {
1152 1180
 
1153 1181
 	include_spip('base/serial');
@@ -1261,6 +1289,9 @@  discard block
 block discarded – undo
1261 1289
 }
1262 1290
 
1263 1291
 // http://code.spip.net/@spip_pg_error
1292
+/**
1293
+ * @param string $serveur
1294
+ */
1264 1295
 function spip_pg_error($query = '', $serveur, $requeter = true) {
1265 1296
 	$link = $GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0]['link'];
1266 1297
 	$s = $link ? pg_last_error($link) : pg_last_error();
@@ -1311,7 +1342,7 @@  discard block
 block discarded – undo
1311 1342
  * @param bool $requeter
1312 1343
  *     true pour éxecuter la requête
1313 1344
  *     false pour retourner le texte de la requête.
1314
- * @return ressource
1345
+ * @return resource
1315 1346
  *     Ressource à utiliser avec sql_fetch()
1316 1347
  **/
1317 1348
 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
 // http://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
 // http://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
 // http://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
 // http://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
 // http://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
 // http://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
 // http://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
 // http://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
 // http://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
 // http://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/inc/securiser_action.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -304,6 +304,7 @@
 block discarded – undo
304 304
  * @param string $url Url à autoriser en prévisu
305 305
  * @param int|null id_auteur qui génère le token de prévisu. Null utilisera auteur courant.
306 306
  * @param string $alea Nom de l’alea à utiliser
307
+ * @param integer $id_auteur
307 308
  * @return string Token, de la forme "{id}*{hash}"
308 309
  */
309 310
 function calculer_token_previsu($url, $id_auteur = null, $alea = 'alea_ephemere') {
Please login to merge, or discard this patch.
ecrire/public/quete.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 /**
29 29
  * Retourne l'URL de redirection d'un article virtuel, seulement si il est publié
30 30
  *
31
- * @param $id_article
32
- * @param $connect
33
- * @return array|bool|null
31
+ * @param integer $id_article
32
+ * @param string $connect
33
+ * @return string
34 34
  */
35 35
 function quete_virtuel($id_article, $connect) {
36 36
 	return sql_getfetsel(
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
  * @uses quete_parent_lang()
123 123
  *
124 124
  * @param int $id_article
125
- * @param $serveur
125
+ * @param string $serveur
126 126
  * @return int
127 127
  */
128 128
 function quete_rubrique($id_article, $serveur) {
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
  *
294 294
  * @param int $id_document
295 295
  * @param string $serveur
296
- * @return array|bool|null
296
+ * @return string
297 297
  */
298 298
 function quete_fichier($id_document, $serveur = '') {
299 299
 	return sql_getfetsel('fichier', 'spip_documents', ('id_document=' . intval($id_document)), '', array(), '', '', $serveur);
Please login to merge, or discard this patch.
ecrire/inc/lien.php 1 patch
Doc Comments   +13 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,6 +42,9 @@  discard block
 block discarded – undo
42 42
 define('_RACCOURCI_LIEN', "/\[([^][]*?([[]\w*[]][^][]*)*)->(>?)([^]]*)\]/msS");
43 43
 
44 44
 // http://code.spip.net/@expanser_liens
45
+/**
46
+ * @return string
47
+ */
45 48
 function expanser_liens($t, $connect = '', $env = array()) {
46 49
 
47 50
 	$t = pipeline('pre_liens', $t);
@@ -56,6 +59,9 @@  discard block
 block discarded – undo
56 59
 // Meme analyse mais pour eliminer les liens
57 60
 // et ne laisser que leur titre, a expliciter si ce n'est fait
58 61
 // http://code.spip.net/@nettoyer_raccourcis_typo
62
+/**
63
+ * @param string $texte
64
+ */
59 65
 function nettoyer_raccourcis_typo($texte, $connect = '') {
60 66
 	return $texte;
61 67
 }
@@ -96,6 +102,9 @@  discard block
 block discarded – undo
96 102
 // 'url':   seulement U  (i.e. generer_url_RACCOURCI)
97 103
 
98 104
 // http://code.spip.net/@calculer_url
105
+/**
106
+ * @return string
107
+ */
99 108
 function calculer_url($ref, $texte = '', $pour = 'url', $connect = '', $echappe_typo = true) {
100 109
 	$r = traiter_lien_implicite($ref, $texte, $pour, $connect, $echappe_typo);
101 110
 
@@ -256,7 +265,7 @@  discard block
 block discarded – undo
256 265
  * @param int $id Identifiant de l'objet
257 266
  * @param string $type Type d'objet
258 267
  * @param string|null $connect Connecteur SQL utilisé
259
- * @return array {
268
+ * @return string {
260 269
  * @var string $titre Titre si présent, sinon ''
261 270
  * @var string $lang Langue si présente, sinon ''
262 271
  * }
@@ -302,6 +311,9 @@  discard block
 block discarded – undo
302 311
 define('_RACCOURCI_MODELE_DEBUT', '@^' . _RACCOURCI_MODELE . '@isS');
303 312
 
304 313
 // http://code.spip.net/@traiter_modeles
314
+/**
315
+ * @return string
316
+ */
305 317
 function traiter_modeles($texte, $doublons = false, $echap = '', $connect = '', $liens = null, $env = array()) {
306 318
 	// preserver la compatibilite : true = recherche des documents
307 319
 	if ($doublons === true) {
Please login to merge, or discard this patch.
ecrire/base/abstract_sql.php 1 patch
Doc Comments   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -286,19 +286,19 @@  discard block
 block discarded – undo
286 286
  * @api
287 287
  * @uses sql_select()
288 288
  *
289
- * @param array|string $select
289
+ * @param string $select
290 290
  *    Liste des champs a recuperer (Select)
291
- * @param array|string $from
291
+ * @param string $from
292 292
  *    Tables a consulter (From)
293
- * @param array|string $where
293
+ * @param string $where
294 294
  *    Conditions a remplir (Where)
295
- * @param array|string $groupby
295
+ * @param string $groupby
296 296
  *    Critere de regroupement (Group by)
297
- * @param array|string $orderby
297
+ * @param string $orderby
298 298
  *    Tableau de classement (Order By)
299 299
  * @param string $limit
300 300
  *    Critere de limite (Limit)
301
- * @param array $having
301
+ * @param string $having
302 302
  *    Tableau des des post-conditions a remplir (Having)
303 303
  * @param string $serveur
304 304
  *    Le serveur sollicite (pour retrouver la connexion)
@@ -343,9 +343,9 @@  discard block
 block discarded – undo
343 343
  *    Tables a consulter (From)
344 344
  * @param array|string $where
345 345
  *    Conditions a remplir (Where)
346
- * @param array|string $groupby
346
+ * @param string $groupby
347 347
  *    Critere de regroupement (Group by)
348
- * @param array $having
348
+ * @param string $having
349 349
  *    Tableau des des post-conditions a remplir (Having)
350 350
  * @param string $serveur
351 351
  *    Le serveur sollicite (pour retrouver la connexion)
@@ -816,9 +816,9 @@  discard block
 block discarded – undo
816 816
  *     Nom de la table
817 817
  * @param array $exp
818 818
  *     Couples (colonne => valeur)
819
- * @param string|array $where
819
+ * @param string $where
820 820
  *     Conditions a remplir (Where)
821
- * @param array $desc
821
+ * @param string $desc
822 822
  *     Tableau de description des colonnes de la table SQL utilisée
823 823
  *     (il sera calculé si nécessaire s'il n'est pas transmis).
824 824
  * @param string $serveur
@@ -1632,17 +1632,17 @@  discard block
 block discarded – undo
1632 1632
  *
1633 1633
  * @param array|string $select
1634 1634
  *    Liste des champs a recuperer (Select)
1635
- * @param array|string $from
1635
+ * @param string $from
1636 1636
  *    Tables a consulter (From)
1637 1637
  * @param array|string $where
1638 1638
  *    Conditions a remplir (Where)
1639
- * @param array|string $groupby
1639
+ * @param string $groupby
1640 1640
  *    Critere de regroupement (Group by)
1641
- * @param array|string $orderby
1641
+ * @param string $orderby
1642 1642
  *    Tableau de classement (Order By)
1643 1643
  * @param string $limit
1644 1644
  *    Critere de limite (Limit)
1645
- * @param array $having
1645
+ * @param string $having
1646 1646
  *    Tableau des des post-conditions a remplir (Having)
1647 1647
  * @param string $serveur
1648 1648
  *    Le serveur sollicite (pour retrouver la connexion)
@@ -1700,7 +1700,7 @@  discard block
 block discarded – undo
1700 1700
  * @api
1701 1701
  * @uses sql_fetsel()
1702 1702
  *
1703
- * @param array|string $select
1703
+ * @param string $select
1704 1704
  *     Liste des champs à récupérer (Select)
1705 1705
  * @param array|string $from
1706 1706
  *     Tables à consulter (From)
@@ -2051,16 +2051,16 @@  discard block
 block discarded – undo
2051 2051
  * @api
2052 2052
  * @param string $in
2053 2053
  *     Colonne SQL sur laquelle appliquer le test
2054
- * @param array|string $select
2054
+ * @param string $select
2055 2055
  *     Liste des champs à récupérer (Select).
2056 2056
  *     La donnée extraite est le premier élément de la sélection.
2057
- * @param array|string $from
2057
+ * @param string $from
2058 2058
  *     Tables a consulter (From)
2059
- * @param array|string $where
2059
+ * @param string $where
2060 2060
  *     Conditions a remplir (Where)
2061
- * @param array|string $groupby
2061
+ * @param string $groupby
2062 2062
  *     Critere de regroupement (Group by)
2063
- * @param array|string $orderby
2063
+ * @param string $orderby
2064 2064
  *     Tableau de classement (Order By)
2065 2065
  * @param string $limit
2066 2066
  *     Critere de limite (Limit)
@@ -2159,7 +2159,7 @@  discard block
 block discarded – undo
2159 2159
  *    Nom du connecteur
2160 2160
  * @param bool $option
2161 2161
  *     Inutilisé
2162
- * @return bool
2162
+ * @return integer
2163 2163
  *     True si le champ est de type entier
2164 2164
  */
2165 2165
 function sql_test_int($type, $serveur = '', $option = true) {
@@ -2178,7 +2178,7 @@  discard block
 block discarded – undo
2178 2178
  *    Nom du connecteur
2179 2179
  * @param bool $option
2180 2180
  *     Inutilisé
2181
- * @return bool
2181
+ * @return integer
2182 2182
  *     True si le champ est de type entier
2183 2183
  */
2184 2184
 function sql_test_date($type, $serveur = '', $option = true) {
Please login to merge, or discard this patch.
ecrire/req/sqlite_fonctions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
  * @link http://www.sqlite.org/lang_corefunc.html Liste des fonctions natives
34 34
  * @link http://sqlite.org/changes.html Liste des évolutions
35 35
  * 
36
- * @param PDO|resource $sqlite Représente la connexion Sqlite
36
+ * @param PDO $sqlite Représente la connexion Sqlite
37 37
  * @return false|void
38 38
  */
39 39
 function _sqlite_init_functions(&$sqlite) {
Please login to merge, or discard this patch.
ecrire/req/sqlite_generique.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1528,8 +1528,8 @@  discard block
 block discarded – undo
1528 1528
  * @param string|array $select Champs sélectionnés
1529 1529
  * @param string|array $from Tables sélectionnées
1530 1530
  * @param string|array $where Contraintes
1531
- * @param string|array $groupby Regroupements
1532
- * @param string|array $orderby Tris
1531
+ * @param string $groupby Regroupements
1532
+ * @param string $orderby Tris
1533 1533
  * @param string $limit Limites de résultats
1534 1534
  * @param string|array $having Contraintes posts sélections
1535 1535
  * @param string $serveur Nom de la connexion
@@ -1687,7 +1687,7 @@  discard block
 block discarded – undo
1687 1687
  * @param string $nom_table Nom de la table SQL
1688 1688
  * @param string $serveur Nom de la connexion
1689 1689
  * @param bool $requeter Exécuter la requête, sinon la retourner
1690
- * @return array|string
1690
+ * @return string
1691 1691
  *     - chaîne vide si pas de description obtenue
1692 1692
  *     - string Texte de la requête si demandé
1693 1693
  *     - array description de la table sinon
@@ -2194,7 +2194,7 @@  discard block
 block discarded – undo
2194 2194
  * 4) Renommer la table B en A
2195 2195
  * 5) Remettre les index (qui sont supprimés avec la table A)
2196 2196
  *
2197
- * @param string|array $table
2197
+ * @param string $table
2198 2198
  *     - string : Nom de la table table,
2199 2199
  *     - array : couple (nom de la table => nom futur)
2200 2200
  * @param string|array $colonne
@@ -2597,7 +2597,7 @@  discard block
 block discarded – undo
2597 2597
  * stocke le resultat pour ne pas faire
2598 2598
  * de requetes showtable intempestives
2599 2599
  *
2600
- * @param  $table
2600
+ * @param  string $table
2601 2601
  * @param  $couples
2602 2602
  * @param string $desc
2603 2603
  * @param string $serveur
@@ -2789,7 +2789,7 @@  discard block
 block discarded – undo
2789 2789
 	 * Constructeur
2790 2790
 	 *
2791 2791
 	 * @param string $serveur
2792
-	 * @return bool
2792
+	 * @return false|null
2793 2793
 	 */
2794 2794
 	public function __construct($serveur = '') {
2795 2795
 		_sqlite_init();
Please login to merge, or discard this patch.