@@ -168,6 +168,9 @@ discard block |
||
| 168 | 168 | return self::imagecreatefromstring(file_get_contents($filename)); |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | + /** |
|
| 172 | + * @param string $row |
|
| 173 | + */ |
|
| 171 | 174 | private static function str_split2($row, $bps, $palette) |
| 172 | 175 | { |
| 173 | 176 | switch ($bps) { |
@@ -210,6 +213,9 @@ discard block |
||
| 210 | 213 | } |
| 211 | 214 | } |
| 212 | 215 | |
| 216 | + /** |
|
| 217 | + * @param integer $x |
|
| 218 | + */ |
|
| 213 | 219 | private static function makepixel($img, $x, $y, $str, $bps) |
| 214 | 220 | { |
| 215 | 221 | switch ($bps) { |
@@ -233,11 +239,17 @@ discard block |
||
| 233 | 239 | } |
| 234 | 240 | } |
| 235 | 241 | |
| 242 | + /** |
|
| 243 | + * @param integer $n |
|
| 244 | + */ |
|
| 236 | 245 | private static function byte3($n) |
| 237 | 246 | { |
| 238 | 247 | return chr($n & 255) . chr(($n >> 8) & 255) . chr(($n >> 16) & 255); |
| 239 | 248 | } |
| 240 | 249 | |
| 250 | + /** |
|
| 251 | + * @param string $n |
|
| 252 | + */ |
|
| 241 | 253 | private static function undword($n) |
| 242 | 254 | { |
| 243 | 255 | $r = unpack("V", $n); |
@@ -249,6 +261,9 @@ discard block |
||
| 249 | 261 | return pack("V", $n); |
| 250 | 262 | } |
| 251 | 263 | |
| 264 | + /** |
|
| 265 | + * @param integer $n |
|
| 266 | + */ |
|
| 252 | 267 | private static function word($n) |
| 253 | 268 | { |
| 254 | 269 | return pack("v", $n); |
@@ -39,6 +39,9 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | class TGA |
| 41 | 41 | { |
| 42 | + /** |
|
| 43 | + * @param string $data |
|
| 44 | + */ |
|
| 42 | 45 | public static function rle_decode($data, $datalen) |
| 43 | 46 | { |
| 44 | 47 | $len = strlen($data); |
@@ -77,6 +80,9 @@ discard block |
||
| 77 | 80 | return $out; |
| 78 | 81 | } |
| 79 | 82 | |
| 83 | + /** |
|
| 84 | + * @param integer $byte |
|
| 85 | + */ |
|
| 80 | 86 | public static function dec_bits($byte, &$type, &$value) |
| 81 | 87 | { |
| 82 | 88 | $type = ($byte & 0x80) >> 7; |
@@ -355,7 +355,7 @@ |
||
| 355 | 355 | /** |
| 356 | 356 | * Throws exception if the handle isn't a valid GD resource |
| 357 | 357 | * |
| 358 | - * @param mixed $handle The variable to check |
|
| 358 | + * @param resource $handle The variable to check |
|
| 359 | 359 | */ |
| 360 | 360 | public static function assertValidImageHandle($handle) |
| 361 | 361 | { |
@@ -20,30 +20,69 @@ |
||
| 20 | 20 | function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } |
| 21 | 21 | function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } |
| 22 | 22 | function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } |
| 23 | + |
|
| 24 | + /** |
|
| 25 | + * @param string $s |
|
| 26 | + * @param integer[] $convmap |
|
| 27 | + */ |
|
| 23 | 28 | function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } |
| 24 | 29 | function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } |
| 30 | + |
|
| 31 | + /** |
|
| 32 | + * @param string|boolean $enc |
|
| 33 | + */ |
|
| 25 | 34 | function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } |
| 26 | 35 | function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } |
| 27 | 36 | function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } |
| 28 | 37 | function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } |
| 38 | + |
|
| 39 | + /** |
|
| 40 | + * @param string $var |
|
| 41 | + * @param string $encoding |
|
| 42 | + */ |
|
| 29 | 43 | function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } |
| 30 | 44 | function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } |
| 31 | 45 | function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } |
| 32 | 46 | function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } |
| 33 | 47 | function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } |
| 48 | + |
|
| 49 | + /** |
|
| 50 | + * @param string $s |
|
| 51 | + * @param string $needle |
|
| 52 | + * @param string $enc |
|
| 53 | + */ |
|
| 34 | 54 | function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } |
| 55 | + |
|
| 56 | + /** |
|
| 57 | + * @param string $s |
|
| 58 | + * @param string $enc |
|
| 59 | + */ |
|
| 35 | 60 | function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } |
| 36 | 61 | function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } |
| 37 | 62 | function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } |
| 38 | 63 | function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } |
| 64 | + |
|
| 65 | + /** |
|
| 66 | + * @param string $enc |
|
| 67 | + */ |
|
| 39 | 68 | function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } |
| 40 | 69 | function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } |
| 41 | 70 | function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } |
| 42 | 71 | function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } |
| 43 | 72 | function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } |
| 73 | + |
|
| 74 | + /** |
|
| 75 | + * @param string $s |
|
| 76 | + * @param string $needle |
|
| 77 | + * @param string $enc |
|
| 78 | + */ |
|
| 44 | 79 | function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } |
| 45 | 80 | function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } |
| 46 | 81 | function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } |
| 82 | + |
|
| 83 | + /** |
|
| 84 | + * @param string $enc |
|
| 85 | + */ |
|
| 47 | 86 | function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } |
| 48 | 87 | function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } |
| 49 | 88 | function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } |
@@ -399,6 +399,9 @@ discard block |
||
| 399 | 399 | return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); |
| 400 | 400 | } |
| 401 | 401 | |
| 402 | + /** |
|
| 403 | + * @return string |
|
| 404 | + */ |
|
| 402 | 405 | public static function mb_detect_encoding($str, $encodingList = null, $strict = false) |
| 403 | 406 | { |
| 404 | 407 | if (null === $encodingList) { |
@@ -715,6 +718,9 @@ discard block |
||
| 715 | 718 | return $code; |
| 716 | 719 | } |
| 717 | 720 | |
| 721 | + /** |
|
| 722 | + * @param boolean $part |
|
| 723 | + */ |
|
| 718 | 724 | private static function getSubpart($pos, $part, $haystack, $encoding) |
| 719 | 725 | { |
| 720 | 726 | if (false === $pos) { |
@@ -762,6 +768,9 @@ discard block |
||
| 762 | 768 | return self::mb_convert_case($s[0], MB_CASE_UPPER, 'UTF-8'); |
| 763 | 769 | } |
| 764 | 770 | |
| 771 | + /** |
|
| 772 | + * @param string $file |
|
| 773 | + */ |
|
| 765 | 774 | private static function getData($file) |
| 766 | 775 | { |
| 767 | 776 | if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { |
@@ -278,6 +278,7 @@ |
||
| 278 | 278 | * |
| 279 | 279 | * @param string $scalar |
| 280 | 280 | * @param int &$i |
| 281 | + * @param integer $i |
|
| 281 | 282 | * |
| 282 | 283 | * @return string |
| 283 | 284 | * |
@@ -302,6 +302,12 @@ discard block |
||
| 302 | 302 | return empty($data) ? null : $data; |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | + /** |
|
| 306 | + * @param integer $offset |
|
| 307 | + * @param boolean $exceptionOnInvalidType |
|
| 308 | + * @param boolean $objectSupport |
|
| 309 | + * @param boolean $objectForMap |
|
| 310 | + */ |
|
| 305 | 311 | private function parseBlock($offset, $yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap) |
| 306 | 312 | { |
| 307 | 313 | $skippedLineNumbers = $this->skippedLineNumbers; |
@@ -820,6 +826,7 @@ discard block |
||
| 820 | 826 | * @see preg_last_error() |
| 821 | 827 | * |
| 822 | 828 | * @internal |
| 829 | + * @param string $pattern |
|
| 823 | 830 | */ |
| 824 | 831 | public static function preg_match($pattern, $subject, &$matches = null, $flags = 0, $offset = 0) |
| 825 | 832 | { |
@@ -444,6 +444,9 @@ discard block |
||
| 444 | 444 | } |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | + /** |
|
| 448 | + * @param integer $value |
|
| 449 | + */ |
|
| 447 | 450 | public static function eq($value, $value2, $message = '') |
| 448 | 451 | { |
| 449 | 452 | if ($value2 != $value) { |
@@ -455,6 +458,9 @@ discard block |
||
| 455 | 458 | } |
| 456 | 459 | } |
| 457 | 460 | |
| 461 | + /** |
|
| 462 | + * @param string $value2 |
|
| 463 | + */ |
|
| 458 | 464 | public static function notEq($value, $value2, $message = '') |
| 459 | 465 | { |
| 460 | 466 | if ($value2 == $value) { |
@@ -1076,6 +1082,9 @@ discard block |
||
| 1076 | 1082 | return mb_strwidth($value, $encoding); |
| 1077 | 1083 | } |
| 1078 | 1084 | |
| 1085 | + /** |
|
| 1086 | + * @param string $message |
|
| 1087 | + */ |
|
| 1079 | 1088 | protected static function reportInvalidArgument($message) |
| 1080 | 1089 | { |
| 1081 | 1090 | throw new InvalidArgumentException($message); |
@@ -710,7 +710,7 @@ discard block |
||
| 710 | 710 | * @param string $table table |
| 711 | 711 | * @param bool $prefixed true to return with table name prefixed |
| 712 | 712 | * |
| 713 | - * @return string|false string SQL to create table, or false if errors encountered |
|
| 713 | + * @return string|boolean string SQL to create table, or false if errors encountered |
|
| 714 | 714 | */ |
| 715 | 715 | protected function renderTableCreate($table, $prefixed = false) |
| 716 | 716 | { |
@@ -747,7 +747,7 @@ discard block |
||
| 747 | 747 | * @param string $sql SQL statement to execute |
| 748 | 748 | * @param bool $force true to use force updates even in safe requests |
| 749 | 749 | * |
| 750 | - * @return mixed result resource if no error, |
|
| 750 | + * @return resource result resource if no error, |
|
| 751 | 751 | * true if no error but no result |
| 752 | 752 | * false if error encountered. |
| 753 | 753 | * Any error message is in $this->lastError; |