@@ -88,6 +88,7 @@ discard block |
||
88 | 88 | * check if a file or folder writable |
89 | 89 | * |
90 | 90 | * @param file path $path |
91 | + * @param string $path |
|
91 | 92 | * @return boolean |
92 | 93 | */ |
93 | 94 | function isWritable($path=null) |
@@ -124,6 +125,7 @@ discard block |
||
124 | 125 | /** |
125 | 126 | * Returns true if the files is readable. |
126 | 127 | * |
128 | + * @param string $path |
|
127 | 129 | * @return boolean true if the files is readable. |
128 | 130 | */ |
129 | 131 | function isReadable($path =null) |
@@ -151,6 +153,7 @@ discard block |
||
151 | 153 | * @path the path for the new folder |
152 | 154 | * @mask |
153 | 155 | * @dirOwner |
156 | + * @param string $path |
|
154 | 157 | * @return boolean |
155 | 158 | */ |
156 | 159 | function mkdir($path = null, $mask=null, $dirOwner='') |
@@ -177,7 +180,8 @@ discard block |
||
177 | 180 | * change the own of a file or folder |
178 | 181 | * |
179 | 182 | * @param the file path $path |
180 | - * @param $owner |
|
183 | + * @param string $owner |
|
184 | + * @param string $path |
|
181 | 185 | */ |
182 | 186 | function chown($path, $owner) |
183 | 187 | { |
@@ -305,7 +309,7 @@ discard block |
||
305 | 309 | /** |
306 | 310 | * get file information |
307 | 311 | * |
308 | - * @return array |
|
312 | + * @return string |
|
309 | 313 | */ |
310 | 314 | function getFileInfo() |
311 | 315 | { |
@@ -358,6 +362,9 @@ discard block |
||
358 | 362 | return false; |
359 | 363 | } |
360 | 364 | |
365 | + /** |
|
366 | + * @param string $info |
|
367 | + */ |
|
361 | 368 | function _debug($info) |
362 | 369 | { |
363 | 370 | if($this->debug) |
@@ -47,7 +47,6 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * keep tracks of each changes made to an image |
49 | 49 | * |
50 | - * @param string $key |
|
51 | 50 | * @param string $info array('name', 'restorable', 'is_original') |
52 | 51 | */ |
53 | 52 | function add($info) |
@@ -57,7 +56,7 @@ discard block |
||
57 | 56 | /** |
58 | 57 | * get the lastest changes for restore |
59 | 58 | * |
60 | - * @return array array('name', 'restorable', 'is_original') |
|
59 | + * @return integer array('name', 'restorable', 'is_original') |
|
61 | 60 | */ |
62 | 61 | function getNumRestorable() |
63 | 62 | { |
@@ -85,7 +85,6 @@ discard block |
||
85 | 85 | /** |
86 | 86 | * append to errors array and shown the each error when the debug turned on |
87 | 87 | * |
88 | - * @param string $string |
|
89 | 88 | * @return void |
90 | 89 | * @access private |
91 | 90 | * @copyright this function originally come from Andy's php |
@@ -349,7 +348,7 @@ discard block |
||
349 | 348 | * @param boolean $unchangeIfsmaller keep the orignial size if the orignial smaller than the new size |
350 | 349 | * |
351 | 350 | * |
352 | - * @return mixed none or PEAR_error |
|
351 | + * @return boolean none or PEAR_error |
|
353 | 352 | */ |
354 | 353 | function resize( $new_x, $new_y, $constraint= false, $unchangeIfsmaller=false) |
355 | 354 | { |
@@ -414,11 +413,9 @@ discard block |
||
414 | 413 | /** |
415 | 414 | * resize the image and return the thumbnail image details array("width"=>, "height"=>, "name") |
416 | 415 | * |
417 | - * @param string $fileName |
|
418 | 416 | * @param int $new_x the thumbnail width |
419 | 417 | * @param int $new_y the thumbnail height |
420 | - * @param string $mode can be save, view and both |
|
421 | - * @return unknown |
|
418 | + * @return boolean |
|
422 | 419 | */ |
423 | 420 | function _resize( $new_x, $new_y) |
424 | 421 | { |
@@ -576,7 +573,7 @@ discard block |
||
576 | 573 | /** |
577 | 574 | * flip horizontal |
578 | 575 | * |
579 | - * @return string |
|
576 | + * @return boolean |
|
580 | 577 | */ |
581 | 578 | function flipHorizontal() |
582 | 579 | { |
@@ -791,7 +788,7 @@ discard block |
||
791 | 788 | * @access private |
792 | 789 | * @param $dst_w width |
793 | 790 | * @param $dst_h height |
794 | - * @return boolean |
|
791 | + * @return boolean|null |
|
795 | 792 | * @copyright original from noname at nivelzero dot ro |
796 | 793 | */ |
797 | 794 | function _createFinalImageHandler($dst_w, $dst_h) |
@@ -268,6 +268,7 @@ |
||
268 | 268 | * return the file type of a file. |
269 | 269 | * |
270 | 270 | * @param string file name |
271 | + * @param string $fileName |
|
271 | 272 | * @return array |
272 | 273 | */ |
273 | 274 | function getFileType($fileName, $checkIfDir = false) |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | /** |
218 | 218 | * get the first item number |
219 | 219 | * |
220 | - * @return interger the first item number displayed within current page |
|
220 | + * @return integer the first item number displayed within current page |
|
221 | 221 | */ |
222 | 222 | function getFirstItem() |
223 | 223 | { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | /** |
234 | 234 | * get the last item number displayed within current page |
235 | 235 | * |
236 | - * @return interger the last item number |
|
236 | + * @return integer the last item number |
|
237 | 237 | */ |
238 | 238 | function getLastItem() |
239 | 239 | { |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | * used for Query . e.g SELECT SQL_CALC_FOUND_ROWS * |
277 | 277 | * FROM mytable LIMIT getPageOffset(), getItemsPerPage() |
278 | 278 | * |
279 | - * @return iner |
|
279 | + * @return integer |
|
280 | 280 | */ |
281 | 281 | function getPageOffset() |
282 | 282 | { |
@@ -341,7 +341,6 @@ discard block |
||
341 | 341 | /** |
342 | 342 | * get the previous page url if anywhere |
343 | 343 | * |
344 | - * @param array $excludedQueryStrings excluded the value from $_GET |
|
345 | 344 | * @return string the previous page url |
346 | 345 | */ |
347 | 346 | function getPreviousUrl() |
@@ -368,7 +367,6 @@ discard block |
||
368 | 367 | /** |
369 | 368 | * get the next page url if anywhere |
370 | 369 | * |
371 | - * @param array $excludedQueryStrings excluded the value from $_GET |
|
372 | 370 | * @return string the next page url |
373 | 371 | */ |
374 | 372 | function getNextUrl() |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | /** |
73 | 73 | * session init |
74 | - * @return boolean |
|
74 | + * @return boolean|null |
|
75 | 75 | */ |
76 | 76 | function init() |
77 | 77 | { |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | /** |
191 | 191 | * log action taken by the gc |
192 | 192 | * |
193 | - * @param unknown_type $msg |
|
193 | + * @param string $msg |
|
194 | 194 | */ |
195 | 195 | function _log($msg) |
196 | 196 | { |
@@ -173,7 +173,6 @@ discard block |
||
173 | 173 | /** |
174 | 174 | * get a file extension |
175 | 175 | * |
176 | - * @param string $fileName the path to a file or just the file name |
|
177 | 176 | */ |
178 | 177 | function getFileExt() |
179 | 178 | { |
@@ -186,7 +185,7 @@ discard block |
||
186 | 185 | * @param string $dest the path to the directory which the uploaded file will be moved to |
187 | 186 | * @param string $fileBaseName the base name which the uploaded file will be renamed to |
188 | 187 | * @param unknown_type $overwrite |
189 | - * @return unknown |
|
188 | + * @return boolean |
|
190 | 189 | */ |
191 | 190 | function moveUploadedFile($dest, $fileBaseName = '', $overwrite=false) |
192 | 191 | { |
@@ -320,8 +319,8 @@ discard block |
||
320 | 319 | * |
321 | 320 | * @access public |
322 | 321 | * |
323 | - * @param mixed $new_x |
|
324 | - * @param mixed $new_y |
|
322 | + * @param integer $new_x |
|
323 | + * @param integer $new_y |
|
325 | 324 | * @param string $thumb_suffix |
326 | 325 | * |
327 | 326 | * @return mixed none or PEAR_error |
@@ -410,7 +409,8 @@ discard block |
||
410 | 409 | /** |
411 | 410 | * |
412 | 411 | * @access public |
413 | - * @return void |
|
412 | + * @param string $image |
|
413 | + * @return boolean|null |
|
414 | 414 | */ |
415 | 415 | function _get_image_details($image) |
416 | 416 | { |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | /** |
545 | 545 | * return the directory path witch the file uploaded to |
546 | 546 | * |
547 | - * @return unknown |
|
547 | + * @return string |
|
548 | 548 | */ |
549 | 549 | function getDirPath() |
550 | 550 | { |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | /** |
582 | 582 | * get uploaded file size |
583 | 583 | * |
584 | - * @return string |
|
584 | + * @return integer |
|
585 | 585 | */ |
586 | 586 | function getFileSize() |
587 | 587 | { |
@@ -17,6 +17,12 @@ discard block |
||
17 | 17 | */ |
18 | 18 | if (!function_exists("stripos")) |
19 | 19 | { |
20 | + /** |
|
21 | + * @param string $str |
|
22 | + * @param string $needle |
|
23 | + * |
|
24 | + * @return string |
|
25 | + */ |
|
20 | 26 | function stripos($str,$needle,$offset=0) |
21 | 27 | { |
22 | 28 | return @strpos(strtolower($str),strtolower($needle),$offset); |
@@ -420,6 +426,9 @@ discard block |
||
420 | 426 | } |
421 | 427 | } |
422 | 428 | |
429 | +/** |
|
430 | + * @param string $path |
|
431 | + */ |
|
423 | 432 | function myRealPath($path) { |
424 | 433 | |
425 | 434 | if(strpos($path, ':/') !== false) |
@@ -567,7 +576,7 @@ discard block |
||
567 | 576 | /** |
568 | 577 | * get site root path |
569 | 578 | * |
570 | - * @return String. |
|
579 | + * @return string |
|
571 | 580 | */ |
572 | 581 | function getRootPath() { |
573 | 582 | $output = ''; |
@@ -620,7 +629,8 @@ discard block |
||
620 | 629 | /** |
621 | 630 | * get a file extension |
622 | 631 | * |
623 | - * @param string $fileName the path to a file or just the file name |
|
632 | + * @param string $filePath |
|
633 | + * @return string |
|
624 | 634 | */ |
625 | 635 | function getFileExt($filePath) |
626 | 636 | { |
@@ -789,7 +799,7 @@ discard block |
||
789 | 799 | * |
790 | 800 | * @param string $pattern regular expression, separated by , if multiple |
791 | 801 | * @param string $string |
792 | - * @return booolean |
|
802 | + * @return boolean |
|
793 | 803 | */ |
794 | 804 | function isValidPattern( $pattern, $string) |
795 | 805 | { |
@@ -822,7 +832,7 @@ discard block |
||
822 | 832 | * |
823 | 833 | * @param string $pattern regular expression, separated by , if multiple |
824 | 834 | * @param string $string |
825 | - * @return booolean |
|
835 | + * @return boolean |
|
826 | 836 | */ |
827 | 837 | function isInvalidPattern( $pattern, $string) |
828 | 838 | { |
@@ -866,6 +876,10 @@ discard block |
||
866 | 876 | } |
867 | 877 | if (!function_exists('mime_content_type')) |
868 | 878 | { |
879 | + |
|
880 | + /** |
|
881 | + * @param string $f |
|
882 | + */ |
|
869 | 883 | function mime_content_type ( $f ) |
870 | 884 | { |
871 | 885 | return trim ( @exec ('file -bi ' . escapeshellarg ( $f ) ) ) ; |
@@ -1139,6 +1153,11 @@ discard block |
||
1139 | 1153 | |
1140 | 1154 | if(!function_exists("imagerotate")) |
1141 | 1155 | { |
1156 | + |
|
1157 | + /** |
|
1158 | + * @param resource|null $src_img |
|
1159 | + * @param integer $angle |
|
1160 | + */ |
|
1142 | 1161 | function imagerotate($src_img, $angle, $bicubic=false) |
1143 | 1162 | { |
1144 | 1163 | // convert degrees to radians |
@@ -220,7 +220,7 @@ |
||
220 | 220 | * @param mixed $context It optionally contains an array of every variable |
221 | 221 | * that existed in the scope the error was triggered in. |
222 | 222 | * |
223 | - * @return bool |
|
223 | + * @return boolean|null |
|
224 | 224 | */ |
225 | 225 | function pmf_error_handler($level, $message, $filename, $line, $context) |
226 | 226 | { |