@@ -35,6 +35,10 @@ |
||
35 | 35 | return; |
36 | 36 | } |
37 | 37 | |
38 | + /** |
|
39 | + * @param string $handle_link |
|
40 | + * @param string $handle_display |
|
41 | + */ |
|
38 | 42 | private function get_replacement_link($handle_link, $handle_display) |
39 | 43 | { |
40 | 44 | return sprintf(self::$HASH_LINK, $handle_link, $handle_display); |
@@ -37,6 +37,9 @@ discard block |
||
37 | 37 | return; |
38 | 38 | } |
39 | 39 | |
40 | + /** |
|
41 | + * @param string[] $match |
|
42 | + */ |
|
40 | 43 | private function get_display_url($match) |
41 | 44 | { |
42 | 45 | $display_url = $this->check_for_redirect($match[0]); |
@@ -67,6 +70,9 @@ discard block |
||
67 | 70 | return $link; |
68 | 71 | } |
69 | 72 | |
73 | + /** |
|
74 | + * @return string |
|
75 | + */ |
|
70 | 76 | private function check_for_redirect($url) |
71 | 77 | { |
72 | 78 | $headers = @get_headers($url); |
@@ -35,6 +35,10 @@ |
||
35 | 35 | return; |
36 | 36 | } |
37 | 37 | |
38 | + /** |
|
39 | + * @param string $handle_link |
|
40 | + * @param string $handle_display |
|
41 | + */ |
|
38 | 42 | private function get_replacement_link($handle_link, $handle_display) |
39 | 43 | { |
40 | 44 | return sprintf(self::$USER_LINK, $handle_link, $handle_display); |
@@ -36,6 +36,10 @@ discard block |
||
36 | 36 | $this->replace_element_patterns(); |
37 | 37 | } |
38 | 38 | |
39 | + /** |
|
40 | + * @param string $pattern |
|
41 | + * @param string $replace |
|
42 | + */ |
|
39 | 43 | private function process_element($pattern, $replace) |
40 | 44 | { |
41 | 45 | $match_count = preg_match_all($pattern, $this->content, $matches, PREG_SET_ORDER); |
@@ -54,11 +58,17 @@ discard block |
||
54 | 58 | } |
55 | 59 | } |
56 | 60 | |
61 | + /** |
|
62 | + * @param string|null $text |
|
63 | + */ |
|
57 | 64 | private function create_placeholder($text) |
58 | 65 | { |
59 | 66 | return md5($text . rand()); |
60 | 67 | } |
61 | 68 | |
69 | + /** |
|
70 | + * @param string|null $text |
|
71 | + */ |
|
62 | 72 | private function create_full_match_pattern($text) |
63 | 73 | { |
64 | 74 | $pattern = ''; |
@@ -75,6 +85,10 @@ discard block |
||
75 | 85 | $this->content = strip_tags($this->content); |
76 | 86 | } |
77 | 87 | |
88 | + /** |
|
89 | + * @param string $pattern |
|
90 | + * @param string $replace |
|
91 | + */ |
|
78 | 92 | private function link_unlinked_urls($pattern, $replace) |
79 | 93 | { |
80 | 94 | $match_count = preg_match_all($pattern, $this->content, $matches, PREG_SET_ORDER); |
@@ -24,6 +24,11 @@ |
||
24 | 24 | return Loader::getImagePath('photo', $path); |
25 | 25 | } |
26 | 26 | |
27 | + /** |
|
28 | + * @param string $string |
|
29 | + * @param boolean $is_absolute |
|
30 | + * @param string $size |
|
31 | + */ |
|
27 | 32 | private function get_thumb($string, $is_absolute, $size) |
28 | 33 | { |
29 | 34 | list($category, $file_name) = explode('/', $string); |
@@ -18,6 +18,9 @@ |
||
18 | 18 | return; |
19 | 19 | } |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $file_name |
|
23 | + */ |
|
21 | 24 | private function get_file_path($file_name) |
22 | 25 | { |
23 | 26 | return Loader::loadNew('utility', 'ImageOld', (array) $file_name)->getExternalLink(); |
@@ -23,6 +23,10 @@ |
||
23 | 23 | return; |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $string |
|
28 | + * @param boolean $is_absolute |
|
29 | + */ |
|
26 | 30 | private function get_link($string, $is_absolute, $anchor = '') |
27 | 31 | { |
28 | 32 | list($type, $uri) = explode('/', $string, 2); |
@@ -26,6 +26,11 @@ |
||
26 | 26 | return Loader::getImagePath('photo', $path); |
27 | 27 | } |
28 | 28 | |
29 | + /** |
|
30 | + * @param string $string |
|
31 | + * @param string $size |
|
32 | + * @param boolean $is_absolute |
|
33 | + */ |
|
29 | 34 | private function get_photo_content($string, $size, $is_absolute) |
30 | 35 | { |
31 | 36 | list($category, $file_name) = explode('/', $string); |
@@ -25,6 +25,9 @@ discard block |
||
25 | 25 | return; |
26 | 26 | } |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $content |
|
30 | + */ |
|
28 | 31 | private function wrap_in_list($content) |
29 | 32 | { |
30 | 33 | $content_array = explode("\n", $content); |
@@ -44,6 +47,9 @@ discard block |
||
44 | 47 | return $content; |
45 | 48 | } |
46 | 49 | |
50 | + /** |
|
51 | + * @param string $type |
|
52 | + */ |
|
47 | 53 | private function highlight_code($content, $type) |
48 | 54 | { |
49 | 55 | switch($type) |