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 PageContentWithSideContent extends PageContent
*
* @param string|null $sId
*/
public function __construct($sId = null)
public function __construct(?string $sId = null)
{
parent::__construct($sId);
@@ -58,9 +58,10 @@ class PageContentWithSideContent extends PageContent
*
* @return $this
*/
public function SetSideBlocks($aBlocks)
public function SetSideBlocks(array $aBlocks)
{
$this->SetContentAreaBlocks(static::ENUM_CONTENT_AREA_SIDE, $aBlocks);
return $this;
}
@@ -97,9 +98,10 @@ class PageContentWithSideContent extends PageContent
*
* @return $this
*/
public function RemoveSideBlock($sBlockId)
public function RemoveSideBlock(string $sBlockId)
{
$this->RemoveBlockFromContentArea(static::ENUM_CONTENT_AREA_SIDE, $sBlockId);
return $this;
}
}