Skip to content

Commit

Permalink
Merge pull request #40693 from nextcloud/fix/dashboard-widgets-api-st…
Browse files Browse the repository at this point in the history
…able25

[stable25] Fix Dashboard IManager getWidgets return annotation
  • Loading branch information
blizzz authored Oct 9, 2023
2 parents 8fa780b + a29153a commit 0f4151c
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 @@ -127,6 +127,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 @@ -41,7 +41,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 0f4151c

Please sign in to comment.