次のクラス スタブがあるとします。
class Gentleman {
/** @var string */
protected $guestsName;
/**
* @param string $name The name of our esteemed guest
*/
public function __construct($name) {
$this->guestsName = $name;
}
public function beCourteous() {
echo 'Salutations, dear ' . $this->guestsName;
}
}
このbeCourteous()
メソッドは、実際には入力を受け取ったり、戻り値を生成したりしません。正しい phpDoc ブロックは何ですか?
public function beCourteous() {
// No docblock
echo 'Salutations, dear ' . $this->guestsName;
}
/**
*
*/
public function beCourteous() {
// One blank line
echo 'Salutations, dear ' . $this->guestsName;
}
/**
*/
public function beCourteous() {
// No blank lines
echo 'Salutations, dear ' . $this->guestsName;
}