@@ -68,6 +68,11 @@ discard block |
||
68 | 68 | return $shortcodes; |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param string|null $bbCode |
|
73 | + * @param null|string $content |
|
74 | + * @param string $text |
|
75 | + */ |
|
71 | 76 | private function getObject($name, $parameters, $bbCode, $offset, $content, $text) |
72 | 77 | { |
73 | 78 | return new ParsedShortcode(new Shortcode($name, $parameters, $content, $bbCode), $text, $offset); |
@@ -246,6 +251,9 @@ discard block |
||
246 | 251 | return $backtrack; |
247 | 252 | } |
248 | 253 | |
254 | + /** |
|
255 | + * @param integer $type |
|
256 | + */ |
|
249 | 257 | private function lookahead($type) |
250 | 258 | { |
251 | 259 | return $this->position < $this->tokensCount && $this->tokens[$this->position][0] === $type; |
@@ -273,6 +281,10 @@ discard block |
||
273 | 281 | return true; |
274 | 282 | } |
275 | 283 | |
284 | + /** |
|
285 | + * @param integer|null $type |
|
286 | + * @param boolean $ws |
|
287 | + */ |
|
276 | 288 | private function match($type, $ws) |
277 | 289 | { |
278 | 290 | if($this->position >= $this->tokensCount) { |
@@ -294,6 +306,9 @@ discard block |
||
294 | 306 | |
295 | 307 | /* --- LEXER ----------------------------------------------------------- */ |
296 | 308 | |
309 | + /** |
|
310 | + * @param string $text |
|
311 | + */ |
|
297 | 312 | private function tokenize($text) |
298 | 313 | { |
299 | 314 | $count = preg_match_all($this->lexerRegex, $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE); |