Remove unused cruft from PHPdoc comment.

@param string $comment PHPdoc comment.
@return string
494346
private static function remove_decorations( $comment ) {
		$comment = preg_replace( '|^/\*\*[\r\n]+|', '', $comment );
		$comment = preg_replace( '|\n[\t ]*\*/$|', '', $comment );
		$comment = preg_replace( '|^[\t ]*\* ?|m', '', $comment );

		return $comment;
	}
557968
public function remove(Comment $comment)
    {
        $comment->delete();

        Alert::info(__('Comment was removed'));

        return redirect()->route('platform.systems.comments');
    }
701587
public static function ltrim ( $docComment ) {
        $regexp = array(
                        '|^[\s\t]*(/\*\*)|um' => '\\1',
                        '|^[\s\t]*([ ]\*/)|um' => '\\1',
                        '|^[\s\t]*([ ]\*[ ]*)|um' => '\\1',
                       );
        $patterns = array_keys($regexp);
        $replacements = array_values($regexp);
        $docComment = preg_replace($patterns, $replacements, $docComment);
        $docComment = trim($docComment);
        return $docComment;
    }
620907
public function removeComment(Comment $comment)
    {
        if ($this->comments->contains($comment)) {
            $this->comments->removeElement($comment);
        }
    }
397490
public static function create($comment) {
    $comment = trim($comment);
    $nl_count = substr_count($comment, "\n");
    if ($nl_count > 1) {
      return LineCommentBlockNode::create($comment);
    }
    else {
      return new CommentNode(T_COMMENT, '// ' . $comment . "\n");
    }
  }
1279462
public function addComment($comment)
    {
        $comment->setPaymentId($this->getPaymentId());
        $comment->save();

        $this->load($this->getPaymentId());

        return $comment;
    }
761941
def _strip_comments(line):
        
        if line == '':
            return line
        r = re.search('(?P<line>[^#]*)(#(?P<comment>.*))?', line)
        if r:
            line = r.group('line')
            if not line.endswith('\n'):
                line += '\n'
            return line
        return '\n'
102838
public function transformRaw($comment)
    {
        $comment = preg_replace('/[\/\*]/', '', $comment);
        $chunks  = array_map('trim', explode(PHP_EOL, $comment));

        return implode(PHP_EOL, array_filter($chunks));
    }
282478
public function addComment(string $comment) : bool
    {
        if (is_string($comment)) {
            $this->comments[] = $comment;
        }

        return true;
    }
1148236
public static function tagList(string $comment)
    {
        $comment = "@Description \n" . strtr(trim(preg_replace('/^\s*\**( |\t)?/m', '', trim($comment, '/'))), "\r", '');
        $parts   = preg_split('/^\s*@/m', $comment, -1, PREG_SPLIT_NO_EMPTY);

        $tags = [];
        foreach ($parts as $part) {
            $isMatch = preg_match('/^(\w+)(.*)/ms', trim($part), $matches);
            if ($isMatch == false) {
                continue;
            }
            $name = $matches[1];
            if (!isset($tags[$name])) {
                $tags[$name] = trim($matches[2]);
                continue;
            }
            if (is_array($tags[$name])) {
                $tags[$name][] = trim($matches[2]);
                continue;
            }
            $tags[$name] = [$tags[$name], trim($matches[2])];
        }

        return $tags;
    }
177962
public function removeComment(\Haven\CmsBundle\Entity\Comment $comment)
    {
        $this->comments->removeElement($comment);
    }
1208842
protected function appendComment($comment)
    {
        $comment[1] = substr(preg_replace(['/^\s+/m', '/^(.)/m'], ['', ' \1'], $comment[1]), 1);

        $this->env->comments[] = $comment;
    }
381917
public function writeComment(string $comment): XmlStreamWriter
    {
        return $this->append(
                function(\DOMNode $parent) use ($comment)
                {
                    $parent->appendChild(
                            $this->doc->createComment($this->encode($comment))
                    );
                },
                'comment'
        );
    }
1074698
public function comment( $comment = '#' )
    {
        foreach( $this->lines as &$line ) {
            $line = $comment . $line;
        }
        return $this;
    }
621626
public static function parseDocCommentTags($comment)
    {
        $comment = "@description \n" . strtr(trim(preg_replace('/^\s*\**( |\t)?/m', '', trim($comment, '/'))), "\r", '');
        $parts = preg_split('/^\s*@/m', $comment, -1, PREG_SPLIT_NO_EMPTY);
        $tags = [];
        foreach ($parts as $part) {
            if (preg_match('/^(\w+)(.*)/ms', trim($part), $matches)) {
                $name = $matches[1];
                if (!isset($tags[$name])) {
                    $tags[$name] = trim($matches[2]);
                } elseif (is_array($tags[$name])) {
                    $tags[$name][] = trim($matches[2]);
                } else {
                    $tags[$name] = [$tags[$name], trim($matches[2])];
                }
            }
        }
        return $tags;
    }
1255204
public function removeComment(Comment $comment)
    {
        if ($this->comments->contains($comment)) {
            $this->comments->removeElement($comment);
            $comment->setTask(null);
        }

        return $this;
    }
377698
public function getCommentAuthorLink(Comment $comment)
    {
        if (!$user = $comment->getUser()) {
            if ((!$authorUrl = $comment->getAuthorUrl()) || !preg_match('/^http(s)?:\/\/.+$/', $authorUrl)) {
                return $comment->getAuthor();
            }

            return sprintf('<a href="%s" rel="nofollow" target="_new">%s</a>', $authorUrl, $comment->getAuthor());
        }

        if ((!$userUrl = $user->getUrl()) || !preg_match('/^http(s)?:\/\/.+$/', $userUrl)) {
            return $user->getDisplayName();
        }

        return sprintf('<a href="%s" rel="nofollow" target="_new">%s</a>', $userUrl, $user->getDisplayName());
    }