public static function create($value, $line)
    {
        $lastLine = $line + substr_count($value, "\n");

        $lines = array_map(function ($line) {
            if ('' === trim($line)) {
                return null;
            }

            $line = ltrim($line, '#*/ ');
            $line = rtrim($line, '#*/ ');

            return trim($line);
        }, explode("\n", $value));

        // Remove empty lines.
        $lines = array_filter($lines);
        $value = implode(' ', $lines);

        return new self($value, $line, $lastLine);
    }
public static function create($value, $line)
    {
        $lastLine = $line + substr_count($value, "\n");

        $lines = array_map(function ($line) {
            if ('' === trim($line)) {
                return null;
            }

            $line = ltrim($line, '#*/ ');
            $line = rtrim($line, '#*/ ');

            return trim($line);
        }, explode("\n", $value));

        // Remove empty lines.
        $lines = array_filter($lines);
        $value = implode(' ', $lines);

        return new self($value, $line, $lastLine);
    }
public static function create ( $ value , $ line ) { $ lastLine = $ line + substr_count ( $ value , "\n" ) ; $ lines = array_map ( function ( $ line ) { if ( '' === trim ( $ line ) ) { return null ; } $ line = ltrim ( $ line , '#*/ ' ) ; $ line = rtrim ( $ line , '#*/ ' ) ; return trim ( $ line ) ; } , explode ( "\n" , $ value ) ) ; // Remove empty lines. $ lines = array_filter ( $ lines ) ; $ value = implode ( ' ' , $ lines ) ; return new self ( $ value , $ line , $ lastLine ) ; }
Create new object from raw comment data.

@param string $value The PHP comment string.
@param int $line The line where the comment starts.

@return self The parsed comment.
Create new object from raw comment data .