Skip to content

[TASK] Avoid Hungarian notation in a class #704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/Comment/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,54 @@ class Comment implements Renderable
/**
* @var int
*/
protected $iLineNo;
protected $lineNumber;

/**
* @var string
*/
protected $sComment;
protected $commentText;

/**
* @param string $sComment
* @param int $iLineNo
* @param string $commentText
* @param int $lineNumber
*/
public function __construct($sComment = '', $iLineNo = 0)
public function __construct($commentText = '', $lineNumber = 0)
{
$this->sComment = $sComment;
$this->iLineNo = $iLineNo;
$this->commentText = $commentText;
$this->lineNumber = $lineNumber;
}

/**
* @return string
*/
public function getComment()
{
return $this->sComment;
return $this->commentText;
}

/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
return $this->lineNumber;
}

/**
* @param string $sComment
* @param string $commentText
*/
public function setComment($sComment): void
public function setComment($commentText): void
{
$this->sComment = $sComment;
$this->commentText = $commentText;
}

public function __toString(): string
{
return $this->render(new OutputFormat());
}

public function render(OutputFormat $oOutputFormat): string
public function render(OutputFormat $outputFormat): string
{
return '/*' . $this->sComment . '*/';
return '/*' . $this->commentText . '*/';
}
}