diff options
Diffstat (limited to 'lib/private/Dashboard')
-rw-r--r-- | lib/private/Dashboard/Manager.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/private/Dashboard/Manager.php b/lib/private/Dashboard/Manager.php index 18a66499167..25a2df5d9da 100644 --- a/lib/private/Dashboard/Manager.php +++ b/lib/private/Dashboard/Manager.php @@ -33,15 +33,15 @@ use OCP\Dashboard\IManager; use OCP\Dashboard\IWidget; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; -use Throwable; use Psr\Log\LoggerInterface; +use Throwable; 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; @@ -115,7 +115,7 @@ class Manager implements IManager { $endTime = microtime(true); $duration = $endTime - $startTime; if ($duration > 1) { - \OC::$server->get(LoggerInterface::class)->error( + \OC::$server->get(LoggerInterface::class)->info( 'Dashboard widget {widget} took {duration} seconds to load.', [ 'widget' => $widget->getId(), @@ -134,6 +134,9 @@ class Manager implements IManager { $this->lazyWidgets = []; } + /** + * @return array<string, IWidget> + */ public function getWidgets(): array { $this->loadLazyPanels(); return $this->widgets; |