Introduce type hinting in methods prototype (PHP >= 7.1)

This commit is contained in:
Molkobain
2020-08-26 21:21:56 +02:00
parent 77cd764b1c
commit 825c70c001
30 changed files with 246 additions and 191 deletions

View File

@@ -44,7 +44,7 @@ class Html extends UIBlock
* @param string $sHtml
* @param string|null $sId
*/
public function __construct($sHtml = '', $sId = null)
public function __construct(string $sHtml = '', ?string $sId = null)
{
$this->sHtml = $sHtml;
parent::__construct($sId);
@@ -67,9 +67,10 @@ class Html extends UIBlock
*
* @return $this
*/
public function SetHtml($sHtml)
public function SetHtml(string $sHtml)
{
$this->sHtml = $sHtml;
return $this;
}
}