Skip to content

Commit

Permalink
make public, change const name
Browse files Browse the repository at this point in the history
  • Loading branch information
shmax committed Sep 19, 2023
1 parent 442ea28 commit 829b5a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Ast/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ final class Attribute

public const ORIGINAL_NODE = 'originalNode';

public const COMMENT = 'comment';
public const COMMENTS = 'comments';

}
6 changes: 3 additions & 3 deletions src/Ast/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ class Comment
{

/** @var string */
protected $text;
public $text;

/** @var int */
protected $startLine;
public $startLine;

/** @var int */
protected $startIndex;
public $startIndex;

public function __construct(string $text, int $startLine = -1, int $startIndex = -1)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/TypeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function enrichWithAttributes(TokenIterator $tokens, Ast\Node $type, int
}

if ($this->useCommentsAttributes) {
$type->setAttribute(Ast\Attribute::COMMENT, $comments);
$type->setAttribute(Ast\Attribute::COMMENTS, $comments);
}

if ($this->useIndexAttributes) {
Expand Down

0 comments on commit 829b5a0

Please sign in to comment.