@@ -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) |
@@ -1233,6 +1269,10 @@ discard block |
||
| 1233 | 1269 | } |
| 1234 | 1270 | |
| 1235 | 1271 | //---------------------------------------------------------------------- |
| 1272 | + |
|
| 1273 | + /** |
|
| 1274 | + * @param integer $version |
|
| 1275 | + */ |
|
| 1236 | 1276 | public function encodeBitStream($version) |
| 1237 | 1277 | { |
| 1238 | 1278 | try { |
@@ -1310,6 +1350,10 @@ discard block |
||
| 1310 | 1350 | } |
| 1311 | 1351 | |
| 1312 | 1352 | //---------------------------------------------------------------------- |
| 1353 | + |
|
| 1354 | + /** |
|
| 1355 | + * @param integer $version |
|
| 1356 | + */ |
|
| 1313 | 1357 | public function setVersion($version) |
| 1314 | 1358 | { |
| 1315 | 1359 | if($version < 0 || $version > QRSPEC_VERSION_MAX) { |
@@ -1348,6 +1392,12 @@ discard block |
||
| 1348 | 1392 | } |
| 1349 | 1393 | |
| 1350 | 1394 | //---------------------------------------------------------------------- |
| 1395 | + |
|
| 1396 | + /** |
|
| 1397 | + * @param QRinput $mode |
|
| 1398 | + * @param integer $size |
|
| 1399 | + * @param integer $data |
|
| 1400 | + */ |
|
| 1351 | 1401 | public function append($mode, $size, $data) |
| 1352 | 1402 | { |
| 1353 | 1403 | try { |
@@ -1443,6 +1493,10 @@ discard block |
||
| 1443 | 1493 | ); |
| 1444 | 1494 | |
| 1445 | 1495 | //---------------------------------------------------------------------- |
| 1496 | + |
|
| 1497 | + /** |
|
| 1498 | + * @param integer $c |
|
| 1499 | + */ |
|
| 1446 | 1500 | public static function lookAnTable($c) |
| 1447 | 1501 | { |
| 1448 | 1502 | return (($c > 127)?-1:self::$anTable[$c]); |
@@ -1528,6 +1582,10 @@ discard block |
||
| 1528 | 1582 | |
| 1529 | 1583 | |
| 1530 | 1584 | //---------------------------------------------------------------------- |
| 1585 | + |
|
| 1586 | + /** |
|
| 1587 | + * @param integer $version |
|
| 1588 | + */ |
|
| 1531 | 1589 | public function estimateBitStreamSize($version) |
| 1532 | 1590 | { |
| 1533 | 1591 | $bits = 0; |
@@ -1645,6 +1703,10 @@ discard block |
||
| 1645 | 1703 | } |
| 1646 | 1704 | |
| 1647 | 1705 | //---------------------------------------------------------------------- |
| 1706 | + |
|
| 1707 | + /** |
|
| 1708 | + * @param QRbitstream $bstream |
|
| 1709 | + */ |
|
| 1648 | 1710 | public function appendPaddingBit(&$bstream) |
| 1649 | 1711 | { |
| 1650 | 1712 | $bits = $bstream->size(); |
@@ -1974,6 +2036,10 @@ discard block |
||
| 1974 | 2036 | public $modeHint; |
| 1975 | 2037 | |
| 1976 | 2038 | //---------------------------------------------------------------------- |
| 2039 | + |
|
| 2040 | + /** |
|
| 2041 | + * @param QRinput $input |
|
| 2042 | + */ |
|
| 1977 | 2043 | public function __construct($dataStr, $input, $modeHint) |
| 1978 | 2044 | { |
| 1979 | 2045 | $this->dataStr = $dataStr; |
@@ -1982,6 +2048,10 @@ discard block |
||
| 1982 | 2048 | } |
| 1983 | 2049 | |
| 1984 | 2050 | //---------------------------------------------------------------------- |
| 2051 | + |
|
| 2052 | + /** |
|
| 2053 | + * @param string $str |
|
| 2054 | + */ |
|
| 1985 | 2055 | public static function isdigitat($str, $pos) |
| 1986 | 2056 | { |
| 1987 | 2057 | if ($pos >= strlen($str)) |
@@ -1991,6 +2061,10 @@ discard block |
||
| 1991 | 2061 | } |
| 1992 | 2062 | |
| 1993 | 2063 | //---------------------------------------------------------------------- |
| 2064 | + |
|
| 2065 | + /** |
|
| 2066 | + * @param string $str |
|
| 2067 | + */ |
|
| 1994 | 2068 | public static function isalnumat($str, $pos) |
| 1995 | 2069 | { |
| 1996 | 2070 | if ($pos >= strlen($str)) |
@@ -2111,6 +2185,10 @@ discard block |
||
| 2111 | 2185 | } |
| 2112 | 2186 | |
| 2113 | 2187 | //---------------------------------------------------------------------- |
| 2188 | + |
|
| 2189 | + /** |
|
| 2190 | + * @return integer |
|
| 2191 | + */ |
|
| 2114 | 2192 | public function eatKanji() |
| 2115 | 2193 | { |
| 2116 | 2194 | $p = 0; |
@@ -2444,6 +2522,13 @@ discard block |
||
| 2444 | 2522 | public static $items = array(); |
| 2445 | 2523 | |
| 2446 | 2524 | //---------------------------------------------------------------------- |
| 2525 | + |
|
| 2526 | + /** |
|
| 2527 | + * @param integer $symsize |
|
| 2528 | + * @param integer $gfpoly |
|
| 2529 | + * @param integer $fcr |
|
| 2530 | + * @param integer $prim |
|
| 2531 | + */ |
|
| 2447 | 2532 | public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) |
| 2448 | 2533 | { |
| 2449 | 2534 | foreach(self::$items as $rs) { |
@@ -2598,6 +2683,10 @@ discard block |
||
| 2598 | 2683 | } |
| 2599 | 2684 | |
| 2600 | 2685 | //---------------------------------------------------------------------- |
| 2686 | + |
|
| 2687 | + /** |
|
| 2688 | + * @param string $code |
|
| 2689 | + */ |
|
| 2601 | 2690 | public static function unserial($code) |
| 2602 | 2691 | { |
| 2603 | 2692 | $codeArr = array(); |
@@ -2658,6 +2747,10 @@ discard block |
||
| 2658 | 2747 | } |
| 2659 | 2748 | |
| 2660 | 2749 | //---------------------------------------------------------------------- |
| 2750 | + |
|
| 2751 | + /** |
|
| 2752 | + * @param integer $length |
|
| 2753 | + */ |
|
| 2661 | 2754 | public function calcN1N3($length) |
| 2662 | 2755 | { |
| 2663 | 2756 | $demerit = 0; |
@@ -2968,6 +3061,10 @@ discard block |
||
| 2968 | 3061 | public $data; |
| 2969 | 3062 | |
| 2970 | 3063 | //---------------------------------------------------------------------- |
| 3064 | + |
|
| 3065 | + /** |
|
| 3066 | + * @param integer $mask |
|
| 3067 | + */ |
|
| 2971 | 3068 | public function encodeMask(QRinput $input, $mask) |
| 2972 | 3069 | { |
| 2973 | 3070 | if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { |
@@ -3049,6 +3146,11 @@ discard block |
||
| 3049 | 3146 | } |
| 3050 | 3147 | |
| 3051 | 3148 | //---------------------------------------------------------------------- |
| 3149 | + |
|
| 3150 | + /** |
|
| 3151 | + * @param integer $version |
|
| 3152 | + * @param integer $level |
|
| 3153 | + */ |
|
| 3052 | 3154 | public function encodeString8bit($string, $version, $level) |
| 3053 | 3155 | { |
| 3054 | 3156 | if(string == NULL) { |
@@ -3068,6 +3170,12 @@ discard block |
||
| 3068 | 3170 | } |
| 3069 | 3171 | |
| 3070 | 3172 | //---------------------------------------------------------------------- |
| 3173 | + |
|
| 3174 | + /** |
|
| 3175 | + * @param integer $version |
|
| 3176 | + * @param integer $level |
|
| 3177 | + * @param boolean $casesensitive |
|
| 3178 | + */ |
|
| 3071 | 3179 | public function encodeString($string, $version, $level, $hint, $casesensitive) |
| 3072 | 3180 | { |
| 3073 | 3181 | |
@@ -37,6 +37,11 @@ discard block |
||
| 37 | 37 | public function __construct(HelperFunctionsInterface $functions) { |
| 38 | 38 | $this->functions = $functions; |
| 39 | 39 | } |
| 40 | + |
|
| 41 | + /** |
|
| 42 | + * @param string $entity |
|
| 43 | + * @param boolean $serverSidePagination |
|
| 44 | + */ |
|
| 40 | 45 | final public function prepareList($entity, $serverSidePagination) |
| 41 | 46 | { |
| 42 | 47 | $return = []; |
@@ -62,6 +67,10 @@ discard block |
||
| 62 | 67 | } |
| 63 | 68 | return $return; |
| 64 | 69 | } |
| 70 | + |
|
| 71 | + /** |
|
| 72 | + * @param string $entity |
|
| 73 | + */ |
|
| 65 | 74 | final public function fetchData($entity, $params) |
| 66 | 75 | { |
| 67 | 76 | $return = []; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | protected $builder; |
| 43 | 43 | /** |
| 44 | 44 | * Customer Repository Construct |
| 45 | - * @param object $builder |
|
| 45 | + * @param \Mmanager\Persistence\Adapter\CodeIgniter\CIQueryBuilder $builder |
|
| 46 | 46 | * @return mixed |
| 47 | 47 | */ |
| 48 | 48 | public function __construct($builder) { |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | protected $builder; |
| 42 | 42 | /** |
| 43 | 43 | * Customer Repository Construct |
| 44 | - * @param object $builder |
|
| 44 | + * @param \Mmanager\Persistence\Adapter\CodeIgniter\CIQueryBuilder $builder |
|
| 45 | 45 | * @return mixed |
| 46 | 46 | */ |
| 47 | 47 | public function __construct($builder) { |
@@ -205,6 +205,9 @@ |
||
| 205 | 205 | * Perform mySQL query and try to determine result value |
| 206 | 206 | */ |
| 207 | 207 | |
| 208 | + /** |
|
| 209 | + * @param string $query |
|
| 210 | + */ |
|
| 208 | 211 | function query($query) |
| 209 | 212 | { |
| 210 | 213 | |
@@ -68,6 +68,9 @@ discard block |
||
| 68 | 68 | * Returns array of host and port. If port is omitted, returns $default |
| 69 | 69 | */ |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @param string $host |
|
| 73 | + */ |
|
| 71 | 74 | function get_host_port($host, $default = false) |
| 72 | 75 | { |
| 73 | 76 | $port = $default; |
@@ -217,6 +220,9 @@ discard block |
||
| 217 | 220 | * Return the the query as a result set - see docs for more details |
| 218 | 221 | */ |
| 219 | 222 | |
| 223 | + /** |
|
| 224 | + * @param string $output |
|
| 225 | + */ |
|
| 220 | 226 | function get_results($query = null, $output = OBJECT) |
| 221 | 227 | { |
| 222 | 228 | |
@@ -293,6 +299,10 @@ discard block |
||
| 293 | 299 | * store_cache |
| 294 | 300 | */ |
| 295 | 301 | |
| 302 | + /** |
|
| 303 | + * @param string $query |
|
| 304 | + * @param boolean $is_insert |
|
| 305 | + */ |
|
| 296 | 306 | function store_cache($query, $is_insert) |
| 297 | 307 | { |
| 298 | 308 | |
@@ -328,6 +338,9 @@ discard block |
||
| 328 | 338 | * get_cache |
| 329 | 339 | */ |
| 330 | 340 | |
| 341 | + /** |
|
| 342 | + * @param string $query |
|
| 343 | + */ |
|
| 331 | 344 | function get_cache($query) |
| 332 | 345 | { |
| 333 | 346 | |
@@ -557,6 +570,9 @@ discard block |
||
| 557 | 570 | return round($this->timer_get_cur() - $this->timers[$timer_name], 2); |
| 558 | 571 | } |
| 559 | 572 | |
| 573 | + /** |
|
| 574 | + * @param integer $timer_name |
|
| 575 | + */ |
|
| 560 | 576 | function timer_update_global($timer_name) |
| 561 | 577 | { |
| 562 | 578 | if ($this->do_profile) |
@@ -105,6 +105,9 @@ |
||
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | + /** |
|
| 109 | + * @return string |
|
| 110 | + */ |
|
| 108 | 111 | public function getRepairTicket($id, $var = null) { |
| 109 | 112 | if ( ! $var) { |
| 110 | 113 | return $this->db->get_row("SELECT * FROM oc_tickets WHERE id = {$id}"); |
@@ -42,6 +42,10 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | return $this->user_id; |
| 44 | 44 | } |
| 45 | + |
|
| 46 | + /** |
|
| 47 | + * @param string $request_url |
|
| 48 | + */ |
|
| 45 | 49 | public static function getUrl($request_url) { |
| 46 | 50 | $ch = curl_init(); |
| 47 | 51 | curl_setopt($ch, CURLOPT_URL, $request_url); |
@@ -70,6 +74,12 @@ discard block |
||
| 70 | 74 | public static function render($module, $view_file, $data = null, $return = false) { |
| 71 | 75 | return __render($module, $view_file, $data, $return); |
| 72 | 76 | } |
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * @param string $log_msg |
|
| 80 | + * @param string $folder |
|
| 81 | + * @param string $extension |
|
| 82 | + */ |
|
| 73 | 83 | public static function write_log($log_msg, $folder, $extension) |
| 74 | 84 | { |
| 75 | 85 | if (!file_exists($folder)) |
@@ -22,7 +22,6 @@ |
||
| 22 | 22 | use Mmanager\Domain\Repository\Customer\CustomerRepository; |
| 23 | 23 | use Mmanager\Domain\Repository\Invoice\InvoiceRepository; |
| 24 | 24 | use Mmanager\Persistence\Adapter\CodeIgniter\CIQueryBuilder; |
| 25 | -use Mmanager\Logger\FileLogger; |
|
| 26 | 25 | use Mmanager\Logger\FileLoggerFactory; |
| 27 | 26 | |
| 28 | 27 | class Mmanager |
@@ -20,10 +20,6 @@ |
||
| 20 | 20 | namespace Mmanager; |
| 21 | 21 | |
| 22 | 22 | use Mmanager\Mmanager; |
| 23 | -use Mmanager\Logger\FileLogger; |
|
| 24 | -use Mmanager\Logger\FileLoggerFactory; |
|
| 25 | -use Mmanager\Logger\StdoutLogger; |
|
| 26 | -use Mmanager\Logger\StdoutLoggerFactory; |
|
| 27 | 23 | |
| 28 | 24 | class SmsService { |
| 29 | 25 | protected $platform; |