@@ -243,6 +243,9 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | +/** |
|
| 247 | + * @param integer $lvl |
|
| 248 | + */ |
|
| 246 | 249 | function debug ($debugmsg, $lvl=E_USER_NOTICE) { |
| 247 | 250 | trigger_error("MagpieRSS [debug] $debugmsg", $lvl); |
| 248 | 251 | } |
@@ -289,6 +292,9 @@ discard block |
||
| 289 | 292 | Input: an HTTP response object (see Snoopy) |
| 290 | 293 | Output: parsed RSS object (see rss_parse) |
| 291 | 294 | \*=======================================================================*/ |
| 295 | +/** |
|
| 296 | + * @param Snoopy $resp |
|
| 297 | + */ |
|
| 292 | 298 | function _response_to_rss ($resp) { |
| 293 | 299 | $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING ); |
| 294 | 300 | |
@@ -48,6 +48,9 @@ discard block |
||
| 48 | 48 | Input: url from wich the rss file was fetched |
| 49 | 49 | Output: true on sucess |
| 50 | 50 | \*=======================================================================*/ |
| 51 | + /** |
|
| 52 | + * @param string $url |
|
| 53 | + */ |
|
| 51 | 54 | function set ($url, $rss) { |
| 52 | 55 | $this->ERROR = ""; |
| 53 | 56 | $cache_file = $this->file_name( $url ); |
@@ -74,6 +77,9 @@ discard block |
||
| 74 | 77 | Input: url from wich the rss file was fetched |
| 75 | 78 | Output: cached object on HIT, false on MISS |
| 76 | 79 | \*=======================================================================*/ |
| 80 | + /** |
|
| 81 | + * @param string $url |
|
| 82 | + */ |
|
| 77 | 83 | function get ($url) { |
| 78 | 84 | $this->ERROR = ""; |
| 79 | 85 | $cache_file = $this->file_name( $url ); |
@@ -110,6 +116,9 @@ discard block |
||
| 110 | 116 | Input: url from wich the rss file was fetched |
| 111 | 117 | Output: cached object on HIT, false on MISS |
| 112 | 118 | \*=======================================================================*/ |
| 119 | + /** |
|
| 120 | + * @param string $url |
|
| 121 | + */ |
|
| 113 | 122 | function check_cache ( $url ) { |
| 114 | 123 | $this->ERROR = ""; |
| 115 | 124 | $filename = $this->file_name( $url ); |
@@ -156,6 +165,9 @@ discard block |
||
| 156 | 165 | /*=======================================================================*\ |
| 157 | 166 | Function: unserialize |
| 158 | 167 | \*=======================================================================*/ |
| 168 | + /** |
|
| 169 | + * @param string $data |
|
| 170 | + */ |
|
| 159 | 171 | function unserialize ( $data ) { |
| 160 | 172 | return unserialize( $data ); |
| 161 | 173 | } |
@@ -332,6 +332,10 @@ discard block |
||
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | // smart append - field and namespace aware |
| 335 | + |
|
| 336 | + /** |
|
| 337 | + * @param string $el |
|
| 338 | + */ |
|
| 335 | 339 | function append($el, $text) { |
| 336 | 340 | if (!$el) { |
| 337 | 341 | return; |
@@ -447,6 +451,10 @@ discard block |
||
| 447 | 451 | /** |
| 448 | 452 | * return XML parser, and possibly re-encoded source |
| 449 | 453 | * |
| 454 | + * @param string $source |
|
| 455 | + * @param string $out_enc |
|
| 456 | + * @param string|null $in_enc |
|
| 457 | + * @param boolean $detect |
|
| 450 | 458 | */ |
| 451 | 459 | function create_parser($source, $out_enc, $in_enc, $detect) { |
| 452 | 460 | if ( substr(phpversion(),0,1) == 5) { |
@@ -556,6 +564,9 @@ discard block |
||
| 556 | 564 | } |
| 557 | 565 | } |
| 558 | 566 | |
| 567 | + /** |
|
| 568 | + * @param integer $lvl |
|
| 569 | + */ |
|
| 559 | 570 | function error ($errormsg, $lvl=E_USER_WARNING) { |
| 560 | 571 | // append PHP's error message if track_errors enabled |
| 561 | 572 | if ( isset($php_errormsg) ) { |
@@ -591,6 +602,9 @@ discard block |
||
| 591 | 602 | define('CASE_LOWER', 0); |
| 592 | 603 | |
| 593 | 604 | |
| 605 | + /** |
|
| 606 | + * @param integer $case |
|
| 607 | + */ |
|
| 594 | 608 | function array_change_key_case($array, $case=CASE_LOWER) { |
| 595 | 609 | $output = array(); |
| 596 | 610 | switch($case){ |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | // sanitize array |
| 17 | 17 | if (!function_exists('modx_sanitize_gpc')) { |
| 18 | 18 | /** |
| 19 | - * @param array|string $values |
|
| 19 | + * @param string $values |
|
| 20 | 20 | * @param int $depth |
| 21 | 21 | * @return array|string |
| 22 | 22 | */ |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | * |
| 173 | 173 | * @param string $param |
| 174 | 174 | * @param array $tvsArray |
| 175 | - * @return mixed |
|
| 175 | + * @return string |
|
| 176 | 176 | */ |
| 177 | 177 | function parseTvValues($param, $tvsArray) |
| 178 | 178 | { |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | /** |
| 567 | 567 | * returns an array if a delimiter is present. returns array is a recordset is present |
| 568 | 568 | * |
| 569 | - * @param $src |
|
| 569 | + * @param string $src |
|
| 570 | 570 | * @param string $delim |
| 571 | 571 | * @param string $type |
| 572 | 572 | * @param bool $columns |
@@ -1022,7 +1022,7 @@ discard block |
||
| 1022 | 1022 | |
| 1023 | 1023 | if (! function_exists('ParseIntputOptions')) { |
| 1024 | 1024 | /** |
| 1025 | - * @param string|array|mysqli_result $v |
|
| 1025 | + * @param string $v |
|
| 1026 | 1026 | * @return array |
| 1027 | 1027 | */ |
| 1028 | 1028 | function ParseIntputOptions($v) |
@@ -237,7 +237,7 @@ |
||
| 237 | 237 | /** |
| 238 | 238 | * build siteCache file |
| 239 | 239 | * @param DocumentParser $modx |
| 240 | - * @return boolean success |
|
| 240 | + * @return null|boolean success |
|
| 241 | 241 | */ |
| 242 | 242 | public function buildCache($modx) |
| 243 | 243 | { |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | - * @return mixed |
|
| 66 | + * @return string |
|
| 67 | 67 | */ |
| 68 | 68 | public function getOutput() |
| 69 | 69 | { |
@@ -278,8 +278,7 @@ discard block |
||
| 278 | 278 | /** |
| 279 | 279 | * Sets the width attribute of each column in the array. |
| 280 | 280 | * |
| 281 | - * @param array $value An Array of column widths in the order of the keys in the |
|
| 282 | - * source table array. |
|
| 281 | + * @param string[] $widthArray |
|
| 283 | 282 | */ |
| 284 | 283 | public function setColumnWidths($widthArray) |
| 285 | 284 | { |
@@ -289,7 +288,6 @@ discard block |
||
| 289 | 288 | /** |
| 290 | 289 | * An optional array of values that can be preselected when using |
| 291 | 290 | * |
| 292 | - * @param array $value Indicates the INPUT form element type attribute. |
|
| 293 | 291 | */ |
| 294 | 292 | public function setSelectedValues($valueArray) |
| 295 | 293 | { |
@@ -326,7 +324,7 @@ discard block |
||
| 326 | 324 | /** |
| 327 | 325 | * Determines what class the current row should have applied. |
| 328 | 326 | * |
| 329 | - * @param int $value The position of the current row being rendered. |
|
| 327 | + * @param integer $position |
|
| 330 | 328 | * @return string |
| 331 | 329 | */ |
| 332 | 330 | public function determineRowClass($position) |
@@ -353,7 +351,6 @@ discard block |
||
| 353 | 351 | * Generates an onclick action applied to the current cell, to execute |
| 354 | 352 | * any specified cell actions. |
| 355 | 353 | * |
| 356 | - * @param string $value Indicates the INPUT form element type attribute. |
|
| 357 | 354 | * @return string |
| 358 | 355 | */ |
| 359 | 356 | public function getCellAction($currentActionFieldValue) |
@@ -395,7 +392,7 @@ discard block |
||
| 395 | 392 | /** |
| 396 | 393 | * Function to prepare a link generated in the table cell/link actions. |
| 397 | 394 | * |
| 398 | - * @param string $value Indicates the INPUT form element type attribute. |
|
| 395 | + * @param string $link |
|
| 399 | 396 | * @return string |
| 400 | 397 | */ |
| 401 | 398 | public function prepareLink($link) |
@@ -414,7 +411,7 @@ discard block |
||
| 414 | 411 | * |
| 415 | 412 | * @param array $fieldsArray The associative array representing the table rows |
| 416 | 413 | * and columns. |
| 417 | - * @param array $fieldHeadersArray An optional array of values for providing |
|
| 414 | + * @param string[] $fieldHeadersArray An optional array of values for providing |
|
| 418 | 415 | * alternative field headers; this is an associative arrays of keys from |
| 419 | 416 | * the $fieldsArray where the values represent the alt heading content |
| 420 | 417 | * for each column. |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | /** |
| 150 | 150 | * This function returns the current page number. |
| 151 | 151 | * |
| 152 | - * @return int |
|
| 152 | + * @return string |
|
| 153 | 153 | */ |
| 154 | 154 | public function getCurrentPage() |
| 155 | 155 | { |