| @@ -54,6 +54,9 @@ discard block | ||
| 54 | 54 | )); | 
| 55 | 55 | |
| 56 | 56 | |
| 57 | +/** | |
| 58 | + * @param string $string | |
| 59 | + */ | |
| 57 | 60 |  function RemoveAccents($string) { | 
| 58 | 61 | // Revised version by markstewardØhotmail*com | 
| 59 | 62 |  	return strtr(strtr($string, 'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ', 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'), array('Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh', 'ß' => 'ss', '' => 'OE', '' => 'oe', 'Æ' => 'AE', 'æ' => 'ae', 'µ' => 'u')); | 
| @@ -81,6 +84,9 @@ discard block | ||
| 81 | 84 | return '<span style="color: #'.BitrateColor($bitrate).'">'.number_format($bitrate, $decimals).' kbps</span>'; | 
| 82 | 85 | } | 
| 83 | 86 | |
| 87 | +/** | |
| 88 | + * @param string $filename | |
| 89 | + */ | |
| 84 | 90 |  function fileextension($filename, $numextensions=1) { | 
| 85 | 91 |  	if (strstr($filename, '.')) { | 
| 86 | 92 | $reversedfilename = strrev($filename); | 
| @@ -152,6 +158,9 @@ discard block | ||
| 152 | 158 | return $filename; | 
| 153 | 159 | } | 
| 154 | 160 | |
| 161 | +/** | |
| 162 | + * @param string $SQLquery | |
| 163 | + */ | |
| 155 | 164 |  function mysql_query_safe($SQLquery) { | 
| 156 | 165 | static $TimeSpentQuerying = 0; | 
| 157 | 166 |  	if ($SQLquery === null) { | 
| @@ -2095,6 +2104,9 @@ discard block | ||
| 2095 | 2104 | return $DirectoryName.'/'.BetterUCwords($BaseFilename).'.'.strtolower($FileExtension); | 
| 2096 | 2105 | } | 
| 2097 | 2106 | |
| 2107 | +/** | |
| 2108 | + * @param string $string | |
| 2109 | + */ | |
| 2098 | 2110 |  function BetterUCwords($string) { | 
| 2099 | 2111 | $stringlength = strlen($string); | 
| 2100 | 2112 | |
| @@ -395,6 +395,9 @@ discard block | ||
| 395 | 395 | ///////////////////////////////////////////////////////////////// | 
| 396 | 396 | |
| 397 | 397 | |
| 398 | +/** | |
| 399 | + * @param string $string | |
| 400 | + */ | |
| 398 | 401 |  function RemoveAccents($string) { | 
| 399 | 402 | // Revised version by markstewardרotmail*com | 
| 400 | 403 | // Again revised by James Heinrich (19-June-2006) | 
| @@ -597,7 +600,7 @@ discard block | ||
| 597 | 600 | /** | 
| 598 | 601 | * @param string $string | 
| 599 | 602 | * | 
| 600 | - * @return mixed | |
| 603 | + * @return string | |
| 601 | 604 | */ | 
| 602 | 605 |  function PoweredBygetID3($string='') { | 
| 603 | 606 | global $getID3; | 
| @@ -12,6 +12,10 @@ discard block | ||
| 12 | 12 | ///////////////////////////////////////////////////////////////// | 
| 13 | 13 | |
| 14 | 14 |  if (!function_exists('PrintHexBytes')) { | 
| 15 | + | |
| 16 | + /** | |
| 17 | + * @param string $string | |
| 18 | + */ | |
| 15 | 19 |  	function PrintHexBytes($string) { | 
| 16 | 20 | $returnstring = ''; | 
| 17 | 21 |  		for ($i = 0; $i < strlen($string); $i++) { | 
| @@ -129,6 +133,10 @@ discard block | ||
| 129 | 133 | } | 
| 130 | 134 | |
| 131 | 135 |  if (!function_exists('fileextension')) { | 
| 136 | + | |
| 137 | + /** | |
| 138 | + * @param string $filename | |
| 139 | + */ | |
| 132 | 140 |  	function fileextension($filename, $numextensions=1) { | 
| 133 | 141 |  		if (strstr($filename, '.')) { | 
| 134 | 142 | $reversedfilename = strrev($filename); | 
| @@ -146,6 +154,10 @@ discard block | ||
| 146 | 154 | } | 
| 147 | 155 | |
| 148 | 156 |  if (!function_exists('RemoveAccents')) { | 
| 157 | + | |
| 158 | + /** | |
| 159 | + * @param string $string | |
| 160 | + */ | |
| 149 | 161 |  	function RemoveAccents($string) { | 
| 150 | 162 | // return strtr($string, '¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ', 'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy'); | 
| 151 | 163 | // Revised version by [email protected] | 
| @@ -230,6 +242,10 @@ discard block | ||
| 230 | 242 | } | 
| 231 | 243 | |
| 232 | 244 |  if (!function_exists('DecimalBinary2Float')) { | 
| 245 | + | |
| 246 | + /** | |
| 247 | + * @param string $binarynumerator | |
| 248 | + */ | |
| 233 | 249 |  	function DecimalBinary2Float($binarynumerator) { | 
| 234 | 250 | $numerator = Bin2Dec($binarynumerator); | 
| 235 | 251 |  		$denominator = Bin2Dec(str_repeat('1', strlen($binarynumerator))); | 
| @@ -238,6 +254,10 @@ discard block | ||
| 238 | 254 | } | 
| 239 | 255 | |
| 240 | 256 |  if (!function_exists('NormalizeBinaryPoint')) { | 
| 257 | + | |
| 258 | + /** | |
| 259 | + * @param string $binarypointnumber | |
| 260 | + */ | |
| 241 | 261 |  	function NormalizeBinaryPoint($binarypointnumber, $maxbits=52) { | 
| 242 | 262 | // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html | 
| 243 | 263 |  		if (strpos($binarypointnumber, '.') === false) { | 
| @@ -318,6 +338,10 @@ discard block | ||
| 318 | 338 | } | 
| 319 | 339 | |
| 320 | 340 |  if (!function_exists('BigEndian2Float')) { | 
| 341 | + | |
| 342 | + /** | |
| 343 | + * @param string $byteword | |
| 344 | + */ | |
| 321 | 345 |  	function BigEndian2Float($byteword) { | 
| 322 | 346 | // ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic | 
| 323 | 347 | // http://www.psc.edu/general/software/packages/ieee/ieee.html | 
| @@ -392,6 +416,10 @@ discard block | ||
| 392 | 416 | } | 
| 393 | 417 | |
| 394 | 418 |  if (!function_exists('BigEndian2Int')) { | 
| 419 | + | |
| 420 | + /** | |
| 421 | + * @param string $byteword | |
| 422 | + */ | |
| 395 | 423 |  	function BigEndian2Int($byteword, $synchsafe=false, $signed=false) { | 
| 396 | 424 | $intvalue = 0; | 
| 397 | 425 | $bytewordlen = strlen($byteword); | 
| @@ -464,6 +492,10 @@ discard block | ||
| 464 | 492 | } | 
| 465 | 493 | |
| 466 | 494 |  if (!function_exists('Dec2Bin')) { | 
| 495 | + | |
| 496 | + /** | |
| 497 | + * @param integer $number | |
| 498 | + */ | |
| 467 | 499 |  	function Dec2Bin($number) { | 
| 468 | 500 |  		while ($number >= 256) { | 
| 469 | 501 | $bytes[] = (($number / 256) - (floor($number / 256))) * 256; | 
| @@ -749,6 +781,10 @@ discard block | ||
| 749 | 781 | } | 
| 750 | 782 | |
| 751 | 783 |  if (!function_exists('CloseMatch')) { | 
| 784 | + | |
| 785 | + /** | |
| 786 | + * @param integer $tolerance | |
| 787 | + */ | |
| 752 | 788 |  	function CloseMatch($value1, $value2, $tolerance) { | 
| 753 | 789 | return (abs($value1 - $value2) <= $tolerance); | 
| 754 | 790 | } | 
| @@ -2253,6 +2289,9 @@ discard block | ||
| 2253 | 2289 | return true; | 
| 2254 | 2290 | } | 
| 2255 | 2291 | |
| 2292 | +/** | |
| 2293 | + * @param boolean $ScanAsCBR | |
| 2294 | + */ | |
| 2256 | 2295 |  function RecursiveFrameScanning(&$fd, &$ThisFileInfo, &$offset, &$nextframetestoffset, $ScanAsCBR) { | 
| 2257 | 2296 |  	for ($i = 0; $i < MPEG_VALID_CHECK_FRAMES; $i++) { | 
| 2258 | 2297 | // check next MPEG_VALID_CHECK_FRAMES frames for validity, to make sure we haven't run across a false synch | 
| @@ -2780,6 +2819,9 @@ discard block | ||
| 2780 | 2819 | return $MPEGrawHeader; | 
| 2781 | 2820 | } | 
| 2782 | 2821 | |
| 2822 | +/** | |
| 2823 | + * @param integer $padding | |
| 2824 | + */ | |
| 2783 | 2825 |  function MPEGaudioFrameLength(&$bitrate, &$version, &$layer, $padding, &$samplerate) { | 
| 2784 | 2826 | static $AudioFrameLengthCache = array(); | 
| 2785 | 2827 | |
| @@ -176,9 +176,9 @@ | ||
| 176 | 176 | |
| 177 | 177 | /** | 
| 178 | 178 | * | 
| 179 | - * @param type $dir | |
| 179 | + * @param string $dir | |
| 180 | 180 | * @param type $match search type name extentions, can be an array or csv list | 
| 181 | - * @param type $cache caching extention, select one of sqlite3, mysql, dbm | |
| 181 | + * @param string $cache caching extention, select one of sqlite3, mysql, dbm | |
| 182 | 182 | * @param array $opt database options, | 
| 183 | 183 | */ | 
| 184 | 184 |  	function scan_files($dir, $match, $cache='sqlite3', $opt=array('table'=>'getid3_cache', 'hide'=>true)) { | 
| @@ -48,7 +48,7 @@ discard block | ||
| 48 | 48 | * | 
| 49 | 49 | * @param float $floatnumber | 
| 50 | 50 | * | 
| 51 | - * @return float|int returns int (if possible, otherwise float) | |
| 51 | + * @return integer returns int (if possible, otherwise float) | |
| 52 | 52 | */ | 
| 53 | 53 |  	public static function trunc($floatnumber) { | 
| 54 | 54 |  		if ($floatnumber >= 1) { | 
| @@ -147,7 +147,7 @@ discard block | ||
| 147 | 147 | * @param string $binarypointnumber | 
| 148 | 148 | * @param int $maxbits | 
| 149 | 149 | * | 
| 150 | - * @return array | |
| 150 | + * @return integer | |
| 151 | 151 | */ | 
| 152 | 152 |  	public static function NormalizeBinaryPoint($binarypointnumber, $maxbits=52) { | 
| 153 | 153 |  		if (strpos($binarypointnumber, '.') === false) { | 
| @@ -735,7 +735,7 @@ discard block | ||
| 735 | 735 | } | 
| 736 | 736 | |
| 737 | 737 | /** | 
| 738 | - * @param SimpleXMLElement|array $XMLobject | |
| 738 | + * @param SimpleXMLElement $XMLobject | |
| 739 | 739 | * | 
| 740 | 740 | * @return array | 
| 741 | 741 | */ | 
| @@ -1533,7 +1533,7 @@ discard block | ||
| 1533 | 1533 | * @param string $imgData | 
| 1534 | 1534 | * @param array $imageinfo | 
| 1535 | 1535 | * | 
| 1536 | - * @return array|false | |
| 1536 | + * @return string | |
| 1537 | 1537 | */ | 
| 1538 | 1538 |  	public static function GetDataImageSize($imgData, &$imageinfo=array()) { | 
| 1539 | 1539 | static $tempdir = ''; | 
| @@ -1766,7 +1766,7 @@ discard block | ||
| 1766 | 1766 | /** | 
| 1767 | 1767 | * @param string $path | 
| 1768 | 1768 | * | 
| 1769 | - * @return float|bool | |
| 1769 | + * @return integer | |
| 1770 | 1770 | */ | 
| 1771 | 1771 |  	public static function getFileSizeSyscall($path) { | 
| 1772 | 1772 | $filesize = false; | 
| @@ -205,7 +205,7 @@ | ||
| 205 | 205 | } | 
| 206 | 206 | |
| 207 | 207 | /** | 
| 208 | - * @return array|false | |
| 208 | + * @return string | |
| 209 | 209 | */ | 
| 210 | 210 |  	public function ZIPparseLocalFileHeader() { | 
| 211 | 211 | $LocalFileHeader['offset'] = $this->ftell(); | 
| @@ -265,7 +265,7 @@ | ||
| 265 | 265 | * @param int $MaxFramesToScan | 
| 266 | 266 | * @param bool $ReturnExtendedInfo | 
| 267 | 267 | * | 
| 268 | - * @return bool | |
| 268 | + * @return boolean|null | |
| 269 | 269 | */ | 
| 270 | 270 |  	public function getAACADTSheaderFilepointer($MaxFramesToScan=1000000, $ReturnExtendedInfo=false) { | 
| 271 | 271 | $info = &$this->getid3->info; | 
| @@ -485,7 +485,7 @@ | ||
| 485 | 485 | /** | 
| 486 | 486 | * @param int $length | 
| 487 | 487 | * | 
| 488 | - * @return float|int | |
| 488 | + * @return string | |
| 489 | 489 | */ | 
| 490 | 490 |  	private function readHeaderBSI($length) { | 
| 491 | 491 | $data = substr($this->AC3header['bsi'], $this->BSIoffset, $length); | 
| @@ -632,7 +632,7 @@ | ||
| 632 | 632 | /** | 
| 633 | 633 | * @param array $BMPinfo | 
| 634 | 634 | * | 
| 635 | - * @return bool | |
| 635 | + * @return null|boolean | |
| 636 | 636 | */ | 
| 637 | 637 |  	public function PlotBMP(&$BMPinfo) { | 
| 638 | 638 | $starttime = time(); |