Skip to content

Commit 0f4151c

Browse files
authored
Merge pull request #40693 from nextcloud/fix/dashboard-widgets-api-stable25
[stable25] Fix Dashboard IManager getWidgets return annotation
2 parents 8fa780b + a29153a commit 0f4151c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/private/Dashboard/Manager.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class Manager implements IManager {
4040
/** @var array */
4141
private $lazyWidgets = [];
4242

43-
/** @var IWidget[] */
44-
private $widgets = [];
43+
/** @var array<string, IWidget> */
44+
private array $widgets = [];
4545

4646
private ContainerInterface $serverContainer;
4747
private ?IAppManager $appManager = null;
@@ -127,6 +127,9 @@ public function loadLazyPanels(): void {
127127
$this->lazyWidgets = [];
128128
}
129129

130+
/**
131+
* @return array<string, IWidget>
132+
*/
130133
public function getWidgets(): array {
131134
$this->loadLazyPanels();
132135
return $this->widgets;

lib/public/Dashboard/IManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function lazyRegisterWidget(string $widgetClass, string $appId): void;
4141
/**
4242
* @since 20.0.0
4343
*
44-
* @return IWidget[]
44+
* @return array<string, IWidget>
4545
*/
4646
public function getWidgets(): array;
4747
}

0 commit comments

Comments
 (0)