method parseDocblock documentation in bbn\Parsers\Doc

Parses a given docblock

function(string $block) { $b = [ 'description' => '', 'tags' => [] ]; // Remove start pattern //$block = trim(substr($block, 3)); // Remove end pattern $block = trim(substr($block, 0, strlen($block) - 2)); // Tags $tags = $this->getTags($block); foreach ($tags as $i => $tag) { if ( (isset($tags[$i + 1]) && ($t = $this->parseTag(substr($block, $tag[1], $tags[$i + 1][1] - $tag[1])))) || ($t = $this->parseTag(substr($block, $tag[1]))) ) { if (!empty($t['tag']) && ($t['tag'] === 'ignore')) { return null; } $b['tags'][] = $t; } } // Get Description $b['description'] = $this->clearText(isset($tags[0]) ? substr($block, 3, $tags[0][1] - 1) : substr($block, 3)); return $b; }

Parses a given docblock BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.