aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-02-28 20:41:34 +0100
committerGitHub <noreply@github.com>2024-02-28 20:41:34 +0100
commit6cac8d0df459dc921e022b4368ee968013fddc02 (patch)
treef65d6edfbf49a4084b8631d20477b3509c89208f
parent0304330f6fd46bd48b229179b338e3a0b7eb7334 (diff)
parent1a9cab31dc52e6199e7da889b8075fe04492957f (diff)
downloadnextcloud-server-6cac8d0df459dc921e022b4368ee968013fddc02.tar.gz
nextcloud-server-6cac8d0df459dc921e022b4368ee968013fddc02.zip
Merge pull request #39244 from shdehnavi/refactor_dashboard_app
-rw-r--r--apps/dashboard/lib/Controller/DashboardApiController.php17
-rw-r--r--apps/dashboard/lib/Controller/DashboardController.php32
-rw-r--r--apps/dashboard/lib/Controller/LayoutApiController.php10
3 files changed, 11 insertions, 48 deletions
diff --git a/apps/dashboard/lib/Controller/DashboardApiController.php b/apps/dashboard/lib/Controller/DashboardApiController.php
index a28e1140fc2..329b045c461 100644
--- a/apps/dashboard/lib/Controller/DashboardApiController.php
+++ b/apps/dashboard/lib/Controller/DashboardApiController.php
@@ -54,25 +54,14 @@ use OCP\IRequest;
*/
class DashboardApiController extends OCSController {
- /** @var IManager */
- private $dashboardManager;
- /** @var IConfig */
- private $config;
- /** @var string|null */
- private $userId;
-
public function __construct(
string $appName,
IRequest $request,
- IManager $dashboardManager,
- IConfig $config,
- ?string $userId
+ private IManager $dashboardManager,
+ private IConfig $config,
+ private ?string $userId,
) {
parent::__construct($appName, $request);
-
- $this->dashboardManager = $dashboardManager;
- $this->config = $config;
- $this->userId = $userId;
}
/**
diff --git a/apps/dashboard/lib/Controller/DashboardController.php b/apps/dashboard/lib/Controller/DashboardController.php
index 1c7b98dc3ea..0b8a8cc262e 100644
--- a/apps/dashboard/lib/Controller/DashboardController.php
+++ b/apps/dashboard/lib/Controller/DashboardController.php
@@ -46,37 +46,17 @@ use OCP\IRequest;
#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
class DashboardController extends Controller {
- /** @var IInitialState */
- private $initialState;
- /** @var IEventDispatcher */
- private $eventDispatcher;
- /** @var IManager */
- private $dashboardManager;
- /** @var IConfig */
- private $config;
- /** @var IL10N */
- private $l10n;
- /** @var string */
- private $userId;
-
public function __construct(
string $appName,
IRequest $request,
- IInitialState $initialState,
- IEventDispatcher $eventDispatcher,
- IManager $dashboardManager,
- IConfig $config,
- IL10N $l10n,
- $userId
+ private IInitialState $initialState,
+ private IEventDispatcher $eventDispatcher,
+ private IManager $dashboardManager,
+ private IConfig $config,
+ private IL10N $l10n,
+ private ?string $userId
) {
parent::__construct($appName, $request);
-
- $this->initialState = $initialState;
- $this->eventDispatcher = $eventDispatcher;
- $this->dashboardManager = $dashboardManager;
- $this->config = $config;
- $this->l10n = $l10n;
- $this->userId = $userId;
}
/**
diff --git a/apps/dashboard/lib/Controller/LayoutApiController.php b/apps/dashboard/lib/Controller/LayoutApiController.php
index 8eb01be497e..e603997a854 100644
--- a/apps/dashboard/lib/Controller/LayoutApiController.php
+++ b/apps/dashboard/lib/Controller/LayoutApiController.php
@@ -31,21 +31,15 @@ use OCP\IConfig;
use OCP\IRequest;
class LayoutApiController extends OCSController {
- /** @var IConfig */
- private $config;
- /** @var string */
- private $userId;
public function __construct(
string $appName,
IRequest $request,
- IConfig $config,
- $userId
+ private IConfig $config,
+ private ?string $userId,
) {
parent::__construct($appName, $request);
- $this->config = $config;
- $this->userId = $userId;
}
/**