mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-28 13:08:45 +02:00
N°3526 - Clean up pass on UIBlocks
- Move UIBlock::ENUM_BLOCK_FILES_TYPE_XXX to iUIBlock - Add PHPDoc - Remove Object return type hint on overloadable methods - Add scalar return type hint - Add type hint on parameters
This commit is contained in:
@@ -61,7 +61,7 @@ class NewsroomMenu extends PopoverMenu
|
||||
*
|
||||
* @return false|string
|
||||
*/
|
||||
public function GetParamsAsJson()
|
||||
public function GetParamsAsJson(): string
|
||||
{
|
||||
return json_encode($this->aParams);
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ class PopoverMenu extends UIBlock
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function HasSection(string $sId)
|
||||
public function HasSection(string $sId): bool
|
||||
{
|
||||
return array_key_exists($sId, $this->aSections);
|
||||
}
|
||||
@@ -402,7 +402,7 @@ class PopoverMenu extends UIBlock
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function GetSections()
|
||||
public function GetSections(): array
|
||||
{
|
||||
return $this->aSections;
|
||||
}
|
||||
@@ -520,7 +520,7 @@ class PopoverMenu extends UIBlock
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function GetSubBlocks()
|
||||
public function GetSubBlocks(): array
|
||||
{
|
||||
$aSubBlocks = [];
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class JsPopoverMenuItem extends PopoverMenuItem
|
||||
* @inheritDoc
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function GetJsFilesUrlRecursively(bool $bAbsoluteUrl = false)
|
||||
public function GetJsFilesUrlRecursively(bool $bAbsoluteUrl = false): array
|
||||
{
|
||||
$aJsFiles = array_merge(parent::GetJsFilesUrlRecursively($bAbsoluteUrl), $this->oPopupMenuItem->GetLinkedScripts());
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class PopoverMenuItem extends UIBlock
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function GenerateId()
|
||||
protected function GenerateId(): string
|
||||
{
|
||||
return parent::GenerateId().'--'.utils::GetSafeId($this->oPopupMenuItem->GetUID());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user