@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * before drawing the text |
110 | 110 | * ) |
111 | 111 | * |
112 | - * @return none |
|
112 | + * @return boolean |
|
113 | 113 | * @see PEAR::isError() |
114 | 114 | */ |
115 | 115 | function addText($params) |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * 'color_mask'=>array(r,g,b), named color or #rrggbb |
158 | 158 | * ) |
159 | 159 | * @author Pierre-Alain Joye |
160 | - * @return mixed none or a PEAR error object on error |
|
160 | + * @return boolean none or a PEAR error object on error |
|
161 | 161 | * @see PEAR::isError() |
162 | 162 | */ |
163 | 163 | function rotate($angle, $options=null) |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | * @param int $new_x new width |
341 | 341 | * @param int $new_y new height |
342 | 342 | * |
343 | - * @return true on success or pear error |
|
343 | + * @return boolean on success or pear error |
|
344 | 344 | * @see PEAR::isError() |
345 | 345 | */ |
346 | 346 | function _resize($new_x, $new_y) { |
@@ -371,10 +371,6 @@ discard block |
||
371 | 371 | /** |
372 | 372 | * Crop the image |
373 | 373 | * |
374 | - * @param int $crop_x left column of the image |
|
375 | - * @param int $crop_y top row of the image |
|
376 | - * @param int $crop_width new cropped image width |
|
377 | - * @param int $crop_height new cropped image height |
|
378 | 374 | */ |
379 | 375 | function crop($new_x, $new_y, $new_width, $new_height) |
380 | 376 | { |
@@ -533,7 +529,7 @@ discard block |
||
533 | 529 | * |
534 | 530 | * @param string $filename the name of the file to write to |
535 | 531 | * @param int $quality output DPI, default is 85 |
536 | - * @param string $types define the output format, default |
|
532 | + * @param string $type define the output format, default |
|
537 | 533 | * is the current used format |
538 | 534 | * |
539 | 535 | * @return none |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * Save the image file |
188 | 188 | * |
189 | 189 | * @param string $filename the name of the file to write to |
190 | - * @param quality $quality image dpi, default=75 |
|
190 | + * @param integer $quality image dpi, default=75 |
|
191 | 191 | * @param string $type (JPG,PNG...) |
192 | 192 | * |
193 | 193 | * @return none |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | /** |
229 | 229 | * Destroy image handle |
230 | 230 | * |
231 | - * @return none |
|
231 | + * @return boolean |
|
232 | 232 | */ |
233 | 233 | function free() |
234 | 234 | { |
@@ -108,6 +108,7 @@ |
||
108 | 108 | * @param string $action, should be 'crop', 'scale', 'rotate','flip', or 'save' |
109 | 109 | * @param string $relative the relative image filename |
110 | 110 | * @param string $fullpath the fullpath to the image file |
111 | + * @param string $action |
|
111 | 112 | * @return array with image information |
112 | 113 | * <code>array('src'=>'url of the image', 'dimensions'=>'width="xx" height="yy"', |
113 | 114 | * 'file'=>'image file, relative', 'fullpath'=>'full path to the image');</code> |
@@ -191,6 +191,7 @@ discard block |
||
191 | 191 | /** |
192 | 192 | * Count the number of files and directories in a given folder |
193 | 193 | * minus the thumbnail folders and thumbnails. |
194 | + * @param string $path |
|
194 | 195 | */ |
195 | 196 | function countFiles($path) |
196 | 197 | { |
@@ -230,7 +231,7 @@ discard block |
||
230 | 231 | /** |
231 | 232 | * Check if the file contains the thumbnail prefix. |
232 | 233 | * @param string $file filename to be checked |
233 | - * @return true if the file contains the thumbnail prefix, false otherwise. |
|
234 | + * @return boolean if the file contains the thumbnail prefix, false otherwise. |
|
234 | 235 | */ |
235 | 236 | function isThumb($file) |
236 | 237 | { |
@@ -244,7 +245,7 @@ discard block |
||
244 | 245 | /** |
245 | 246 | * Check if the given directory is a thumbnail directory. |
246 | 247 | * @param string $entry directory name |
247 | - * @return true if it is a thumbnail directory, false otherwise |
|
248 | + * @return boolean if it is a thumbnail directory, false otherwise |
|
248 | 249 | */ |
249 | 250 | function isThumbDir($entry) |
250 | 251 | { |
@@ -394,7 +395,7 @@ discard block |
||
394 | 395 | * The dir must be relative to the base_dir and exists. |
395 | 396 | * If 'validate_images' is set to true, only file with |
396 | 397 | * image dimensions will be accepted. |
397 | - * @return null |
|
398 | + * @return null|boolean |
|
398 | 399 | */ |
399 | 400 | function processUploads() |
400 | 401 | { |
@@ -587,7 +588,7 @@ discard block |
||
587 | 588 | |
588 | 589 | /** |
589 | 590 | * Delete and specified files. |
590 | - * @return boolean true if delete, false otherwise |
|
591 | + * @return boolean|null true if delete, false otherwise |
|
591 | 592 | */ |
592 | 593 | function deleteFiles() |
593 | 594 | { |
@@ -648,7 +649,7 @@ discard block |
||
648 | 649 | /** |
649 | 650 | * Create new directories. |
650 | 651 | * If in safe_mode, nothing happens. |
651 | - * @return boolean true if created, false otherwise. |
|
652 | + * @return boolean|null true if created, false otherwise. |
|
652 | 653 | */ |
653 | 654 | function processNewDir() |
654 | 655 | { |
@@ -445,7 +445,7 @@ |
||
445 | 445 | /** |
446 | 446 | * reduce a string by removing leading and trailing comments and whitespace |
447 | 447 | * |
448 | - * @param $str string string value to strip of comments and whitespace |
|
448 | + * @param string $str string string value to strip of comments and whitespace |
|
449 | 449 | * |
450 | 450 | * @return string string value stripped of comments and whitespace |
451 | 451 | * @access private |
@@ -19,6 +19,9 @@ |
||
19 | 19 | return $JSON_Singleton; |
20 | 20 | } |
21 | 21 | |
22 | + /** |
|
23 | + * @param string $str |
|
24 | + */ |
|
22 | 25 | function json_decode($str, $loose = FALSE) |
23 | 26 | { |
24 | 27 | $json =& get_json(); |
@@ -177,6 +177,11 @@ discard block |
||
177 | 177 | ."$size -x $x -y ".$y+$size." -text \"$text\""; |
178 | 178 | } // End addText |
179 | 179 | |
180 | + /** |
|
181 | + * @param string|null $type |
|
182 | + * @param integer $quality |
|
183 | + * @param string|null $save_type |
|
184 | + */ |
|
180 | 185 | function _postProcess($type, $quality, $save_type) |
181 | 186 | { |
182 | 187 | $type = is_null($type) || $type==''? $this->type : $type; |
@@ -244,7 +249,7 @@ discard block |
||
244 | 249 | /** |
245 | 250 | * Destroy image handle |
246 | 251 | * |
247 | - * @return none |
|
252 | + * @return boolean |
|
248 | 253 | */ |
249 | 254 | function free() |
250 | 255 | { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * |
114 | 114 | * @param string $driver name of driver class to initialize |
115 | 115 | * |
116 | - * @return mixed a newly created Image_Transform object, or a PEAR |
|
116 | + * @return string a newly created Image_Transform object, or a PEAR |
|
117 | 117 | * error object on error |
118 | 118 | * |
119 | 119 | * @see PEAR::isError() |
@@ -141,10 +141,10 @@ discard block |
||
141 | 141 | * |
142 | 142 | * @access public |
143 | 143 | * |
144 | - * @param mixed $new_x (0, number, percentage 10% or 0.1) |
|
145 | - * @param mixed $new_y (0, number, percentage 10% or 0.1) |
|
144 | + * @param integer $new_x (0, number, percentage 10% or 0.1) |
|
145 | + * @param integer $new_y (0, number, percentage 10% or 0.1) |
|
146 | 146 | * |
147 | - * @return mixed none or PEAR_error |
|
147 | + * @return PEAR_error|null none or PEAR_error |
|
148 | 148 | */ |
149 | 149 | function resize($new_x = 0, $new_y = 0) |
150 | 150 | { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * Scale the image to have the max x dimension specified. |
161 | 161 | * |
162 | 162 | * @param int $new_x Size to scale X-dimension to |
163 | - * @return none |
|
163 | + * @return PEAR_error|null |
|
164 | 164 | */ |
165 | 165 | function scaleMaxX($new_x) |
166 | 166 | { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * |
174 | 174 | * @access public |
175 | 175 | * @param int $new_y Size to scale Y-dimension to |
176 | - * @return none |
|
176 | + * @return PEAR_error|null |
|
177 | 177 | */ |
178 | 178 | function scaleMaxY($new_y) |
179 | 179 | { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | * |
187 | 187 | * @access public |
188 | 188 | * @param mixed (number, percentage 10% or 0.1) |
189 | - * @return mixed none or PEAR_error |
|
189 | + * @return PEAR_error|null none or PEAR_error |
|
190 | 190 | */ |
191 | 191 | function scale($size) |
192 | 192 | { |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | * |
207 | 207 | * @access public |
208 | 208 | * @param int $size Percentage of original size to scale to |
209 | - * @return none |
|
209 | + * @return PEAR_error|null |
|
210 | 210 | */ |
211 | 211 | function scaleByPercentage($size) |
212 | 212 | { |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * |
221 | 221 | * @access public |
222 | 222 | * @param float $size Factor of original size to scale to |
223 | - * @return none |
|
223 | + * @return PEAR_error|null |
|
224 | 224 | */ |
225 | 225 | function scaleByFactor($size) |
226 | 226 | { |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | * |
235 | 235 | * @access public |
236 | 236 | * @param int $size Max dimension in pixels |
237 | - * @return none |
|
237 | + * @return PEAR_error|null |
|
238 | 238 | */ |
239 | 239 | function scaleByLength($size) |
240 | 240 | { |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | /** |
253 | 253 | * |
254 | 254 | * @access public |
255 | - * @return void |
|
255 | + * @return boolean|null |
|
256 | 256 | */ |
257 | 257 | function _get_image_details($image) |
258 | 258 | { |
@@ -310,10 +310,10 @@ discard block |
||
310 | 310 | * |
311 | 311 | * @access private |
312 | 312 | * |
313 | - * @param mixed $new_size (0, number, percentage 10% or 0.1) |
|
313 | + * @param integer $new_size (0, number, percentage 10% or 0.1) |
|
314 | 314 | * @param int $old_size |
315 | 315 | * |
316 | - * @return mixed none or PEAR_error |
|
316 | + * @return integer none or PEAR_error |
|
317 | 317 | */ |
318 | 318 | function _parse_size($new_size, $old_size) |
319 | 319 | { |
@@ -337,6 +337,10 @@ discard block |
||
337 | 337 | } |
338 | 338 | |
339 | 339 | //delete old tmp files, and allow only 1 file per remote host. |
340 | + |
|
341 | + /** |
|
342 | + * @param string $id |
|
343 | + */ |
|
340 | 344 | function cleanUp($id, $dir) |
341 | 345 | { |
342 | 346 | $d = dir($dir); |
@@ -525,7 +529,7 @@ discard block |
||
525 | 529 | * Reverse of rgb2colorname. |
526 | 530 | * |
527 | 531 | * @access public |
528 | - * @return PEAR_error |
|
532 | + * @return string |
|
529 | 533 | * |
530 | 534 | * @see rgb2colorname |
531 | 535 | */ |
@@ -133,6 +133,10 @@ discard block |
||
133 | 133 | |
134 | 134 | |
135 | 135 | // Analyze file by name |
136 | + |
|
137 | + /** |
|
138 | + * @param string $filename |
|
139 | + */ |
|
136 | 140 | public function Analyze($filename) { |
137 | 141 | |
138 | 142 | // Init and save values |
@@ -482,6 +486,12 @@ discard block |
||
482 | 486 | |
483 | 487 | |
484 | 488 | // Convert string between charsets -- iconv() wrapper |
489 | + |
|
490 | + /** |
|
491 | + * @param string $out_charset |
|
492 | + * |
|
493 | + * @return string |
|
494 | + */ |
|
485 | 495 | public function iconv($in_charset, $out_charset, $string, $drop01 = false) { |
486 | 496 | |
487 | 497 | if ($drop01 && ($string === "\x00" || $string === "\x01")) { |
@@ -509,6 +519,9 @@ discard block |
||
509 | 519 | |
510 | 520 | |
511 | 521 | |
522 | + /** |
|
523 | + * @param string $name |
|
524 | + */ |
|
512 | 525 | public function include_module($name) { |
513 | 526 | |
514 | 527 | if (!file_exists($this->include_path.'module.'.$name.'.php')) { |
@@ -520,6 +533,9 @@ discard block |
||
520 | 533 | |
521 | 534 | |
522 | 535 | |
536 | + /** |
|
537 | + * @param string $name |
|
538 | + */ |
|
523 | 539 | public function include_module_optional($name) { |
524 | 540 | |
525 | 541 | if (!file_exists($this->include_path.'module.'.$name.'.php')) { |
@@ -1208,6 +1224,9 @@ discard block |
||
1208 | 1224 | } |
1209 | 1225 | |
1210 | 1226 | |
1227 | + /** |
|
1228 | + * @param integer $whence |
|
1229 | + */ |
|
1211 | 1230 | protected function fseek($bytes, $whence = SEEK_SET) { |
1212 | 1231 | |
1213 | 1232 | if ($this->data_string_flag) { |
@@ -1325,6 +1344,10 @@ discard block |
||
1325 | 1344 | |
1326 | 1345 | |
1327 | 1346 | // Convert number to Little Endian byte string |
1347 | + |
|
1348 | + /** |
|
1349 | + * @param integer $number |
|
1350 | + */ |
|
1328 | 1351 | public static function LittleEndian2String($number, $minbytes=1, $synchsafe=false) { |
1329 | 1352 | $intstring = ''; |
1330 | 1353 | while ($number > 0) { |
@@ -1364,6 +1387,10 @@ discard block |
||
1364 | 1387 | |
1365 | 1388 | |
1366 | 1389 | // Convert Big Endian byte sybc safe string to int - max 32 bits |
1390 | + |
|
1391 | + /** |
|
1392 | + * @param string $byte_word |
|
1393 | + */ |
|
1367 | 1394 | public static function BigEndianSyncSafe2Int($byte_word) { |
1368 | 1395 | |
1369 | 1396 | $int_value = 0; |
@@ -1391,6 +1418,9 @@ discard block |
||
1391 | 1418 | |
1392 | 1419 | |
1393 | 1420 | |
1421 | + /** |
|
1422 | + * @param string $byte_word |
|
1423 | + */ |
|
1394 | 1424 | public static function BigEndian2Float($byte_word) { |
1395 | 1425 | |
1396 | 1426 | // ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic |
@@ -1471,6 +1501,9 @@ discard block |
||
1471 | 1501 | |
1472 | 1502 | |
1473 | 1503 | |
1504 | + /** |
|
1505 | + * @param string $byte_word |
|
1506 | + */ |
|
1474 | 1507 | public static function LittleEndian2Float($byte_word) { |
1475 | 1508 | |
1476 | 1509 | return getid3_lib::BigEndian2Float(strrev($byte_word)); |
@@ -1478,6 +1511,9 @@ discard block |
||
1478 | 1511 | |
1479 | 1512 | |
1480 | 1513 | |
1514 | + /** |
|
1515 | + * @param string $binary_numerator |
|
1516 | + */ |
|
1481 | 1517 | public static function DecimalBinary2Float($binary_numerator) { |
1482 | 1518 | $numerator = bindec($binary_numerator); |
1483 | 1519 | $denominator = bindec('1'.str_repeat('0', strlen($binary_numerator))); |
@@ -1512,6 +1548,9 @@ discard block |
||
1512 | 1548 | // - OR just substring(data) if length is negative! |
1513 | 1549 | // indexes == 'IGNORE**' are ignored |
1514 | 1550 | |
1551 | + /** |
|
1552 | + * @param string $algorithm |
|
1553 | + */ |
|
1515 | 1554 | public static function ReadSequence($algorithm, &$target, &$data, $offset, $parts_array) { |
1516 | 1555 | |
1517 | 1556 | // Loop thru $parts_array |