summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-11-08 13:41:56 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2023-11-14 20:03:28 +0100
commit43a00169892944462deddda9b78ff1b6d517b065 (patch)
tree437364f964e330dc3bcb5ef05ea3299245f77f75
parent5c041122e847c02c60cb6bca480038a2a50f3331 (diff)
downloadnextcloud-server-43a00169892944462deddda9b78ff1b6d517b065.tar.gz
nextcloud-server-43a00169892944462deddda9b78ff1b6d517b065.zip
fix(INavigationManager): Add psalm typing for `add` parameter
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--lib/public/INavigationManager.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/public/INavigationManager.php b/lib/public/INavigationManager.php
index 710cbd1248d..36f80c3293f 100644
--- a/lib/public/INavigationManager.php
+++ b/lib/public/INavigationManager.php
@@ -33,6 +33,10 @@
namespace OCP;
/**
+ * @psalm-type NavigationEntry = array{id: string, order: int, href: string, name: string, app?: string, icon?: string, classes?: string, type?: string}
+ */
+
+/**
* Manages the ownCloud navigation
* @since 6.0.0
*/
@@ -58,9 +62,11 @@ interface INavigationManager {
/**
* Creates a new navigation entry
*
- * @param array|\Closure $entry Array containing: id, name, order, icon and href key
+ * @param array array|\Closure $entry Array containing: id, name, order, icon and href key
+ * If a menu entry (type = 'link') is added, you shall also set app to the app that added the entry.
* The use of a closure is preferred, because it will avoid
* loading the routing of your app, unless required.
+ * @psalm-param NavigationEntry|callable():NavigationEntry $entry
* @return void
* @since 6.0.0
*/