@@ -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); |
@@ -57,6 +57,11 @@ discard block |
||
57 | 57 | return $shortcodes; |
58 | 58 | } |
59 | 59 | |
60 | + /** |
|
61 | + * @param string|null $bbCode |
|
62 | + * @param null|string $content |
|
63 | + * @param string $text |
|
64 | + */ |
|
60 | 65 | private function getObject($name, $parameters, $bbCode, $offset, $content, $text) |
61 | 66 | { |
62 | 67 | return new ParsedShortcode(new Shortcode($name, $parameters, $content, $bbCode), $text, $offset); |
@@ -272,6 +277,9 @@ discard block |
||
272 | 277 | return true; |
273 | 278 | } |
274 | 279 | |
280 | + /** |
|
281 | + * @param \Closure $callbacks |
|
282 | + */ |
|
275 | 283 | private function match($type, $callbacks = null, $ws = false) |
276 | 284 | { |
277 | 285 | if($this->position >= $this->tokensCount) { |
@@ -299,6 +307,9 @@ discard block |
||
299 | 307 | |
300 | 308 | /* --- LEXER ----------------------------------------------------------- */ |
301 | 309 | |
310 | + /** |
|
311 | + * @param string $text |
|
312 | + */ |
|
302 | 313 | private function tokenize($text) |
303 | 314 | { |
304 | 315 | preg_match_all($this->lexerRegex, $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE); |
@@ -121,6 +121,9 @@ |
||
121 | 121 | $context->textContent = $shortcode->getContent(); |
122 | 122 | } |
123 | 123 | |
124 | + /** |
|
125 | + * @param callable|null $handler |
|
126 | + */ |
|
124 | 127 | private function processHandler(ParsedShortcodeInterface $parsed, ProcessorContext $context, $handler) |
125 | 128 | { |
126 | 129 | $processed = ProcessedShortcode::createFromContext(clone $context); |
@@ -25,6 +25,9 @@ |
||
25 | 25 | return $this->replacement; |
26 | 26 | } |
27 | 27 | |
28 | + /** |
|
29 | + * @return string |
|
30 | + */ |
|
28 | 31 | public function getText() |
29 | 32 | { |
30 | 33 | return $this->text; |