@@ -102,7 +102,6 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | /** Checks if the given file is really writable. The standard PHP function |
| 104 | 104 | * is_writable() does not work properly on Windows servers. |
| 105 | - * @param string $dir |
|
| 106 | 105 | * @return bool */ |
| 107 | 106 | |
| 108 | 107 | static function isWritable($filename) { |
@@ -114,7 +113,6 @@ discard block |
||
| 114 | 113 | } |
| 115 | 114 | |
| 116 | 115 | /** Get the extension from filename |
| 117 | - * @param string $file |
|
| 118 | 116 | * @param bool $toLower |
| 119 | 117 | * @return string */ |
| 120 | 118 | |
@@ -616,6 +616,9 @@ discard block |
||
| 616 | 616 | Output: |
| 617 | 617 | \*======================================================================*/ |
| 618 | 618 | |
| 619 | + /** |
|
| 620 | + * @param string $http_method |
|
| 621 | + */ |
|
| 619 | 622 | function _httprequest($url, $fp, $URI, $http_method, $content_type = "", $body = "") |
| 620 | 623 | { |
| 621 | 624 | $cookie_headers = ''; |
@@ -923,6 +926,10 @@ discard block |
||
| 923 | 926 | Output: post body |
| 924 | 927 | \*======================================================================*/ |
| 925 | 928 | |
| 929 | + /** |
|
| 930 | + * @param string $formvars |
|
| 931 | + * @param string $formfiles |
|
| 932 | + */ |
|
| 926 | 933 | function _prepare_post_body($formvars, $formfiles) |
| 927 | 934 | { |
| 928 | 935 | settype($formvars, "array"); |
@@ -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 | } |
@@ -31,6 +31,9 @@ discard block |
||
| 31 | 31 | public $renderPagerFnc; |
| 32 | 32 | public $renderPagerFncArgs; |
| 33 | 33 | |
| 34 | + /** |
|
| 35 | + * @param boolean|string $id |
|
| 36 | + */ |
|
| 34 | 37 | public function __construct($id, $ds, $pageSize = 10, $pageNumber = -1) { |
| 35 | 38 | global $_PAGE; // use view state object |
| 36 | 39 | |
@@ -77,6 +80,9 @@ discard block |
||
| 77 | 80 | $this->pageSize = $ps; |
| 78 | 81 | } |
| 79 | 82 | |
| 83 | + /** |
|
| 84 | + * @param DataGrid $fncName |
|
| 85 | + */ |
|
| 80 | 86 | public function setRenderRowFnc($fncName, $args = "") { |
| 81 | 87 | $this->renderRowFnc = &$fncName; |
| 82 | 88 | $this->renderRowFncArgs = $args; // extra agruments |
@@ -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){ |
@@ -72,6 +72,10 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public $cdelim; |
| 74 | 74 | |
| 75 | + /** |
|
| 76 | + * @param null|string $id |
|
| 77 | + * @param string $ds |
|
| 78 | + */ |
|
| 75 | 79 | public function __construct($id, $ds, $pageSize = 20, $pageNumber = -1) { |
| 76 | 80 | global $__DataGridCnt; |
| 77 | 81 | |
@@ -207,6 +211,9 @@ discard block |
||
| 207 | 211 | |
| 208 | 212 | // format column values |
| 209 | 213 | |
| 214 | + /** |
|
| 215 | + * @param integer $n |
|
| 216 | + */ |
|
| 210 | 217 | public function RenderRowFnc($n, $row) { |
| 211 | 218 | if($this->_alt == 0) { |
| 212 | 219 | $Style = $this->_itemStyle; |
@@ -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 | */ |
@@ -240,9 +240,9 @@ discard block |
||
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | /** |
| 243 | - * @param string|array $fields |
|
| 244 | - * @param string|array $from |
|
| 245 | - * @param string|array $where |
|
| 243 | + * @param string $fields |
|
| 244 | + * @param string $from |
|
| 245 | + * @param string $where |
|
| 246 | 246 | * @param string $orderBy |
| 247 | 247 | * @param string $limit |
| 248 | 248 | * @return bool|mysqli_result |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | * @param string $fromtable |
| 327 | 327 | * @param string $where |
| 328 | 328 | * @param string $limit |
| 329 | - * @return mixed |
|
| 329 | + * @return null|integer |
|
| 330 | 330 | */ |
| 331 | 331 | public function insert($fields, $intotable, $fromfields = "*", $fromtable = "", $where = "", $limit = "") |
| 332 | 332 | { |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | |
| 369 | 369 | /** |
| 370 | 370 | * @param $fields |
| 371 | - * @param $table |
|
| 371 | + * @param string $table |
|
| 372 | 372 | * @param string $where |
| 373 | 373 | * @return bool|mixed|mysqli_result |
| 374 | 374 | */ |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | /** |
| 437 | 437 | * @param null|mysqli $conn |
| 438 | - * @return mixed |
|
| 438 | + * @return integer |
|
| 439 | 439 | */ |
| 440 | 440 | public function getInsertId($conn = null) |
| 441 | 441 | { |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | } |
| 514 | 514 | |
| 515 | 515 | /** |
| 516 | - * @param $name |
|
| 516 | + * @param string $name |
|
| 517 | 517 | * @param mysqli_result|string $dsq |
| 518 | 518 | * @return array |
| 519 | 519 | */ |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | |
| 573 | 573 | /** |
| 574 | 574 | * @param string $table |
| 575 | - * @return array |
|
| 575 | + * @return boolean |
|
| 576 | 576 | */ |
| 577 | 577 | public function getTableMetaData($table) |
| 578 | 578 | { |
@@ -619,7 +619,7 @@ discard block |
||
| 619 | 619 | } |
| 620 | 620 | |
| 621 | 621 | /** |
| 622 | - * @param string|mysqli_result $rs |
|
| 622 | + * @param string $rs |
|
| 623 | 623 | * @param bool $index |
| 624 | 624 | * @return array |
| 625 | 625 | */ |