<?php declare(strict_types = 1);
namespace PHPStan\PhpDocParser\Ast;
use function trim;
class Comment
{
public string $text;
public int $startLine;
public int $startIndex;
public function __construct(string $text, int $startLine = -1, int $startIndex = -1)
{
$this->text = $text;
$this->startLine = $startLine;
$this->startIndex = $startIndex;
}
public function getReformattedText(): string
{
return trim($this->text);
}
/**
* @param array<string, mixed> $properties
*/
public static function __set_state(array $properties): self
{
return new self($properties['text'], $properties['startLine'], $properties['startIndex']);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| ConstExpr | Folder | 0755 |
|
|
| NodeVisitor | Folder | 0755 |
|
|
| PhpDoc | Folder | 0755 |
|
|
| Type | Folder | 0755 |
|
|
| AbstractNodeVisitor.php | File | 671 B | 0644 |
|
| Attribute.php | File | 341 B | 0644 |
|
| Comment.php | File | 664 B | 0644 |
|
| Node.php | File | 348 B | 0644 |
|
| NodeAttributes.php | File | 682 B | 0644 |
|
| NodeTraverser.php | File | 8.21 KB | 0644 |
|
| NodeVisitor.php | File | 2.45 KB | 0644 |
|