@@ -230,7 +230,7 @@ |
||
| 230 | 230 | * @param string $user persistent identifier of the user who triggered the action |
| 231 | 231 | * @param string $category type of modification, from the fixed vocabulary: "NEW", "OWN", "MOD", "DEL" |
| 232 | 232 | * @param string $message message to log into the audit log |
| 233 | - * @return boolean TRUE if successful. Will terminate script execution on failure. |
|
| 233 | + * @return boolean|null TRUE if successful. Will terminate script execution on failure. |
|
| 234 | 234 | */ |
| 235 | 235 | public static function writeAudit($user, $category, $message) { |
| 236 | 236 | switch ($category) { |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | * named the same as device_id. The second option takes precedence. |
| 173 | 173 | * |
| 174 | 174 | * @param string $source_name The source file name |
| 175 | - * @param string $output_name The destination file name |
|
| 175 | + * @param integer $output_name The destination file name |
|
| 176 | 176 | * |
| 177 | 177 | * @return bool result of the copy operation |
| 178 | 178 | * @final not to be redefined |
@@ -216,8 +216,7 @@ discard block |
||
| 216 | 216 | * named the same as device_id. The second option takes precedence. |
| 217 | 217 | * |
| 218 | 218 | * @param string $source_name The source file name |
| 219 | - * @param string $output_name The destination file name |
|
| 220 | - * @param int $use_win_cp Set Windows charset if non-zero |
|
| 219 | + * @param integer $output_name The destination file name |
|
| 221 | 220 | * |
| 222 | 221 | * @final not to be redefined |
| 223 | 222 | */ |
@@ -262,8 +261,6 @@ discard block |
||
| 262 | 261 | * The second optional parameter, if nonzero, should be the character set understood by iconv |
| 263 | 262 | * This is required by the Windows installer and is expected to go away in the future. |
| 264 | 263 | * |
| 265 | - * @param string $source_name The source file name |
|
| 266 | - * @param int $use_win_cp Set Windows charset if non-zero |
|
| 267 | 264 | * |
| 268 | 265 | * @final not to be redefined |
| 269 | 266 | */ |
@@ -32,6 +32,7 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * write debug messages to the log |
| 34 | 34 | * |
| 35 | + * @param integer $level |
|
| 35 | 36 | */ |
| 36 | 37 | function debug($level, $t) { |
| 37 | 38 | if (Config::$DEBUG_LEVEL >= $level) { |
@@ -130,7 +131,7 @@ discard block |
||
| 130 | 131 | * generates a UUID |
| 131 | 132 | * |
| 132 | 133 | * @param string $prefix an extra prefix to set before the UUID |
| 133 | - * @return UUID (possibly prefixed) |
|
| 134 | + * @return string (possibly prefixed) |
|
| 134 | 135 | */ |
| 135 | 136 | function uuid($prefix = '', $deterministic_source = NULL) { |
| 136 | 137 | if ($deterministic_source === NULL) |
@@ -96,6 +96,10 @@ discard block |
||
| 96 | 96 | define('QR_FORMAT_PNG', 1);
|
| 97 | 97 | |
| 98 | 98 | class qrstr {
|
| 99 | + |
|
| 100 | + /** |
|
| 101 | + * @param string $repl |
|
| 102 | + */ |
|
| 99 | 103 | public static function set(&$srctab, $x, $y, $repl, $replLen = false) {
|
| 100 | 104 | $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); |
| 101 | 105 | } |
@@ -231,6 +235,11 @@ discard block |
||
| 231 | 235 | } |
| 232 | 236 | |
| 233 | 237 | //---------------------------------------------------------------------- |
| 238 | + |
|
| 239 | + /** |
|
| 240 | + * @param boolean $outfile |
|
| 241 | + * @param string $err |
|
| 242 | + */ |
|
| 234 | 243 | public static function log($outfile, $err) |
| 235 | 244 | {
|
| 236 | 245 | if (QR_LOG_DIR !== false) {
|
@@ -256,6 +265,10 @@ discard block |
||
| 256 | 265 | } |
| 257 | 266 | |
| 258 | 267 | //---------------------------------------------------------------------- |
| 268 | + |
|
| 269 | + /** |
|
| 270 | + * @param string $markerId |
|
| 271 | + */ |
|
| 259 | 272 | public static function markTime($markerId) |
| 260 | 273 | {
|
| 261 | 274 | list($usec, $sec) = explode(" ", microtime());
|
@@ -410,18 +423,30 @@ discard block |
||
| 410 | 423 | } |
| 411 | 424 | |
| 412 | 425 | //---------------------------------------------------------------------- |
| 426 | + |
|
| 427 | + /** |
|
| 428 | + * @param integer $version |
|
| 429 | + */ |
|
| 413 | 430 | public static function getWidth($version) |
| 414 | 431 | {
|
| 415 | 432 | return self::$capacity[$version][QRCAP_WIDTH]; |
| 416 | 433 | } |
| 417 | 434 | |
| 418 | 435 | //---------------------------------------------------------------------- |
| 436 | + |
|
| 437 | + /** |
|
| 438 | + * @param integer $version |
|
| 439 | + */ |
|
| 419 | 440 | public static function getRemainder($version) |
| 420 | 441 | {
|
| 421 | 442 | return self::$capacity[$version][QRCAP_REMINDER]; |
| 422 | 443 | } |
| 423 | 444 | |
| 424 | 445 | //---------------------------------------------------------------------- |
| 446 | + |
|
| 447 | + /** |
|
| 448 | + * @param integer $size |
|
| 449 | + */ |
|
| 425 | 450 | public static function getMinimumVersion($size, $level) |
| 426 | 451 | {
|
| 427 | 452 | |
@@ -535,6 +560,9 @@ discard block |
||
| 535 | 560 | //---------------------------------------------------------------------- |
| 536 | 561 | // CACHEABLE!!! |
| 537 | 562 | |
| 563 | + /** |
|
| 564 | + * @param integer $version |
|
| 565 | + */ |
|
| 538 | 566 | public static function getEccSpec($version, $level, array &$spec) |
| 539 | 567 | {
|
| 540 | 568 | if (count($spec) < 5) {
|
@@ -857,12 +885,20 @@ discard block |
||
| 857 | 885 | } |
| 858 | 886 | |
| 859 | 887 | //---------------------------------------------------------------------- |
| 888 | + |
|
| 889 | + /** |
|
| 890 | + * @param string $code |
|
| 891 | + */ |
|
| 860 | 892 | public static function unserial($code) |
| 861 | 893 | {
|
| 862 | 894 | return explode("\n", gzuncompress($code));
|
| 863 | 895 | } |
| 864 | 896 | |
| 865 | 897 | //---------------------------------------------------------------------- |
| 898 | + |
|
| 899 | + /** |
|
| 900 | + * @param integer $version |
|
| 901 | + */ |
|
| 866 | 902 | public static function newFrame($version) |
| 867 | 903 | {
|
| 868 | 904 | if($version < 1 || $version > QRSPEC_VERSION_MAX) |
@@ -1236,6 +1272,10 @@ discard block |
||
| 1236 | 1272 | } |
| 1237 | 1273 | |
| 1238 | 1274 | //---------------------------------------------------------------------- |
| 1275 | + |
|
| 1276 | + /** |
|
| 1277 | + * @param integer $version |
|
| 1278 | + */ |
|
| 1239 | 1279 | public function encodeBitStream($version) |
| 1240 | 1280 | {
|
| 1241 | 1281 | try {
|
@@ -1313,6 +1353,10 @@ discard block |
||
| 1313 | 1353 | } |
| 1314 | 1354 | |
| 1315 | 1355 | //---------------------------------------------------------------------- |
| 1356 | + |
|
| 1357 | + /** |
|
| 1358 | + * @param integer $version |
|
| 1359 | + */ |
|
| 1316 | 1360 | public function setVersion($version) |
| 1317 | 1361 | {
|
| 1318 | 1362 | if($version < 0 || $version > QRSPEC_VERSION_MAX) {
|
@@ -1351,6 +1395,12 @@ discard block |
||
| 1351 | 1395 | } |
| 1352 | 1396 | |
| 1353 | 1397 | //---------------------------------------------------------------------- |
| 1398 | + |
|
| 1399 | + /** |
|
| 1400 | + * @param QRinput $mode |
|
| 1401 | + * @param integer $size |
|
| 1402 | + * @param integer $data |
|
| 1403 | + */ |
|
| 1354 | 1404 | public function append($mode, $size, $data) |
| 1355 | 1405 | {
|
| 1356 | 1406 | try {
|
@@ -1446,6 +1496,10 @@ discard block |
||
| 1446 | 1496 | ]; |
| 1447 | 1497 | |
| 1448 | 1498 | //---------------------------------------------------------------------- |
| 1499 | + |
|
| 1500 | + /** |
|
| 1501 | + * @param integer $c |
|
| 1502 | + */ |
|
| 1449 | 1503 | public static function lookAnTable($c) |
| 1450 | 1504 | {
|
| 1451 | 1505 | return (($c > 127)?-1:self::$anTable[$c]); |
@@ -1531,6 +1585,10 @@ discard block |
||
| 1531 | 1585 | |
| 1532 | 1586 | |
| 1533 | 1587 | //---------------------------------------------------------------------- |
| 1588 | + |
|
| 1589 | + /** |
|
| 1590 | + * @param integer $version |
|
| 1591 | + */ |
|
| 1534 | 1592 | public function estimateBitStreamSize($version) |
| 1535 | 1593 | {
|
| 1536 | 1594 | $bits = 0; |
@@ -1648,6 +1706,10 @@ discard block |
||
| 1648 | 1706 | } |
| 1649 | 1707 | |
| 1650 | 1708 | //---------------------------------------------------------------------- |
| 1709 | + |
|
| 1710 | + /** |
|
| 1711 | + * @param QRbitstream $bstream |
|
| 1712 | + */ |
|
| 1651 | 1713 | public function appendPaddingBit(&$bstream) |
| 1652 | 1714 | {
|
| 1653 | 1715 | $bits = $bstream->size(); |
@@ -1977,6 +2039,10 @@ discard block |
||
| 1977 | 2039 | public $modeHint; |
| 1978 | 2040 | |
| 1979 | 2041 | //---------------------------------------------------------------------- |
| 2042 | + |
|
| 2043 | + /** |
|
| 2044 | + * @param QRinput $input |
|
| 2045 | + */ |
|
| 1980 | 2046 | public function __construct($dataStr, $input, $modeHint) |
| 1981 | 2047 | {
|
| 1982 | 2048 | $this->dataStr = $dataStr; |
@@ -1985,6 +2051,10 @@ discard block |
||
| 1985 | 2051 | } |
| 1986 | 2052 | |
| 1987 | 2053 | //---------------------------------------------------------------------- |
| 2054 | + |
|
| 2055 | + /** |
|
| 2056 | + * @param string $str |
|
| 2057 | + */ |
|
| 1988 | 2058 | public static function isdigitat($str, $pos) |
| 1989 | 2059 | {
|
| 1990 | 2060 | if ($pos >= strlen($str)) |
@@ -1994,6 +2064,10 @@ discard block |
||
| 1994 | 2064 | } |
| 1995 | 2065 | |
| 1996 | 2066 | //---------------------------------------------------------------------- |
| 2067 | + |
|
| 2068 | + /** |
|
| 2069 | + * @param string $str |
|
| 2070 | + */ |
|
| 1997 | 2071 | public static function isalnumat($str, $pos) |
| 1998 | 2072 | {
|
| 1999 | 2073 | if ($pos >= strlen($str)) |
@@ -2114,6 +2188,10 @@ discard block |
||
| 2114 | 2188 | } |
| 2115 | 2189 | |
| 2116 | 2190 | //---------------------------------------------------------------------- |
| 2191 | + |
|
| 2192 | + /** |
|
| 2193 | + * @return integer |
|
| 2194 | + */ |
|
| 2117 | 2195 | public function eatKanji() |
| 2118 | 2196 | {
|
| 2119 | 2197 | $p = 0; |
@@ -2447,6 +2525,13 @@ discard block |
||
| 2447 | 2525 | public static $items = []; |
| 2448 | 2526 | |
| 2449 | 2527 | //---------------------------------------------------------------------- |
| 2528 | + |
|
| 2529 | + /** |
|
| 2530 | + * @param integer $symsize |
|
| 2531 | + * @param integer $gfpoly |
|
| 2532 | + * @param integer $fcr |
|
| 2533 | + * @param integer $prim |
|
| 2534 | + */ |
|
| 2450 | 2535 | public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) |
| 2451 | 2536 | {
|
| 2452 | 2537 | foreach(self::$items as $rs) {
|
@@ -2601,6 +2686,10 @@ discard block |
||
| 2601 | 2686 | } |
| 2602 | 2687 | |
| 2603 | 2688 | //---------------------------------------------------------------------- |
| 2689 | + |
|
| 2690 | + /** |
|
| 2691 | + * @param string $code |
|
| 2692 | + */ |
|
| 2604 | 2693 | public static function unserial($code) |
| 2605 | 2694 | {
|
| 2606 | 2695 | $codeArr = []; |
@@ -2661,6 +2750,10 @@ discard block |
||
| 2661 | 2750 | } |
| 2662 | 2751 | |
| 2663 | 2752 | //---------------------------------------------------------------------- |
| 2753 | + |
|
| 2754 | + /** |
|
| 2755 | + * @param integer $length |
|
| 2756 | + */ |
|
| 2664 | 2757 | public function calcN1N3($length) |
| 2665 | 2758 | {
|
| 2666 | 2759 | $demerit = 0; |
@@ -2971,6 +3064,10 @@ discard block |
||
| 2971 | 3064 | public $data; |
| 2972 | 3065 | |
| 2973 | 3066 | //---------------------------------------------------------------------- |
| 3067 | + |
|
| 3068 | + /** |
|
| 3069 | + * @param integer $mask |
|
| 3070 | + */ |
|
| 2974 | 3071 | public function encodeMask(QRinput $input, $mask) |
| 2975 | 3072 | {
|
| 2976 | 3073 | if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) {
|
@@ -3052,6 +3149,11 @@ discard block |
||
| 3052 | 3149 | } |
| 3053 | 3150 | |
| 3054 | 3151 | //---------------------------------------------------------------------- |
| 3152 | + |
|
| 3153 | + /** |
|
| 3154 | + * @param integer $version |
|
| 3155 | + * @param integer $level |
|
| 3156 | + */ |
|
| 3055 | 3157 | public function encodeString8bit($string, $version, $level) |
| 3056 | 3158 | {
|
| 3057 | 3159 | if(string == NULL) {
|
@@ -3071,6 +3173,12 @@ discard block |
||
| 3071 | 3173 | } |
| 3072 | 3174 | |
| 3073 | 3175 | //---------------------------------------------------------------------- |
| 3176 | + |
|
| 3177 | + /** |
|
| 3178 | + * @param integer $version |
|
| 3179 | + * @param integer $level |
|
| 3180 | + * @param boolean $casesensitive |
|
| 3181 | + */ |
|
| 3074 | 3182 | public function encodeString($string, $version, $level, $hint, $casesensitive) |
| 3075 | 3183 | {
|
| 3076 | 3184 | |
@@ -957,6 +957,11 @@ discard block |
||
| 957 | 957 | return $anon_id; |
| 958 | 958 | } |
| 959 | 959 | |
| 960 | + /** |
|
| 961 | + * @param string $inner_user |
|
| 962 | + * @param string $password |
|
| 963 | + * @param string $clientcertdata |
|
| 964 | + */ |
|
| 960 | 965 | public function UDP_login($probeindex, $eaptype, $inner_user, $password, $outer_user = '', $opname_check = TRUE, $frag = TRUE, $clientcertdata = NULL) { |
| 961 | 966 | if (!isset(Config::$RADIUSTESTS['UDP-hosts'][$probeindex])) { |
| 962 | 967 | $this->UDP_reachability_executed = RETVAL_NOTCONFIGURED; |
@@ -1478,10 +1483,8 @@ discard block |
||
| 1478 | 1483 | /** |
| 1479 | 1484 | * This function executes openssl s_client command |
| 1480 | 1485 | * |
| 1481 | - * @param string $key points NAPTR_hostname_records |
|
| 1482 | - * @param string $bracketaddr IP address |
|
| 1483 | - * @param int $port |
|
| 1484 | - * @param string $arg arguments to add to the openssl command |
|
| 1486 | + * @param string $arg arguments to add to the openssl command |
|
| 1487 | + * @param string $host |
|
| 1485 | 1488 | * @return string result of oenssl s_client ... |
| 1486 | 1489 | */ |
| 1487 | 1490 | function openssl_s_client($host, $arg, &$testresults) { |
@@ -138,6 +138,9 @@ |
||
| 138 | 138 | $this->test_result['global'] = max($this->test_result['global'],$level); |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | + /** |
|
| 142 | + * @param string $s |
|
| 143 | + */ |
|
| 141 | 144 | private function get_exec_path($s) { |
| 142 | 145 | $the_path = ""; |
| 143 | 146 | $exec_is = "UNDEFINED"; |
@@ -260,7 +260,6 @@ discard block |
||
| 260 | 260 | /** |
| 261 | 261 | * Return the list of IdPs in a given country |
| 262 | 262 | * |
| 263 | - * @param int $idp_id the IdP identifier |
|
| 264 | 263 | * @return string JSON encoded data |
| 265 | 264 | */ |
| 266 | 265 | |
@@ -301,7 +300,6 @@ discard block |
||
| 301 | 300 | /** |
| 302 | 301 | * Return the list of IdPs in a given country ordered with respect to the user location |
| 303 | 302 | * |
| 304 | - * @param int $idp_id the IdP identifier |
|
| 305 | 303 | * @return string JSON encoded data |
| 306 | 304 | */ |
| 307 | 305 | |
@@ -78,9 +78,6 @@ |
||
| 78 | 78 | * It is CRUTCIAL that the constructor sets $this->supportedEapMethods to an array of methods |
| 79 | 79 | * available for the particular device. |
| 80 | 80 | * {@source} |
| 81 | - * @param string $device a pointer to a device module, which must |
|
| 82 | - * be an index of one of the devices defined in the {@link Devices} |
|
| 83 | - * array in {@link devices.php}. |
|
| 84 | 81 | * @final not to be redefined |
| 85 | 82 | */ |
| 86 | 83 | final public function __construct() { |
@@ -308,6 +308,9 @@ |
||
| 308 | 308 | |
| 309 | 309 | /** |
| 310 | 310 | * produce PEAP, TLS and TTLS configuration files for Windows 8 |
| 311 | + * @param string $auth |
|
| 312 | + * @param string $encryption |
|
| 313 | + * @param integer $i |
|
| 311 | 314 | */ |
| 312 | 315 | private function writeWLANprofile($wlan_profile_name,$ssid,$auth,$encryption,$eap_config,$i) { |
| 313 | 316 | $profile_file_contents = '<?xml version="1.0"?> |