| @@ -127,6 +127,9 @@ discard block | ||
| 127 | 127 | return $text; | 
| 128 | 128 | } | 
| 129 | 129 | |
| 130 | + /** | |
| 131 | + * @param callable|null $handler | |
| 132 | + */ | |
| 130 | 133 | private function processHandler(ParsedShortcodeInterface $parsed, ProcessorContext $context, $handler) | 
| 131 | 134 |      { | 
| 132 | 135 | $processed = ProcessedShortcode::createFromContext(clone $context); | 
| @@ -144,6 +147,9 @@ discard block | ||
| 144 | 147 | return mb_substr($state, 0, $offset, 'utf-8').$processed->getContent().mb_substr($state, $offset + $length, mb_strlen($state, 'utf-8'), 'utf-8'); | 
| 145 | 148 | } | 
| 146 | 149 | |
| 150 | + /** | |
| 151 | + * @return string | |
| 152 | + */ | |
| 147 | 153 | private function processRecursion(ParsedShortcodeInterface $shortcode, ProcessorContext $context) | 
| 148 | 154 |      { | 
| 149 | 155 |          if ($this->autoProcessContent && null !== $shortcode->getContent()) { | 
| @@ -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); | 
| @@ -247,11 +252,18 @@ discard block | ||
| 247 | 252 | return $backtrack; | 
| 248 | 253 | } | 
| 249 | 254 | |
| 255 | + /** | |
| 256 | + * @param integer $type | |
| 257 | + */ | |
| 250 | 258 | private function lookahead($type) | 
| 251 | 259 |      { | 
| 252 | 260 | return $this->position < $this->tokensCount && $this->tokens[$this->position][0] === $type; | 
| 253 | 261 | } | 
| 254 | 262 | |
| 263 | + /** | |
| 264 | + * @param integer|null $type | |
| 265 | + * @param boolean $ws | |
| 266 | + */ | |
| 255 | 267 | private function match($type, $ws) | 
| 256 | 268 |      { | 
| 257 | 269 |          if($this->position >= $this->tokensCount) { | 
| @@ -273,6 +285,9 @@ discard block | ||
| 273 | 285 | |
| 274 | 286 | /* --- LEXER ----------------------------------------------------------- */ | 
| 275 | 287 | |
| 288 | + /** | |
| 289 | + * @param string $text | |
| 290 | + */ | |
| 276 | 291 | private function tokenize($text) | 
| 277 | 292 |      { | 
| 278 | 293 | $count = preg_match_all($this->lexerRegex, $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE); |