]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix Dashboard IManager getWidgets return annotation 40694/head
authorjld3103 <jld3103yt@gmail.com>
Tue, 19 Sep 2023 15:14:02 +0000 (17:14 +0200)
committerjld3103 <jld3103yt@gmail.com>
Fri, 29 Sep 2023 07:01:21 +0000 (09:01 +0200)
Signed-off-by: jld3103 <jld3103yt@gmail.com>
lib/private/Dashboard/Manager.php
lib/public/Dashboard/IManager.php

index 18a66499167e07b15145423631cb8ca7e98b32ac..afe28872e694639c6285ee728281f2379fd88d70 100644 (file)
@@ -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;
@@ -134,6 +134,9 @@ class Manager implements IManager {
                $this->lazyWidgets = [];
        }
 
+       /**
+        * @return array<string, IWidget>
+        */
        public function getWidgets(): array {
                $this->loadLazyPanels();
                return $this->widgets;
index 77bff7b34ff6d80cfcaf2445f0f8c63d4dc373bf..135fd4b4514bdc8a50199c75882ffc7af4f15067 100644 (file)
@@ -40,7 +40,7 @@ interface IManager {
        /**
         * @since 20.0.0
         *
-        * @return IWidget[]
+        * @return array<string, IWidget>
         */
        public function getWidgets(): array;
 }