@@ -64,6 +64,11 @@ discard block |
||
64 | 64 | return $shortcodes; |
65 | 65 | } |
66 | 66 | |
67 | + /** |
|
68 | + * @param string|null $bbCode |
|
69 | + * @param null|string $content |
|
70 | + * @param string $text |
|
71 | + */ |
|
67 | 72 | private function getObject($name, $parameters, $bbCode, $offset, $content, $text) |
68 | 73 | { |
69 | 74 | return new ParsedShortcode(new Shortcode($name, $parameters, $content, $bbCode), $text, $offset); |
@@ -258,11 +263,18 @@ discard block |
||
258 | 263 | return $backtrack; |
259 | 264 | } |
260 | 265 | |
266 | + /** |
|
267 | + * @param integer $type |
|
268 | + */ |
|
261 | 269 | private function lookahead($type) |
262 | 270 | { |
263 | 271 | return $this->position < $this->tokensCount && (empty($type) || $this->tokens[$this->position][0] === $type); |
264 | 272 | } |
265 | 273 | |
274 | + /** |
|
275 | + * @param integer|null $type |
|
276 | + * @param \Closure $callback |
|
277 | + */ |
|
266 | 278 | private function match($type, $callback = null, $ws = false) |
267 | 279 | { |
268 | 280 | if($this->position >= $this->tokensCount) { |
@@ -287,6 +299,9 @@ discard block |
||
287 | 299 | |
288 | 300 | /* --- LEXER ----------------------------------------------------------- */ |
289 | 301 | |
302 | + /** |
|
303 | + * @param string $text |
|
304 | + */ |
|
290 | 305 | private function tokenize($text) |
291 | 306 | { |
292 | 307 | preg_match_all($this->lexerRegex, $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE); |