@@ -23,6 +23,10 @@ |
||
23 | 23 | return self::getAttrbutesListArrayInternal($cacheId, false, $firstLetterUppercase); |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param boolean $bOnlySelectable |
|
28 | + * @param boolean $firstLetterUppercase |
|
29 | + */ |
|
26 | 30 | public static function getAttrbutesListArrayInternal($cacheId, $bOnlySelectable, $firstLetterUppercase) |
27 | 31 | { |
28 | 32 | global $opt; |
@@ -303,6 +303,10 @@ discard block |
||
303 | 303 | return 'R ' . floor($result[0]) . ' H ' . floor($result[1]); |
304 | 304 | } |
305 | 305 | |
306 | + /** |
|
307 | + * @param integer $bw |
|
308 | + * @param integer $lw |
|
309 | + */ |
|
306 | 310 | public function wgs2pot($bw, $lw) |
307 | 311 | { |
308 | 312 | /* Copyright (c) 2006, HELMUT H. HEIMEIER |
@@ -602,6 +606,9 @@ discard block |
||
602 | 606 | ]; |
603 | 607 | } |
604 | 608 | |
609 | + /** |
|
610 | + * @param string $name |
|
611 | + */ |
|
605 | 612 | public static function parseRequestLat($name) |
606 | 613 | { |
607 | 614 | if (!isset($_REQUEST[$name . 'NS']) || !isset($_REQUEST[$name . 'Lat']) || !isset($_REQUEST[$name . 'LatMin'])) { |
@@ -620,6 +627,9 @@ discard block |
||
620 | 627 | return $lat; |
621 | 628 | } |
622 | 629 | |
630 | + /** |
|
631 | + * @param string $name |
|
632 | + */ |
|
623 | 633 | public static function parseRequestLon($name) |
624 | 634 | { |
625 | 635 | if (!isset($_REQUEST[$name . 'EW']) || !isset($_REQUEST[$name . 'Lon']) || !isset($_REQUEST[$name . 'LonMin'])) { |
@@ -46,6 +46,11 @@ discard block |
||
46 | 46 | /* sChaneFreq = {always, hourly, daily, weekly, monthly, yearly, never} |
47 | 47 | * nPriority = {0.0 to 1.0} |
48 | 48 | */ |
49 | + |
|
50 | + /** |
|
51 | + * @param string $sFile |
|
52 | + * @param integer $dLastMod |
|
53 | + */ |
|
49 | 54 | public function write($sFile, $dLastMod, $sChangeFreq = false, $nPriority = 0.5) |
50 | 55 | { |
51 | 56 | if ($sChangeFreq == false) { |
@@ -62,6 +67,9 @@ discard block |
||
62 | 67 | $this->writeInternal($sXML); |
63 | 68 | } |
64 | 69 | |
70 | + /** |
|
71 | + * @param string $str |
|
72 | + */ |
|
65 | 73 | public function writeInternal($str) |
66 | 74 | { |
67 | 75 | global $opt; |
@@ -130,6 +130,9 @@ discard block |
||
130 | 130 | return mb_send_mail($this->to, $opt['mail']['subject'] . $this->subject, $body, $mailheaders); |
131 | 131 | } |
132 | 132 | |
133 | + /** |
|
134 | + * @param string $domain |
|
135 | + */ |
|
133 | 136 | public static function is_existent_maildomain($domain) |
134 | 137 | { |
135 | 138 | if ($domain == "localhost") { |
@@ -154,6 +157,9 @@ discard block |
||
154 | 157 | return false; |
155 | 158 | } |
156 | 159 | |
160 | + /** |
|
161 | + * @param string $mail |
|
162 | + */ |
|
157 | 163 | public static function getToMailDomain($mail) |
158 | 164 | { |
159 | 165 | if ($mail == '') { |
@@ -245,6 +245,9 @@ |
||
245 | 245 | return $retval; |
246 | 246 | } |
247 | 247 | |
248 | + /** |
|
249 | + * @param integer|null $menuid |
|
250 | + */ |
|
248 | 251 | public function pAppendSubMenu($menuid, $ids, &$items) |
249 | 252 | { |
250 | 253 | global $menuitem, $login; |
@@ -2760,7 +2760,7 @@ discard block |
||
2760 | 2760 | * |
2761 | 2761 | * @param int $d One digit to encode |
2762 | 2762 | * |
2763 | - * @return char Encoded digit |
|
2763 | + * @return string Encoded digit |
|
2764 | 2764 | * @access private |
2765 | 2765 | */ |
2766 | 2766 | private function _encodeDigit($d) |
@@ -2771,7 +2771,7 @@ discard block |
||
2771 | 2771 | /** |
2772 | 2772 | * Decode a certain digit. |
2773 | 2773 | * |
2774 | - * @param char $cp One digit (character) to decode |
|
2774 | + * @param string $cp One digit (character) to decode |
|
2775 | 2775 | * |
2776 | 2776 | * @return int Decoded digit |
2777 | 2777 | * @access private |
@@ -2785,7 +2785,7 @@ discard block |
||
2785 | 2785 | /** |
2786 | 2786 | * Do Nameprep according to RFC3491 and RFC3454. |
2787 | 2787 | * |
2788 | - * @param array $input Unicode Characters |
|
2788 | + * @param string $input Unicode Characters |
|
2789 | 2789 | * |
2790 | 2790 | * @return string Unicode Characters, Nameprep'd |
2791 | 2791 | * @throws Exception |
@@ -2885,7 +2885,7 @@ discard block |
||
2885 | 2885 | * |
2886 | 2886 | * @param integer $char 32bit UCS4 code point |
2887 | 2887 | * |
2888 | - * @return array Either Hangul Syllable decomposed or original 32bit |
|
2888 | + * @return integer[] Either Hangul Syllable decomposed or original 32bit |
|
2889 | 2889 | * value as one value array |
2890 | 2890 | * @access private |
2891 | 2891 | */ |
@@ -2273,38 +2273,38 @@ discard block |
||
2273 | 2273 | |
2274 | 2274 | foreach ($option as $k => $v) { |
2275 | 2275 | switch ($k) { |
2276 | - case 'encoding': |
|
2277 | - switch ($v) { |
|
2278 | - case 'utf8': |
|
2279 | - case 'ucs4_string': |
|
2280 | - case 'ucs4_array': |
|
2281 | - $this->_api_encoding = $v; |
|
2282 | - break; |
|
2276 | + case 'encoding': |
|
2277 | + switch ($v) { |
|
2278 | + case 'utf8': |
|
2279 | + case 'ucs4_string': |
|
2280 | + case 'ucs4_array': |
|
2281 | + $this->_api_encoding = $v; |
|
2282 | + break; |
|
2283 | 2283 | |
2284 | - default: |
|
2285 | - throw new InvalidArgumentException('Set Parameter: Unknown parameter '.$v.' for option '.$k); |
|
2286 | - } |
|
2284 | + default: |
|
2285 | + throw new InvalidArgumentException('Set Parameter: Unknown parameter '.$v.' for option '.$k); |
|
2286 | + } |
|
2287 | 2287 | |
2288 | 2288 | break; |
2289 | 2289 | |
2290 | - case 'overlong': |
|
2291 | - $this->_allow_overlong = ($v) ? true : false; |
|
2292 | - break; |
|
2290 | + case 'overlong': |
|
2291 | + $this->_allow_overlong = ($v) ? true : false; |
|
2292 | + break; |
|
2293 | 2293 | |
2294 | - case 'strict': |
|
2295 | - $this->_strict_mode = ($v) ? true : false; |
|
2296 | - break; |
|
2294 | + case 'strict': |
|
2295 | + $this->_strict_mode = ($v) ? true : false; |
|
2296 | + break; |
|
2297 | 2297 | |
2298 | - case 'version': |
|
2299 | - if (in_array($v, array('2003', '2008'))) { |
|
2300 | - $this->_version = $v; |
|
2301 | - } else { |
|
2302 | - throw new InvalidArgumentException('Set Parameter: Invalid parameter '.$v.' for option '.$k); |
|
2303 | - } |
|
2304 | - break; |
|
2298 | + case 'version': |
|
2299 | + if (in_array($v, array('2003', '2008'))) { |
|
2300 | + $this->_version = $v; |
|
2301 | + } else { |
|
2302 | + throw new InvalidArgumentException('Set Parameter: Invalid parameter '.$v.' for option '.$k); |
|
2303 | + } |
|
2304 | + break; |
|
2305 | 2305 | |
2306 | - default: |
|
2307 | - return false; |
|
2306 | + default: |
|
2307 | + return false; |
|
2308 | 2308 | } |
2309 | 2309 | } |
2310 | 2310 | |
@@ -2328,15 +2328,15 @@ discard block |
||
2328 | 2328 | // Forcing conversion of input to UCS4 array |
2329 | 2329 | // If one time encoding is given, use this, else the objects property |
2330 | 2330 | switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { |
2331 | - case 'utf8': |
|
2332 | - $decoded = $this->_utf8_to_ucs4($decoded); |
|
2333 | - break; |
|
2334 | - case 'ucs4_string': |
|
2335 | - $decoded = $this->_ucs4_string_to_ucs4($decoded); |
|
2336 | - case 'ucs4_array': // No break; before this line. Catch case, but do nothing |
|
2337 | - break; |
|
2338 | - default: |
|
2339 | - throw new InvalidArgumentException('Unsupported input format'); |
|
2331 | + case 'utf8': |
|
2332 | + $decoded = $this->_utf8_to_ucs4($decoded); |
|
2333 | + break; |
|
2334 | + case 'ucs4_string': |
|
2335 | + $decoded = $this->_ucs4_string_to_ucs4($decoded); |
|
2336 | + case 'ucs4_array': // No break; before this line. Catch case, but do nothing |
|
2337 | + break; |
|
2338 | + default: |
|
2339 | + throw new InvalidArgumentException('Unsupported input format'); |
|
2340 | 2340 | } |
2341 | 2341 | |
2342 | 2342 | // No input, no output, what else did you expect? |
@@ -2350,35 +2350,35 @@ discard block |
||
2350 | 2350 | foreach ($decoded as $k => $v) { |
2351 | 2351 | // Make sure to use just the plain dot |
2352 | 2352 | switch($v) { |
2353 | - case 0x3002: |
|
2354 | - case 0xFF0E: |
|
2355 | - case 0xFF61: |
|
2356 | - $decoded[$k] = 0x2E; |
|
2357 | - // It's right, no break here |
|
2358 | - // The codepoints above have to be converted to dots anyway |
|
2359 | - |
|
2360 | - // Stumbling across an anchoring character |
|
2361 | - case 0x2E: |
|
2362 | - case 0x2F: |
|
2363 | - case 0x3A: |
|
2364 | - case 0x3F: |
|
2365 | - case 0x40: |
|
2366 | - // Neither email addresses nor URLs allowed in strict mode |
|
2367 | - if ($this->_strict_mode) { |
|
2368 | - throw new InvalidArgumentException('Neither email addresses nor URLs are allowed in strict mode.'); |
|
2369 | - } |
|
2370 | - // Skip first char |
|
2371 | - if ($k) { |
|
2372 | - $encoded = ''; |
|
2373 | - $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2374 | - if ($encoded) { |
|
2375 | - $output .= $encoded; |
|
2376 | - } else { |
|
2377 | - $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2353 | + case 0x3002: |
|
2354 | + case 0xFF0E: |
|
2355 | + case 0xFF61: |
|
2356 | + $decoded[$k] = 0x2E; |
|
2357 | + // It's right, no break here |
|
2358 | + // The codepoints above have to be converted to dots anyway |
|
2359 | + |
|
2360 | + // Stumbling across an anchoring character |
|
2361 | + case 0x2E: |
|
2362 | + case 0x2F: |
|
2363 | + case 0x3A: |
|
2364 | + case 0x3F: |
|
2365 | + case 0x40: |
|
2366 | + // Neither email addresses nor URLs allowed in strict mode |
|
2367 | + if ($this->_strict_mode) { |
|
2368 | + throw new InvalidArgumentException('Neither email addresses nor URLs are allowed in strict mode.'); |
|
2378 | 2369 | } |
2379 | - $output .= chr($decoded[$k]); |
|
2380 | - } |
|
2381 | - $last_begin = $k + 1; |
|
2370 | + // Skip first char |
|
2371 | + if ($k) { |
|
2372 | + $encoded = ''; |
|
2373 | + $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2374 | + if ($encoded) { |
|
2375 | + $output .= $encoded; |
|
2376 | + } else { |
|
2377 | + $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2378 | + } |
|
2379 | + $output .= chr($decoded[$k]); |
|
2380 | + } |
|
2381 | + $last_begin = $k + 1; |
|
2382 | 2382 | } |
2383 | 2383 | } |
2384 | 2384 | // Catch the rest of the string |
@@ -2416,12 +2416,12 @@ discard block |
||
2416 | 2416 | // Optionally set |
2417 | 2417 | if ($one_time_encoding) { |
2418 | 2418 | switch ($one_time_encoding) { |
2419 | - case 'utf8': |
|
2420 | - case 'ucs4_string': |
|
2421 | - case 'ucs4_array': |
|
2422 | - break; |
|
2423 | - default: |
|
2424 | - throw new InvalidArgumentException('Unknown encoding '.$one_time_encoding); |
|
2419 | + case 'utf8': |
|
2420 | + case 'ucs4_string': |
|
2421 | + case 'ucs4_array': |
|
2422 | + break; |
|
2423 | + default: |
|
2424 | + throw new InvalidArgumentException('Unknown encoding '.$one_time_encoding); |
|
2425 | 2425 | } |
2426 | 2426 | } |
2427 | 2427 | // Make sure to drop any newline characters around |
@@ -2473,17 +2473,17 @@ discard block |
||
2473 | 2473 | // The output is UTF-8 by default, other output formats need conversion here |
2474 | 2474 | // If one time encoding is given, use this, else the objects property |
2475 | 2475 | switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { |
2476 | - case 'utf8': |
|
2477 | - return $return; |
|
2478 | - break; |
|
2479 | - case 'ucs4_string': |
|
2480 | - return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); |
|
2481 | - break; |
|
2482 | - case 'ucs4_array': |
|
2483 | - return $this->_utf8_to_ucs4($return); |
|
2484 | - break; |
|
2485 | - default: |
|
2486 | - throw new InvalidArgumentException('Unsupported output format'); |
|
2476 | + case 'utf8': |
|
2477 | + return $return; |
|
2478 | + break; |
|
2479 | + case 'ucs4_string': |
|
2480 | + return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); |
|
2481 | + break; |
|
2482 | + case 'ucs4_array': |
|
2483 | + return $this->_utf8_to_ucs4($return); |
|
2484 | + break; |
|
2485 | + default: |
|
2486 | + throw new InvalidArgumentException('Unsupported output format'); |
|
2487 | 2487 | } |
2488 | 2488 | } |
2489 | 2489 |
@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | // Use {page} in link_url als placeholder for the selected page number |
19 | 19 | // and/or {offset} for the 0-based data offset of the selected page. |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $link_url |
|
23 | + */ |
|
21 | 24 | public function __construct($link_url, $min_pages_shown = 2, $max_pages_shown = 15) |
22 | 25 | { |
23 | 26 | global $tpl; |
@@ -31,6 +34,10 @@ discard block |
||
31 | 34 | } |
32 | 35 | |
33 | 36 | |
37 | + /** |
|
38 | + * @param double $current_page |
|
39 | + * @param double $total_pages |
|
40 | + */ |
|
34 | 41 | public function make_from_pagenr($current_page, $total_pages, $page_size = false) |
35 | 42 | { |
36 | 43 | global $tpl; |
@@ -94,6 +101,9 @@ discard block |
||
94 | 101 | } |
95 | 102 | |
96 | 103 | |
104 | + /** |
|
105 | + * @param boolean $page_size |
|
106 | + */ |
|
97 | 107 | private function pagelink($page, $page_size) |
98 | 108 | { |
99 | 109 | return mb_ereg_replace( |
@@ -76,6 +76,10 @@ discard block |
||
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | + /** |
|
80 | + * @param string $sCode |
|
81 | + * @param integer $nStartSearch |
|
82 | + */ |
|
79 | 83 | public function findEndOfPHPString($sCode, $nStartSearch) |
80 | 84 | { |
81 | 85 | $nEnd = 0; |
@@ -116,6 +120,10 @@ discard block |
||
116 | 120 | } |
117 | 121 | |
118 | 122 | // TODO: performance ... scan once at __construct and store line positions |
123 | + |
|
124 | + /** |
|
125 | + * @param integer $nPos |
|
126 | + */ |
|
119 | 127 | public function findLineOfPos($nPos) |
120 | 128 | { |
121 | 129 | $nLine = 1; |
@@ -197,6 +197,9 @@ |
||
197 | 197 | return 0; |
198 | 198 | } |
199 | 199 | |
200 | +/** |
|
201 | + * @param string $domain |
|
202 | + */ |
|
200 | 203 | function is_existent_maildomain($domain) |
201 | 204 | { |
202 | 205 | $smtp_serverlist = []; |