original_string: public function parse_docblock(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->get_tags($block);
      foreach ( $tags as $i => $tag ){
  			if (
  				(
  					isset($tags[$i+1]) &&
  					($t = $this->parse_tag(substr($block, $tag[1], $tags[$i+1][1] - $tag[1])))
          ) ||
  				($t = $this->parse_tag(substr($block, $tag[1])))
  			){
  				$b['tags'][] = $t;
  			}
      }
      // Get Description
      $b['description'] = $this->clear_text(isset($tags[0]) ? substr($block, 3, $tags[0][1]-1) : substr($block, 3));
      return $b;
    }
code: public function parse_docblock(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->get_tags($block);
      foreach ( $tags as $i => $tag ){
  			if (
  				(
  					isset($tags[$i+1]) &&
  					($t = $this->parse_tag(substr($block, $tag[1], $tags[$i+1][1] - $tag[1])))
          ) ||
  				($t = $this->parse_tag(substr($block, $tag[1])))
  			){
  				$b['tags'][] = $t;
  			}
      }
      // Get Description
      $b['description'] = $this->clear_text(isset($tags[0]) ? substr($block, 3, $tags[0][1]-1) : substr($block, 3));
      return $b;
    }
code_tokens: public function parse_docblock ( 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 -> get_tags ( $ block ) ; foreach ( $ tags as $ i => $ tag ) { if ( ( isset ( $ tags [ $ i + 1 ] ) && ( $ t = $ this -> parse_tag ( substr ( $ block , $ tag [ 1 ] , $ tags [ $ i + 1 ] [ 1 ] - $ tag [ 1 ] ) ) ) ) || ( $ t = $ this -> parse_tag ( substr ( $ block , $ tag [ 1 ] ) ) ) ) { $ b [ 'tags' ] [ ] = $ t ; } } // Get Description $ b [ 'description' ] = $ this -> clear_text ( isset ( $ tags [ 0 ] ) ? substr ( $ block , 3 , $ tags [ 0 ] [ 1 ] - 1 ) : substr ( $ block , 3 ) ) ; return $ b ; }
docstring: Parses a given docblock
  
  @param string $block The docblock
  @return array
docstring_tokens: Parses a given docblock