@@ -64,6 +64,10 @@ discard block |
||
64 | 64 | return $shortcodes; |
65 | 65 | } |
66 | 66 | |
67 | + /** |
|
68 | + * @param string|null $bbCode |
|
69 | + * @param null|string $content |
|
70 | + */ |
|
67 | 71 | private function getObject($name, $parameters, $bbCode, $offset, $content) |
68 | 72 | { |
69 | 73 | return new ParsedShortcode(new Shortcode($name, $parameters, $content, $bbCode), $this->getBacktrack(), $offset); |
@@ -71,6 +75,9 @@ discard block |
||
71 | 75 | |
72 | 76 | /* --- RULES ----------------------------------------------------------- */ |
73 | 77 | |
78 | + /** |
|
79 | + * @param boolean $isRoot |
|
80 | + */ |
|
74 | 81 | private function shortcode($isRoot) |
75 | 82 | { |
76 | 83 | $name = null; |
@@ -243,6 +250,9 @@ discard block |
||
243 | 250 | return true; |
244 | 251 | } |
245 | 252 | |
253 | + /** |
|
254 | + * @param \Closure $callbacks |
|
255 | + */ |
|
246 | 256 | private function match($type, $callbacks = null, $ws = false) |
247 | 257 | { |
248 | 258 | if($this->isEof()) { |
@@ -270,6 +280,9 @@ discard block |
||
270 | 280 | |
271 | 281 | /* --- LEXER ----------------------------------------------------------- */ |
272 | 282 | |
283 | + /** |
|
284 | + * @param string $text |
|
285 | + */ |
|
273 | 286 | private function tokenize($text) |
274 | 287 | { |
275 | 288 | $tokens = new \SplStack(); |
@@ -49,6 +49,9 @@ |
||
49 | 49 | return $shortcodes; |
50 | 50 | } |
51 | 51 | |
52 | + /** |
|
53 | + * @param string $text |
|
54 | + */ |
|
52 | 55 | private static function parseParameters($text) |
53 | 56 | { |
54 | 57 | $text = preg_replace('/[\x{00a0}\x{200b}]+/u', ' ', $text); |