N°4482 - Small refacto

- SCSS partial rule should target only the concerned elements
- Improve PHPDoc
This commit is contained in:
Molkobain
2022-02-02 16:47:15 +01:00
parent 6a4ce3c3b1
commit 7bb7445c91
7 changed files with 43 additions and 33 deletions

View File

@@ -19,10 +19,10 @@ trait tInputLabel
/** @var string|null Label to display with the input (null for no label) */
protected $sLabel = null;
/**
* @var string $sDescription for tooltip
* @var string|null $sDescription for tooltip
* @since 3.0.1
*/
protected $sDescription;
protected $sDescription = null;
/**
* @return bool
@@ -88,29 +88,35 @@ trait tInputLabel
*/
public function HasLabel(): bool
{
return $this->sLabel != null;
return strlen($this->sLabel) > 0;
}
/**
* @return mixed
* @return string|null
* @since 3.0.1
*/
public function GetDescription()
public function GetDescription(): ?string
{
return $this->sDescription;
}
/**
* @param mixed $sDescription
* @param string|null $sDescription
* @return $this
* @since 3.0.1
*/
public function SetDescription($sDescription)
public function SetDescription(?string $sDescription)
{
$this->sDescription = $sDescription;
return $this;
}
/**
* @return bool
* @since 3.0.1
*/
public function HasDescription(): bool
{
return $this->sDescription != null;
return strlen($this->sDescription) > 0;
}
}