@@ -70,6 +70,11 @@ |
||
70 | 70 | return $this->getImageFrom($this->activeSkin->getName(), $image_tag, $template); |
71 | 71 | } |
72 | 72 | |
73 | + /** |
|
74 | + * @param string $skinName |
|
75 | + * @param string $image_tag |
|
76 | + * @param template|null $template |
|
77 | + */ |
|
73 | 78 | public function getImageFrom($skinName, $image_tag, $template) { |
74 | 79 | return $this->getSkin($skinName)->imageFromStringTag($image_tag, $template); |
75 | 80 | } |
@@ -468,6 +468,7 @@ discard block |
||
468 | 468 | * Compile IF tags - much of this is from Smarty with |
469 | 469 | * some adaptions for our block level methods |
470 | 470 | * @access private |
471 | + * @param boolean $elseif |
|
471 | 472 | */ |
472 | 473 | function compile_tag_if($tag_args, $elseif) |
473 | 474 | { |
@@ -625,6 +626,7 @@ discard block |
||
625 | 626 | /** |
626 | 627 | * Compile DEFINE tags |
627 | 628 | * @access private |
629 | + * @param boolean $op |
|
628 | 630 | */ |
629 | 631 | function compile_tag_define($tag_args, $op) |
630 | 632 | { |
@@ -703,6 +705,7 @@ discard block |
||
703 | 705 | * parse expression |
704 | 706 | * This is from Smarty |
705 | 707 | * @access private |
708 | + * @param string $is_arg |
|
706 | 709 | */ |
707 | 710 | function _parse_is_expr($is_arg, $tokens) |
708 | 711 | { |
@@ -799,6 +802,8 @@ discard block |
||
799 | 802 | * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. |
800 | 803 | * NOTE: does not expect a trailing "." on the blockname. |
801 | 804 | * @access private |
805 | + * @param string $blockname |
|
806 | + * @param boolean $include_last_iterator |
|
802 | 807 | */ |
803 | 808 | function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) |
804 | 809 | { |
@@ -862,6 +867,7 @@ discard block |
||
862 | 867 | /** |
863 | 868 | * Minifies template w/i PHP code by removing extra spaces |
864 | 869 | * @access private |
870 | + * @return string |
|
865 | 871 | */ |
866 | 872 | function minify($html) |
867 | 873 | { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | - * @return array |
|
42 | + * @return integer |
|
43 | 43 | */ |
44 | 44 | public function toArray() { |
45 | 45 | $tutorial = array(); |
@@ -11,6 +11,9 @@ discard block |
||
11 | 11 | |
12 | 12 | require_once('db/db_queries.php'); |
13 | 13 | |
14 | +/** |
|
15 | + * @param string $tablename |
|
16 | + */ |
|
14 | 17 | function db_change_units_perform($query, $tablename, $object_id) { |
15 | 18 | $query = implode(',', $query); |
16 | 19 | if($query && $object_id) { |
@@ -67,11 +70,8 @@ discard block |
||
67 | 70 | /** |
68 | 71 | * Функция проверяет статус транзакции |
69 | 72 | * |
70 | - * @param null|true|false $status Должна ли быть запущена транзакция в момент проверки |
|
71 | - * <p>null - транзакция НЕ должна быть запущена</p> |
|
72 | - * <p>true - транзакция должна быть запущена - для совместимости с $for_update</p> |
|
73 | - * <p>false - всё равно - для совместимости с $for_update</p> |
|
74 | - * @return bool Текущий статус транзакции |
|
73 | + * @param boolean $transaction_should_be_started |
|
74 | + * @return null|boolean Текущий статус транзакции |
|
75 | 75 | */ |
76 | 76 | function sn_db_transaction_check($transaction_should_be_started = null) { |
77 | 77 | return classSupernova::db_transaction_check($transaction_should_be_started); |
@@ -12,6 +12,9 @@ discard block |
||
12 | 12 | require_once('general/compatibility.php'); |
13 | 13 | require_once('general_pname.php'); |
14 | 14 | |
15 | +/** |
|
16 | + * @param string $func_name |
|
17 | + */ |
|
15 | 18 | function sn_function_call($func_name, $func_arg = array()) |
16 | 19 | { |
17 | 20 | global $functions; // All data in $functions should be normalized to valid 'callable' state: '<function_name>'|array('<object_name>', '<method_name>') |
@@ -65,6 +68,9 @@ discard block |
||
65 | 68 | |
66 | 69 | // ---------------------------------------------------------------------------------------------------------------- |
67 | 70 | // Fonction de lecture / ecriture / exploitation de templates |
71 | +/** |
|
72 | + * @param string $filename |
|
73 | + */ |
|
68 | 74 | function sys_file_read($filename) |
69 | 75 | { |
70 | 76 | return @file_get_contents($filename); |
@@ -111,7 +117,7 @@ discard block |
||
111 | 117 | /** |
112 | 118 | * Получение курса обмены валюты в серверную валюту |
113 | 119 | * |
114 | - * @param $currency_symbol |
|
120 | + * @param string $currency_symbol |
|
115 | 121 | * |
116 | 122 | * @return float |
117 | 123 | */ |
@@ -148,6 +154,7 @@ discard block |
||
148 | 154 | null - standard result |
149 | 155 | true - return only style class for current params |
150 | 156 | false - return array('text' => $ret, 'class' => $class), where $ret - unstyled |
157 | + * @param boolean $style |
|
151 | 158 | */ |
152 | 159 | |
153 | 160 | function pretty_number($n, $floor = true, $color = false, $limit = false, $style = null) |
@@ -267,6 +274,9 @@ discard block |
||
267 | 274 | return preg_replace($ListCensure, '*', $String); |
268 | 275 | } |
269 | 276 | |
277 | +/** |
|
278 | + * @param string $email |
|
279 | + */ |
|
270 | 280 | function is_email($email) { |
271 | 281 | return(preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i", $email)); |
272 | 282 | } |
@@ -303,6 +313,9 @@ discard block |
||
303 | 313 | return floatval(sys_get_param($param_name, $default)); |
304 | 314 | } |
305 | 315 | |
316 | +/** |
|
317 | + * @param string $param_name |
|
318 | + */ |
|
306 | 319 | function sys_get_param_escaped($param_name, $default = '') |
307 | 320 | { |
308 | 321 | return db_escape(sys_get_param($param_name, $default)); |
@@ -547,6 +560,9 @@ discard block |
||
547 | 560 | } |
548 | 561 | |
549 | 562 | // Generates random string of $length symbols from $allowed_chars charset |
563 | +/** |
|
564 | + * @param string $allowed_chars |
|
565 | + */ |
|
550 | 566 | function sys_random_string($length = 16, $allowed_chars = SN_SYS_SEC_CHARS_ALLOWED) { |
551 | 567 | $allowed_length = strlen($allowed_chars); |
552 | 568 | |
@@ -672,6 +688,9 @@ discard block |
||
672 | 688 | return implode(';', $fleet_string); |
673 | 689 | } |
674 | 690 | |
691 | +/** |
|
692 | + * @param string $body |
|
693 | + */ |
|
675 | 694 | function mymail($email_unsafe, $title, $body, $from = '', $html = false) { |
676 | 695 | global $config, $lang; |
677 | 696 | |
@@ -959,6 +978,9 @@ discard block |
||
959 | 978 | return serialize($nick_array); |
960 | 979 | } |
961 | 980 | |
981 | +/** |
|
982 | + * @param string $nick_string |
|
983 | + */ |
|
962 | 984 | function player_nick_uncompact($nick_string) { |
963 | 985 | try { |
964 | 986 | $result = unserialize($nick_string); |
@@ -1262,6 +1284,9 @@ discard block |
||
1262 | 1284 | return $ranks; |
1263 | 1285 | } |
1264 | 1286 | |
1287 | +/** |
|
1288 | + * @param boolean $planet_id |
|
1289 | + */ |
|
1265 | 1290 | function sys_player_new_adjust($user_id, $planet_id){return sn_function_call('sys_player_new_adjust', array($user_id, $planet_id, &$result));} |
1266 | 1291 | function sn_sys_player_new_adjust($user_id, $planet_id, &$result) { |
1267 | 1292 | return $result; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @param string $title |
55 | 55 | * @param string $dest |
56 | 56 | * @param int $time |
57 | - * @param bool|true $show_header |
|
57 | + * @param boolean $show_header |
|
58 | 58 | */ |
59 | 59 | function message($mes, $title = 'Error', $dest = '', $time = 5, $show_header = true) { |
60 | 60 | $template = gettemplate('message_body', true); |
@@ -217,10 +217,6 @@ discard block |
||
217 | 217 | /** |
218 | 218 | * @param template|string $page |
219 | 219 | * @param string $title |
220 | - * @param bool|true $isDisplayTopNav |
|
221 | - * @param string $metatags |
|
222 | - * @param bool|false $AdminPage |
|
223 | - * @param bool|true $isDisplayMenu |
|
224 | 220 | * |
225 | 221 | * @return mixed |
226 | 222 | */ |
@@ -235,11 +231,6 @@ discard block |
||
235 | 231 | /** |
236 | 232 | * @param template|string $page |
237 | 233 | * @param string $title |
238 | - * @param bool|true $isDisplayTopNav |
|
239 | - * @param string $metatags |
|
240 | - * @param bool|false $AdminPage |
|
241 | - * @param bool|true $isDisplayMenu |
|
242 | - * @param bool|int|string $exitStatus - Код или сообщение выхода |
|
243 | 234 | */ |
244 | 235 | function sn_display($page, $title = '') { |
245 | 236 | global $debug, $user, $planetrow, $config, $lang, $template_result, $sn_mvc, $sn_page_name; |
@@ -402,7 +393,7 @@ discard block |
||
402 | 393 | |
403 | 394 | /** |
404 | 395 | * @param $template_result |
405 | - * @param $is_login |
|
396 | + * @param boolean $is_login |
|
406 | 397 | */ |
407 | 398 | function tpl_global_header(&$template_result, $is_login) { |
408 | 399 | global $sn_mvc, $sn_page_name, $user; |
@@ -451,10 +442,10 @@ discard block |
||
451 | 442 | |
452 | 443 | /** |
453 | 444 | * @param $time |
454 | - * @param $event |
|
445 | + * @param integer $event |
|
455 | 446 | * @param $msg |
456 | - * @param $prefix |
|
457 | - * @param $is_decrease |
|
447 | + * @param string $prefix |
|
448 | + * @param boolean $is_decrease |
|
458 | 449 | * @param $fleet_flying_row |
459 | 450 | * @param $fleet_flying_sorter |
460 | 451 | * @param $fleet_flying_events |
@@ -785,7 +776,7 @@ discard block |
||
785 | 776 | * @param template $template |
786 | 777 | * @param array|bool $array |
787 | 778 | * |
788 | - * @return mixed |
|
779 | + * @return template |
|
789 | 780 | */ |
790 | 781 | function templateObjectParse($template, $array = false) { |
791 | 782 | global $user; |
@@ -809,7 +800,7 @@ discard block |
||
809 | 800 | } |
810 | 801 | |
811 | 802 | /** |
812 | - * @param template|string $template |
|
803 | + * @param template $template |
|
813 | 804 | * @param array|bool $array |
814 | 805 | * |
815 | 806 | * @return mixed |
@@ -832,7 +823,7 @@ discard block |
||
832 | 823 | } |
833 | 824 | |
834 | 825 | /** |
835 | - * @param array|string $files |
|
826 | + * @param string $files |
|
836 | 827 | * @param template|null $template |
837 | 828 | * @param string|null $template_path - path to template |
838 | 829 | * |