Skip to content

Commit 16dbf99

Browse files
committed
__set_state for Comment
1 parent bbf4f8d commit 16dbf99

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Ast/Comment.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,12 @@ public function getReformattedText(): string
2525
return trim($this->text);
2626
}
2727

28+
/**
29+
* @param array<string, mixed> $properties
30+
*/
31+
public static function __set_state(array $properties): self
32+
{
33+
return new self($properties['text'], $properties['startLine'], $properties['startIndex']);
34+
}
35+
2836
}

0 commit comments

Comments
 (0)