calendarplus
calendarplus copied to clipboard
Consequently use PHPDoc
private $userId;
private $l10n;
private $configInfo;
public function __construct($appName, IRequest $request, $userId, $l10n, IConfig $settings) {
parent::__construct($appName, $request);
$this -> userId = $userId;
$this->l10n = $l10n;
$this->configInfo = $settings;
}
vs.
/** @var string */
private $userId;
/** @var IL10N */
private $l10n;
/** @var IConfig */
private $configInfo;
/**
* @param string $appName
* @param IRequest $request
* @param string $userId
* @param IL10N $l10n
* @param IConfig $settings
*/
public function __construct($appName,
IRequest $request,
$userId,
IL10N $l10n,
IConfig $settings) {
parent::__construct($appName, $request);
$this -> userId = $userId;
$this->l10n = $l10n;
$this->configInfo = $settings;
}
Latter one allows better static analysis such as for ScrutinizerCI or a proper IDE.