mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #45455 from nextcloud/fix/psalm/navigation-entries
This commit is contained in:
commit
88fe7348ed
4 changed files with 14 additions and 16 deletions
|
|
@ -26,11 +26,13 @@ namespace OCA\Core;
|
|||
*
|
||||
* @psalm-type CoreNavigationEntry = array{
|
||||
* id: string,
|
||||
* order: int|string,
|
||||
* order?: int,
|
||||
* href: string,
|
||||
* icon: string,
|
||||
* type: string,
|
||||
* name: string,
|
||||
* app?: string,
|
||||
* default?: bool,
|
||||
* active: bool,
|
||||
* classes: string,
|
||||
* unread: int,
|
||||
|
|
|
|||
|
|
@ -218,7 +218,6 @@
|
|||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"order",
|
||||
"href",
|
||||
"icon",
|
||||
"type",
|
||||
|
|
@ -232,15 +231,8 @@
|
|||
"type": "string"
|
||||
},
|
||||
"order": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"href": {
|
||||
"type": "string"
|
||||
|
|
@ -254,6 +246,12 @@
|
|||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"app": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class NavigationManager implements INavigationManager {
|
|||
// This is the default app that will always be shown first
|
||||
$entry['default'] = ($entry['app'] ?? false) === $this->defaultApp;
|
||||
// Set order from user defined app order
|
||||
$entry['order'] = $this->customAppOrder[$id]['order'] ?? $entry['order'] ?? 100;
|
||||
$entry['order'] = (int)($this->customAppOrder[$id]['order'] ?? $entry['order'] ?? 100);
|
||||
}
|
||||
|
||||
$this->entries[$id] = $entry;
|
||||
|
|
|
|||
|
|
@ -10,13 +10,11 @@
|
|||
|
||||
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
|
||||
*
|
||||
* @psalm-type NavigationEntry = array{id: string, order: int, href: string, name: string, app?: string, icon?: string, classes?: string, type?: string}
|
||||
*/
|
||||
interface INavigationManager {
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue