- renamed Item::visibleActivity() to Item::isVisibleActivity() as this returns
  a boolean value
- added some type-hints
- added some documentation
This commit is contained in:
Roland Häder 2022-06-30 14:16:30 +02:00
parent e33f5612ab
commit 83cbe586ac
No known key found for this signature in database
GPG key ID: C82EDE5DDFA0BA77
9 changed files with 159 additions and 114 deletions

View file

@ -62,7 +62,7 @@ class Nav
*
* @param string $item
*/
public static function setSelected($item)
public static function setSelected(string $item)
{
self::$selected[$item] = 'selected';
}
@ -74,7 +74,7 @@ class Nav
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function build(App $a)
public static function build(App $a): string
{
// Placeholder div for popup panel
$nav = '<div id="panel" style="display: none;"></div>';
@ -106,7 +106,7 @@ class Nav
*
* @return array
*/
public static function getAppMenu()
public static function getAppMenu(): array
{
if (is_null(self::$app_menu)) {
self::populateAppMenu();
@ -117,6 +117,8 @@ class Nav
/**
* Fills the apps static variable with apps that require a menu
*
* @return void
*/
private static function populateAppMenu()
{