@@ -79,6 +79,9 @@ |
||
| 79 | 79 | return $this->_originalRoute; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | + /** |
|
| 83 | + * @param string $route |
|
| 84 | + */ |
|
| 82 | 85 | public function setRoute($route) |
| 83 | 86 | { |
| 84 | 87 | $this->_route = $route; |
@@ -14,6 +14,9 @@ |
||
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $dir |
|
| 19 | + */ |
|
| 17 | 20 | public static function truncate($dir) |
| 18 | 21 | { |
| 19 | 22 | self::delete($dir, true); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | /** |
| 179 | - * @return Ajde_Db_Adapter_Abstract |
|
| 179 | + * @return Ajde_Db_PDO |
|
| 180 | 180 | */ |
| 181 | 181 | public function getConnection() |
| 182 | 182 | { |
@@ -224,6 +224,9 @@ discard block |
||
| 224 | 224 | return $this->loadByFields([$pk => $value]); |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | + /** |
|
| 228 | + * @param string $field |
|
| 229 | + */ |
|
| 227 | 230 | public function loadByField($field, $value) |
| 228 | 231 | { |
| 229 | 232 | return $this->loadByFields([$field => $value]); |
@@ -429,7 +432,7 @@ discard block |
||
| 429 | 432 | |
| 430 | 433 | /** |
| 431 | 434 | * |
| 432 | - * @param array $fields |
|
| 435 | + * @param string[] $fields |
|
| 433 | 436 | */ |
| 434 | 437 | public function setEncryptedFields($fields) |
| 435 | 438 | { |
@@ -734,6 +737,9 @@ discard block |
||
| 734 | 737 | return new $parentModelName(); |
| 735 | 738 | } |
| 736 | 739 | |
| 740 | + /** |
|
| 741 | + * @param string $column |
|
| 742 | + */ |
|
| 737 | 743 | public function getParentTable($column) |
| 738 | 744 | { |
| 739 | 745 | $fk = $this->getTable()->getFK($column); |
@@ -864,6 +870,9 @@ discard block |
||
| 864 | 870 | |
| 865 | 871 | // TREE SORT FUNCTIONS |
| 866 | 872 | |
| 873 | + /** |
|
| 874 | + * @param string $collectionName |
|
| 875 | + */ |
|
| 867 | 876 | public function sortTree($collectionName, $parentField = 'parent', $levelField = 'level', $sortField = 'sort') |
| 868 | 877 | { |
| 869 | 878 | $collection = new $collectionName(); |
@@ -874,6 +883,11 @@ discard block |
||
| 874 | 883 | $this->_recurseChildren($collection, $collectionName, $parentField, $levelField, $sortField); |
| 875 | 884 | } |
| 876 | 885 | |
| 886 | + /** |
|
| 887 | + * @param string $parentField |
|
| 888 | + * @param string $levelField |
|
| 889 | + * @param string $sortField |
|
| 890 | + */ |
|
| 877 | 891 | private function _recurseChildren( |
| 878 | 892 | $collection, |
| 879 | 893 | $collectionName, |
@@ -5,6 +5,9 @@ discard block |
||
| 5 | 5 | protected $_contents = null; |
| 6 | 6 | protected $_table = []; |
| 7 | 7 | |
| 8 | + /** |
|
| 9 | + * @param string $base |
|
| 10 | + */ |
|
| 8 | 11 | public function __construct($base, $action, $format = 'html') |
| 9 | 12 | { |
| 10 | 13 | $this->set('base', $base); |
@@ -34,6 +37,9 @@ discard block |
||
| 34 | 37 | $this->setFileinfo(); |
| 35 | 38 | } |
| 36 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $action |
|
| 42 | + */ |
|
| 37 | 43 | public function setAction($action) |
| 38 | 44 | { |
| 39 | 45 | $this->set('action', $action); |
@@ -113,6 +119,9 @@ discard block |
||
| 113 | 119 | return $this->get('parser'); |
| 114 | 120 | } |
| 115 | 121 | |
| 122 | + /** |
|
| 123 | + * @param string $base |
|
| 124 | + */ |
|
| 116 | 125 | public static function exist($base, $action, $format = 'html') |
| 117 | 126 | { |
| 118 | 127 | return self::_getFileInfo($base, $action, $format); |
@@ -41,6 +41,9 @@ discard block |
||
| 41 | 41 | $this->_enabled = false; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @return resource|null |
|
| 46 | + */ |
|
| 44 | 47 | public function getHashContext() |
| 45 | 48 | { |
| 46 | 49 | if (!isset($this->_hashContext)) { |
@@ -76,6 +79,9 @@ discard block |
||
| 76 | 79 | return $this->_hashFinal; |
| 77 | 80 | } |
| 78 | 81 | |
| 82 | + /** |
|
| 83 | + * @param integer $timestamp |
|
| 84 | + */ |
|
| 79 | 85 | public function addLastModified($timestamp) |
| 80 | 86 | { |
| 81 | 87 | $this->_lastModified[] = $timestamp; |
@@ -148,7 +154,7 @@ discard block |
||
| 148 | 154 | * Remember a cached value in the cache directory as a file |
| 149 | 155 | * |
| 150 | 156 | * @param string $key |
| 151 | - * @param callable $callback |
|
| 157 | + * @param Closure $callback |
|
| 152 | 158 | * @param int $ttl in seconds, defaults to 3600 (one hour) |
| 153 | 159 | * @return mixed |
| 154 | 160 | */ |
@@ -425,6 +425,9 @@ |
||
| 425 | 425 | return Ajde_Db_PDOStatement::getEmulatedSql($this->getSql(), $this->getFilterValues()); |
| 426 | 426 | } |
| 427 | 427 | |
| 428 | + /** |
|
| 429 | + * @param string $queryPart |
|
| 430 | + */ |
|
| 428 | 431 | public function getFilter($queryPart) |
| 429 | 432 | { |
| 430 | 433 | $arguments = []; |
@@ -196,6 +196,9 @@ discard block |
||
| 196 | 196 | return $type; |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | + /** |
|
| 200 | + * @return string |
|
| 201 | + */ |
|
| 199 | 202 | public static function getExceptionChannelMap(Exception $exception) |
| 200 | 203 | { |
| 201 | 204 | if ($exception instanceof ErrorException) { |
@@ -211,6 +214,9 @@ discard block |
||
| 211 | 214 | } |
| 212 | 215 | } |
| 213 | 216 | |
| 217 | + /** |
|
| 218 | + * @return string |
|
| 219 | + */ |
|
| 214 | 220 | public static function getExceptionLevelMap(Exception $exception) |
| 215 | 221 | { |
| 216 | 222 | if ($exception instanceof ErrorException) { |
@@ -226,6 +232,9 @@ discard block |
||
| 226 | 232 | } |
| 227 | 233 | } |
| 228 | 234 | |
| 235 | + /** |
|
| 236 | + * @param integer $type |
|
| 237 | + */ |
|
| 229 | 238 | public static function getErrorType($type) |
| 230 | 239 | { |
| 231 | 240 | switch ($type) { |
@@ -266,6 +275,11 @@ discard block |
||
| 266 | 275 | |
| 267 | 276 | static $firstApplicationFileExpanded = false; |
| 268 | 277 | |
| 278 | + /** |
|
| 279 | + * @param string $filename |
|
| 280 | + * @param integer $line |
|
| 281 | + * @param string $arguments |
|
| 282 | + */ |
|
| 269 | 283 | protected static function embedScript($filename = null, $line = null, $arguments = null, $expand = false) |
| 270 | 284 | { |
| 271 | 285 | $lineOffset = 5; |
@@ -5,6 +5,9 @@ |
||
| 5 | 5 | const TYPE_EXTENSION = 'ext'; |
| 6 | 6 | const TYPE_MIMETYPE = 'mime'; |
| 7 | 7 | |
| 8 | + /** |
|
| 9 | + * @param string $filename |
|
| 10 | + */ |
|
| 8 | 11 | public static function getMimeType($filename) |
| 9 | 12 | { |
| 10 | 13 | $realpath = realpath($filename); |
@@ -89,6 +89,9 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | class qrstr |
| 91 | 91 | { |
| 92 | + /** |
|
| 93 | + * @param string $repl |
|
| 94 | + */ |
|
| 92 | 95 | public static function set(&$srctab, $x, $y, $repl, $replLen = false) |
| 93 | 96 | { |
| 94 | 97 | $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false) ? substr($repl, 0, $replLen) : $repl, $x, |
@@ -219,6 +222,11 @@ discard block |
||
| 219 | 222 | } |
| 220 | 223 | |
| 221 | 224 | //---------------------------------------------------------------------- |
| 225 | + |
|
| 226 | + /** |
|
| 227 | + * @param boolean $outfile |
|
| 228 | + * @param string $err |
|
| 229 | + */ |
|
| 222 | 230 | public static function log($outfile, $err) |
| 223 | 231 | { |
| 224 | 232 | if (QR_LOG_DIR !== false) { |
@@ -245,6 +253,10 @@ discard block |
||
| 245 | 253 | } |
| 246 | 254 | |
| 247 | 255 | //---------------------------------------------------------------------- |
| 256 | + |
|
| 257 | + /** |
|
| 258 | + * @param string $markerId |
|
| 259 | + */ |
|
| 248 | 260 | public static function markTime($markerId) |
| 249 | 261 | { |
| 250 | 262 | list($usec, $sec) = explode(" ", microtime()); |
@@ -397,18 +409,30 @@ discard block |
||
| 397 | 409 | } |
| 398 | 410 | |
| 399 | 411 | //---------------------------------------------------------------------- |
| 412 | + |
|
| 413 | + /** |
|
| 414 | + * @param integer $version |
|
| 415 | + */ |
|
| 400 | 416 | public static function getWidth($version) |
| 401 | 417 | { |
| 402 | 418 | return self::$capacity[$version][QRCAP_WIDTH]; |
| 403 | 419 | } |
| 404 | 420 | |
| 405 | 421 | //---------------------------------------------------------------------- |
| 422 | + |
|
| 423 | + /** |
|
| 424 | + * @param integer $version |
|
| 425 | + */ |
|
| 406 | 426 | public static function getRemainder($version) |
| 407 | 427 | { |
| 408 | 428 | return self::$capacity[$version][QRCAP_REMINDER]; |
| 409 | 429 | } |
| 410 | 430 | |
| 411 | 431 | //---------------------------------------------------------------------- |
| 432 | + |
|
| 433 | + /** |
|
| 434 | + * @param integer $size |
|
| 435 | + */ |
|
| 412 | 436 | public static function getMinimumVersion($size, $level) |
| 413 | 437 | { |
| 414 | 438 | |
@@ -529,6 +553,9 @@ discard block |
||
| 529 | 553 | //---------------------------------------------------------------------- |
| 530 | 554 | // CACHEABLE!!! |
| 531 | 555 | |
| 556 | + /** |
|
| 557 | + * @param integer $version |
|
| 558 | + */ |
|
| 532 | 559 | public static function getEccSpec($version, $level, array &$spec) |
| 533 | 560 | { |
| 534 | 561 | if (count($spec) < 5) { |
@@ -935,12 +962,20 @@ discard block |
||
| 935 | 962 | } |
| 936 | 963 | |
| 937 | 964 | //---------------------------------------------------------------------- |
| 965 | + |
|
| 966 | + /** |
|
| 967 | + * @param string $code |
|
| 968 | + */ |
|
| 938 | 969 | public static function unserial($code) |
| 939 | 970 | { |
| 940 | 971 | return explode("\n", gzuncompress($code)); |
| 941 | 972 | } |
| 942 | 973 | |
| 943 | 974 | //---------------------------------------------------------------------- |
| 975 | + |
|
| 976 | + /** |
|
| 977 | + * @param integer $version |
|
| 978 | + */ |
|
| 944 | 979 | public static function newFrame($version) |
| 945 | 980 | { |
| 946 | 981 | if ($version < 1 || $version > QRSPEC_VERSION_MAX) { |
@@ -1354,6 +1389,10 @@ discard block |
||
| 1354 | 1389 | } |
| 1355 | 1390 | |
| 1356 | 1391 | //---------------------------------------------------------------------- |
| 1392 | + |
|
| 1393 | + /** |
|
| 1394 | + * @param integer $version |
|
| 1395 | + */ |
|
| 1357 | 1396 | public function encodeBitStream($version) |
| 1358 | 1397 | { |
| 1359 | 1398 | try { |
@@ -1444,6 +1483,10 @@ discard block |
||
| 1444 | 1483 | } |
| 1445 | 1484 | |
| 1446 | 1485 | //---------------------------------------------------------------------- |
| 1486 | + |
|
| 1487 | + /** |
|
| 1488 | + * @param integer $version |
|
| 1489 | + */ |
|
| 1447 | 1490 | public function setVersion($version) |
| 1448 | 1491 | { |
| 1449 | 1492 | if ($version < 0 || $version > QRSPEC_VERSION_MAX) { |
@@ -1484,6 +1527,12 @@ discard block |
||
| 1484 | 1527 | } |
| 1485 | 1528 | |
| 1486 | 1529 | //---------------------------------------------------------------------- |
| 1530 | + |
|
| 1531 | + /** |
|
| 1532 | + * @param QRinput $mode |
|
| 1533 | + * @param integer $size |
|
| 1534 | + * @param integer $data |
|
| 1535 | + */ |
|
| 1487 | 1536 | public function append($mode, $size, $data) |
| 1488 | 1537 | { |
| 1489 | 1538 | try { |
@@ -1701,6 +1750,10 @@ discard block |
||
| 1701 | 1750 | ]; |
| 1702 | 1751 | |
| 1703 | 1752 | //---------------------------------------------------------------------- |
| 1753 | + |
|
| 1754 | + /** |
|
| 1755 | + * @param integer $c |
|
| 1756 | + */ |
|
| 1704 | 1757 | public static function lookAnTable($c) |
| 1705 | 1758 | { |
| 1706 | 1759 | return (($c > 127) ? -1 : self::$anTable[$c]); |
@@ -1798,6 +1851,10 @@ discard block |
||
| 1798 | 1851 | } |
| 1799 | 1852 | |
| 1800 | 1853 | //---------------------------------------------------------------------- |
| 1854 | + |
|
| 1855 | + /** |
|
| 1856 | + * @param integer $version |
|
| 1857 | + */ |
|
| 1801 | 1858 | public function estimateBitStreamSize($version) |
| 1802 | 1859 | { |
| 1803 | 1860 | $bits = 0; |
@@ -1927,6 +1984,10 @@ discard block |
||
| 1927 | 1984 | } |
| 1928 | 1985 | |
| 1929 | 1986 | //---------------------------------------------------------------------- |
| 1987 | + |
|
| 1988 | + /** |
|
| 1989 | + * @param QRbitstream $bstream |
|
| 1990 | + */ |
|
| 1930 | 1991 | public function appendPaddingBit(&$bstream) |
| 1931 | 1992 | { |
| 1932 | 1993 | $bits = $bstream->size(); |
@@ -2252,6 +2313,10 @@ discard block |
||
| 2252 | 2313 | public $modeHint; |
| 2253 | 2314 | |
| 2254 | 2315 | //---------------------------------------------------------------------- |
| 2316 | + |
|
| 2317 | + /** |
|
| 2318 | + * @param QRinput $input |
|
| 2319 | + */ |
|
| 2255 | 2320 | public function __construct($dataStr, $input, $modeHint) |
| 2256 | 2321 | { |
| 2257 | 2322 | $this->dataStr = $dataStr; |
@@ -2260,6 +2325,10 @@ discard block |
||
| 2260 | 2325 | } |
| 2261 | 2326 | |
| 2262 | 2327 | //---------------------------------------------------------------------- |
| 2328 | + |
|
| 2329 | + /** |
|
| 2330 | + * @param string $str |
|
| 2331 | + */ |
|
| 2263 | 2332 | public static function isdigitat($str, $pos) |
| 2264 | 2333 | { |
| 2265 | 2334 | if ($pos >= strlen($str)) { |
@@ -2270,6 +2339,10 @@ discard block |
||
| 2270 | 2339 | } |
| 2271 | 2340 | |
| 2272 | 2341 | //---------------------------------------------------------------------- |
| 2342 | + |
|
| 2343 | + /** |
|
| 2344 | + * @param string $str |
|
| 2345 | + */ |
|
| 2273 | 2346 | public static function isalnumat($str, $pos) |
| 2274 | 2347 | { |
| 2275 | 2348 | if ($pos >= strlen($str)) { |
@@ -2397,6 +2470,10 @@ discard block |
||
| 2397 | 2470 | } |
| 2398 | 2471 | |
| 2399 | 2472 | //---------------------------------------------------------------------- |
| 2473 | + |
|
| 2474 | + /** |
|
| 2475 | + * @return integer |
|
| 2476 | + */ |
|
| 2400 | 2477 | public function eatKanji() |
| 2401 | 2478 | { |
| 2402 | 2479 | $p = 0; |
@@ -2756,6 +2833,13 @@ discard block |
||
| 2756 | 2833 | public static $items = []; |
| 2757 | 2834 | |
| 2758 | 2835 | //---------------------------------------------------------------------- |
| 2836 | + |
|
| 2837 | + /** |
|
| 2838 | + * @param integer $symsize |
|
| 2839 | + * @param integer $gfpoly |
|
| 2840 | + * @param integer $fcr |
|
| 2841 | + * @param integer $prim |
|
| 2842 | + */ |
|
| 2759 | 2843 | public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) |
| 2760 | 2844 | { |
| 2761 | 2845 | foreach (self::$items as $rs) { |
@@ -2949,6 +3033,10 @@ discard block |
||
| 2949 | 3033 | } |
| 2950 | 3034 | |
| 2951 | 3035 | //---------------------------------------------------------------------- |
| 3036 | + |
|
| 3037 | + /** |
|
| 3038 | + * @param string $code |
|
| 3039 | + */ |
|
| 2952 | 3040 | public static function unserial($code) |
| 2953 | 3041 | { |
| 2954 | 3042 | $codeArr = []; |
@@ -3012,6 +3100,10 @@ discard block |
||
| 3012 | 3100 | } |
| 3013 | 3101 | |
| 3014 | 3102 | //---------------------------------------------------------------------- |
| 3103 | + |
|
| 3104 | + /** |
|
| 3105 | + * @param integer $length |
|
| 3106 | + */ |
|
| 3015 | 3107 | public function calcN1N3($length) |
| 3016 | 3108 | { |
| 3017 | 3109 | $demerit = 0; |
@@ -3333,6 +3425,10 @@ discard block |
||
| 3333 | 3425 | public $data; |
| 3334 | 3426 | |
| 3335 | 3427 | //---------------------------------------------------------------------- |
| 3428 | + |
|
| 3429 | + /** |
|
| 3430 | + * @param integer $mask |
|
| 3431 | + */ |
|
| 3336 | 3432 | public function encodeMask(QRinput $input, $mask) |
| 3337 | 3433 | { |
| 3338 | 3434 | if ($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { |
@@ -3414,6 +3510,11 @@ discard block |
||
| 3414 | 3510 | } |
| 3415 | 3511 | |
| 3416 | 3512 | //---------------------------------------------------------------------- |
| 3513 | + |
|
| 3514 | + /** |
|
| 3515 | + * @param integer $version |
|
| 3516 | + * @param integer $level |
|
| 3517 | + */ |
|
| 3417 | 3518 | public function encodeString8bit($string, $version, $level) |
| 3418 | 3519 | { |
| 3419 | 3520 | if (string == null) { |
@@ -3438,6 +3539,12 @@ discard block |
||
| 3438 | 3539 | } |
| 3439 | 3540 | |
| 3440 | 3541 | //---------------------------------------------------------------------- |
| 3542 | + |
|
| 3543 | + /** |
|
| 3544 | + * @param integer $version |
|
| 3545 | + * @param integer $level |
|
| 3546 | + * @param boolean $casesensitive |
|
| 3547 | + */ |
|
| 3441 | 3548 | public function encodeString($string, $version, $level, $hint, $casesensitive) |
| 3442 | 3549 | { |
| 3443 | 3550 | |
@@ -3461,6 +3568,10 @@ discard block |
||
| 3461 | 3568 | } |
| 3462 | 3569 | |
| 3463 | 3570 | //---------------------------------------------------------------------- |
| 3571 | + |
|
| 3572 | + /** |
|
| 3573 | + * @param integer $level |
|
| 3574 | + */ |
|
| 3464 | 3575 | public static function png( |
| 3465 | 3576 | $text, |
| 3466 | 3577 | $outfile = false, |