@@ -684,7 +684,7 @@ |
||
| 684 | 684 | /** |
| 685 | 685 | * Check files are writable - make them writable if necessary... |
| 686 | 686 | * |
| 687 | - * @param array $files |
|
| 687 | + * @param string[] $files |
|
| 688 | 688 | */ |
| 689 | 689 | function makeFilesWritable(&$files) |
| 690 | 690 | { |
@@ -19,6 +19,9 @@ |
||
| 19 | 19 | protected $count_mode = false; |
| 20 | 20 | protected $replaces = array(); |
| 21 | 21 | |
| 22 | + /** |
|
| 23 | + * @param Database $db |
|
| 24 | + */ |
|
| 22 | 25 | public function __construct($db, $replaces) |
| 23 | 26 | { |
| 24 | 27 | $this->db = $db; |
@@ -223,6 +223,9 @@ |
||
| 223 | 223 | return saveFileSettings($config_vars, $settingsArray); |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | +/** |
|
| 227 | + * @param string $sql_file |
|
| 228 | + */ |
|
| 226 | 229 | function parse_sqlLines($sql_file, $replaces) |
| 227 | 230 | { |
| 228 | 231 | global $incontext, $txt, $db_prefix; |
@@ -447,6 +447,9 @@ discard block |
||
| 447 | 447 | return $this->runBasicBlockGamut($text); |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | + /** |
|
| 451 | + * @param string $text |
|
| 452 | + */ |
|
| 450 | 453 | protected function runBasicBlockGamut($text) { |
| 451 | 454 | # |
| 452 | 455 | # Run block gamut tranformations, without hashing HTML blocks. This is |
@@ -934,6 +937,10 @@ discard block |
||
| 934 | 937 | |
| 935 | 938 | protected $list_level = 0; |
| 936 | 939 | |
| 940 | + /** |
|
| 941 | + * @param string $list_str |
|
| 942 | + * @param string $marker_any_re |
|
| 943 | + */ |
|
| 937 | 944 | protected function processListItems($list_str, $marker_any_re) { |
| 938 | 945 | # |
| 939 | 946 | # Process the contents of a single ordered or unordered list, splitting it |
@@ -1041,6 +1048,9 @@ discard block |
||
| 1041 | 1048 | } |
| 1042 | 1049 | |
| 1043 | 1050 | |
| 1051 | + /** |
|
| 1052 | + * @param string $code |
|
| 1053 | + */ |
|
| 1044 | 1054 | protected function makeCodeSpan($code) { |
| 1045 | 1055 | # |
| 1046 | 1056 | # Create a code span markup for $code. Called from handleSpanToken. |
@@ -1558,6 +1568,9 @@ discard block |
||
| 1558 | 1568 | # hanlde UTF-8 if the default function does not exist. |
| 1559 | 1569 | protected $utf8_strlen = 'mb_strlen'; |
| 1560 | 1570 | |
| 1571 | + /** |
|
| 1572 | + * @param string $text |
|
| 1573 | + */ |
|
| 1561 | 1574 | protected function detab($text) { |
| 1562 | 1575 | # |
| 1563 | 1576 | # Replace tabs with the appropriate amount of space. |
@@ -518,6 +518,12 @@ discard block |
||
| 518 | 518 | |
| 519 | 519 | return array($parsed, $text); |
| 520 | 520 | } |
| 521 | + |
|
| 522 | + /** |
|
| 523 | + * @param string $text |
|
| 524 | + * @param string $hash_method |
|
| 525 | + * @param boolean $md_attr |
|
| 526 | + */ |
|
| 521 | 527 | protected function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { |
| 522 | 528 | # |
| 523 | 529 | # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. |
@@ -1079,6 +1085,10 @@ discard block |
||
| 1079 | 1085 | |
| 1080 | 1086 | return $this->_doTable_callback(array($matches[0], $head, $underline, $content)); |
| 1081 | 1087 | } |
| 1088 | + |
|
| 1089 | + /** |
|
| 1090 | + * @param string $alignname |
|
| 1091 | + */ |
|
| 1082 | 1092 | protected function _doTable_makeAlignAttr($alignname) |
| 1083 | 1093 | { |
| 1084 | 1094 | if (empty($this->table_align_class_tmpl)) |
@@ -2,6 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | require_once dirname(__FILE__) . '/Michelf/Markdown.inc.php'; |
| 4 | 4 | |
| 5 | +/** |
|
| 6 | + * @param string $text |
|
| 7 | + */ |
|
| 5 | 8 | function Markdown($text) { |
| 6 | 9 | return \Michelf\Markdown::defaultTransform($text); |
| 7 | 10 | } |
| 8 | 11 | \ No newline at end of file |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | * @param integer $indent |
| 378 | 378 | * @param string $enclosing_tag_re |
| 379 | 379 | * @param boolean $span |
| 380 | - * @return array |
|
| 380 | + * @return string[] |
|
| 381 | 381 | */ |
| 382 | 382 | protected function _hashHTMLBlocks_inMarkdown($text, $indent = 0, |
| 383 | 383 | $enclosing_tag_re = '', $span = false) |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | * @param string $text |
| 591 | 591 | * @param string $hash_method |
| 592 | 592 | * @param string $md_attr |
| 593 | - * @return array |
|
| 593 | + * @return string[] |
|
| 594 | 594 | */ |
| 595 | 595 | protected function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { |
| 596 | 596 | if ($text === '') return array('', ''); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * @param int $substep |
| 21 | 21 | * @param boolean $is_test |
| 22 | 22 | * |
| 23 | - * @return boolean |
|
| 23 | + * @return boolean|null |
|
| 24 | 24 | */ |
| 25 | 25 | function protected_alter($change, $substep, $is_test = false) |
| 26 | 26 | { |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * @param string $string |
| 158 | 158 | * @param boolean $unbuffered |
| 159 | 159 | * |
| 160 | - * @return boolean|resource |
|
| 160 | + * @return resource |
|
| 161 | 161 | */ |
| 162 | 162 | function upgrade_query($string, $unbuffered = false) |
| 163 | 163 | { |
@@ -1550,6 +1550,7 @@ discard block |
||
| 1550 | 1550 | |
| 1551 | 1551 | /** |
| 1552 | 1552 | * Fixes any relative path names that may have been supplied |
| 1553 | + * @param string $path |
|
| 1553 | 1554 | */ |
| 1554 | 1555 | function fixRelativePath($path) |
| 1555 | 1556 | { |
@@ -1561,6 +1562,7 @@ discard block |
||
| 1561 | 1562 | |
| 1562 | 1563 | /** |
| 1563 | 1564 | * Used to parse our upgrade files |
| 1565 | + * @param string $filename |
|
| 1564 | 1566 | */ |
| 1565 | 1567 | function parse_sql($filename) |
| 1566 | 1568 | { |
@@ -2031,6 +2033,10 @@ discard block |
||
| 2031 | 2033 | |
| 2032 | 2034 | if (!function_exists('cache_put_data')) |
| 2033 | 2035 | { |
| 2036 | + |
|
| 2037 | + /** |
|
| 2038 | + * @param string $val |
|
| 2039 | + */ |
|
| 2034 | 2040 | function cache_put_data($val) |
| 2035 | 2041 | { |
| 2036 | 2042 | |
@@ -2108,6 +2114,10 @@ discard block |
||
| 2108 | 2114 | // MD5 Encryption. |
| 2109 | 2115 | if (!function_exists('md5_hmac')) |
| 2110 | 2116 | { |
| 2117 | + |
|
| 2118 | + /** |
|
| 2119 | + * @param string $key |
|
| 2120 | + */ |
|
| 2111 | 2121 | function md5_hmac($data, $key) |
| 2112 | 2122 | { |
| 2113 | 2123 | $key = str_pad(strlen($key) <= 64 ? $key : pack('H*', md5($key)), 64, chr(0x00)); |