Skip to content

Commit

Permalink
Fix Dashboard IManager getWidgets return annotation
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <jld3103yt@gmail.com>
  • Loading branch information
provokateurin committed Sep 20, 2023
1 parent 09794b6 commit 80e3064
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/private/Dashboard/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Manager implements IManager {
/** @var array */
private $lazyWidgets = [];

/** @var IWidget[] */
private $widgets = [];
/** @var array<string, IWidget> */
private array $widgets = [];

private ContainerInterface $serverContainer;
private ?IAppManager $appManager = null;
Expand Down Expand Up @@ -134,6 +134,9 @@ public function loadLazyPanels(): void {
$this->lazyWidgets = [];
}

/**
* @return array<string, IWidget>
*/
public function getWidgets(): array {
$this->loadLazyPanels();
return $this->widgets;
Expand Down
2 changes: 1 addition & 1 deletion lib/public/Dashboard/IManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function lazyRegisterWidget(string $widgetClass, string $appId): void;
/**
* @since 20.0.0
*
* @return IWidget[]
* @return array<string, IWidget>
*/
public function getWidgets(): array;
}

0 comments on commit 80e3064

Please sign in to comment.