diff --git a/CHANGELOG.md b/CHANGELOG.md index 721ad8d7..90c6d35a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Please also have a look at our - Only allow `string` for some `OutputFormat` properties (#885) - Make all non-private properties `@internal` (#886) - Use more native type declarations and strict mode - (#641, #772, #774, #778, #804, #841, #873, #875, #891, #922) + (#641, #772, #774, #778, #804, #841, #873, #875, #891, #922, #923) - Add visibility to all class/interface constants (#469) ### Deprecated diff --git a/src/Comment/Comment.php b/src/Comment/Comment.php index 7d6de3d7..9d8b5ed3 100644 --- a/src/Comment/Comment.php +++ b/src/Comment/Comment.php @@ -24,19 +24,15 @@ class Comment implements Renderable protected $commentText; /** - * @param string $commentText * @param int<0, max> $lineNumber */ - public function __construct($commentText = '', $lineNumber = 0) + public function __construct(string $commentText = '', int $lineNumber = 0) { $this->commentText = $commentText; $this->lineNumber = $lineNumber; } - /** - * @return string - */ - public function getComment() + public function getComment(): string { return $this->commentText; } @@ -49,10 +45,7 @@ public function getLineNo(): int return $this->lineNumber; } - /** - * @param string $commentText - */ - public function setComment($commentText): void + public function setComment(string $commentText): void { $this->commentText = $commentText; }