Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor dashboard app #39244

Merged
merged 4 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions apps/dashboard/lib/Controller/DashboardApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,14 @@
*/
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;
}

/**
Expand Down
32 changes: 6 additions & 26 deletions apps/dashboard/lib/Controller/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,37 +46,17 @@
#[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;
}

/**
Expand Down
10 changes: 2 additions & 8 deletions apps/dashboard/lib/Controller/LayoutApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,15 @@
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;
}

/**
Expand Down
Loading