-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
38 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Nextcloud DokuWiki -- Embed DokuWiki into NextCloud with SSO. | ||
* | ||
* @author Claus-Justus Heine <[email protected]> | ||
* @copyright 2020, 2021, 2023 Claus-Justus Heine | ||
* @copyright 2020-2024 Claus-Justus Heine | ||
* @license AGPL-3.0-or-later | ||
* | ||
* Nextcloud DokuWiki is free software: you can redistribute it and/or | ||
|
@@ -37,26 +37,15 @@ class AuthenticationController extends Controller | |
{ | ||
use \OCA\DokuWiki\Toolkit\Traits\LoggerTrait; | ||
|
||
/** @var Authenticator */ | ||
private $authenticator; | ||
|
||
/** @var string */ | ||
private $userId; | ||
|
||
// phpcs:disable Squiz.Commenting.FunctionComment.Missing | ||
public function __construct( | ||
string $appName, | ||
IRequest $request, | ||
?string $userId, | ||
Authenticator $authenticator, | ||
ILogger $logger, | ||
IL10N $l10n, | ||
private ?string $userId, | ||
private Authenticator $authenticator, | ||
protected ILogger $logger, | ||
) { | ||
parent::__construct($appName, $request); | ||
$this->userId = $userId; | ||
$this->authenticator = $authenticator; | ||
$this->logger = $logger; | ||
$this->l = $l10n; | ||
} | ||
// phpcs:enable Squiz.Commenting.FunctionComment.Missing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Nextcloud DokuWiki -- Embed DokuWiki into NextCloud with SSO. | ||
* | ||
* @author Claus-Justus Heine <[email protected]> | ||
* @copyright 2020, 2021, 2023 Claus-Justus Heine | ||
* @copyright 2020-2024 Claus-Justus Heine | ||
* @license AGPL-3.0-or-later | ||
* | ||
* Nextcloud DokuWiki is free software: you can redistribute it and/or | ||
|
@@ -49,42 +49,19 @@ class PageController extends Controller | |
const TEMPLATE = 'doku-wiki'; | ||
const ASSET = 'app'; | ||
|
||
/** @var Authenticator */ | ||
private $authenticator; | ||
|
||
/** @var AssetService */ | ||
private $assetService; | ||
|
||
/** @var IConfig */ | ||
private $config; | ||
|
||
/** @var IURLGenerator */ | ||
private $urlGenerator; | ||
|
||
/** @var IInitialState */ | ||
private $initialState; | ||
|
||
// phpcs:disable Squiz.Commenting.FunctionComment.Missing | ||
public function __construct( | ||
string $appName, | ||
IRequest $request, | ||
Authenticator $authenticator, | ||
AssetService $assetService, | ||
IConfig $config, | ||
IURLGenerator $urlGenerator, | ||
IInitialState $initialState, | ||
ILogger $logger, | ||
IL10N $l10n, | ||
private Authenticator $authenticator, | ||
private AssetService $assetService, | ||
private IConfig $config, | ||
private IURLGenerator $urlGenerator, | ||
private IInitialState $initialState, | ||
protected ILogger $logger, | ||
) { | ||
parent::__construct($appName, $request); | ||
$this->authenticator = $authenticator; | ||
$this->authenticator->errorReporting(Authenticator::ON_ERROR_THROW); | ||
$this->assetService = $assetService; | ||
$this->config = $config; | ||
$this->urlGenerator = $urlGenerator; | ||
$this->initialState = $initialState; | ||
$this->logger = $logger; | ||
$this->l = $l10n; | ||
} | ||
// phpcs:enable Squiz.Commenting.FunctionComment.Missing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Nextcloud DokuWiki -- Embed DokuWiki into NextCloud with SSO. | ||
* | ||
* @author Claus-Justus Heine <[email protected]> | ||
* @copyright 2020, 2021, 2022, 2023 Claus-Justus Heine | ||
* @copyright 2020-2024 Claus-Justus Heine | ||
* @license AGPL-3.0-or-later | ||
* | ||
* Nextcloud DokuWiki is free software: you can redistribute it and/or | ||
|
@@ -71,26 +71,16 @@ class SettingsController extends Controller | |
], | ||
]; | ||
|
||
/** @var IConfig */ | ||
private $config; | ||
|
||
/** @var IURLGenerator */ | ||
private $urlGenerator; | ||
|
||
// phpcs:ignore Squiz.Commenting.FunctionComment.Missing | ||
public function __construct( | ||
string $appName, | ||
IRequest $request, | ||
LoggerInterface $logger, | ||
IURLGenerator $urlGenerator, | ||
IL10N $l10n, | ||
IConfig $config, | ||
protected LoggerInterface $logger, | ||
private IURLGenerator $urlGenerator, | ||
protected IL10N $l, | ||
private IConfig $config, | ||
) { | ||
parent::__construct($appName, $request); | ||
$this->logger = $logger; | ||
$this->urlGenerator = $urlGenerator; | ||
$this->l = $l10n; | ||
$this->config = $config; | ||
} | ||
// phpcs:enable | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Nextcloud DokuWiki -- Embed DokuWiki into NextCloud with SSO. | ||
* | ||
* @author Claus-Justus Heine <[email protected]> | ||
* @copyright 2020, 2021, 2022, 2023, 2023 Claus-Justus Heine | ||
* @copyright 2020-2024 Claus-Justus Heine | ||
* @license AGPL-3.0-or-later | ||
* | ||
* Nextcloud DokuWiki is free software: you can redistribute it and/or | ||
|
@@ -43,13 +43,9 @@ class UserLoggedOutEventListener implements IEventListener | |
|
||
const EVENT = HandledEvent::class; | ||
|
||
/** @var IAppContainer */ | ||
private $appContainer; | ||
|
||
// phpcs:disable Squiz.Commenting.FunctionComment.Missing | ||
public function __construct(IAppContainer $appContainer) | ||
public function __construct(private IAppContainer $appContainer) | ||
{ | ||
$this->appContainer = $appContainer; | ||
} | ||
// phpcs:enable Squiz.Commenting.FunctionComment.Missing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @author Claus-Justus Heine <[email protected]> | ||
* @copyright 2021, 2022, 2023 Claus-Justus Heine | ||
* @copyright 2021-2024 Claus-Justus Heine | ||
* @license AGPL-3.0-or-later | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
|
@@ -41,8 +41,10 @@ class AssetService | |
const CSS = Constants::CSS; | ||
|
||
// phpcs:disable Squiz.Commenting.FunctionComment.Missing | ||
public function __construct(IL10N $l10n, LoggerInterface $logger) | ||
{ | ||
public function __construct( | ||
protected IL10N $l10n, | ||
protected LoggerInterface $logger, | ||
) { | ||
$this->logger = $logger; | ||
$this->l = $l10n; | ||
$this->initializeAssets(__DIR__); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Nextcloud DokuWiki -- Embed DokuWiki into NextCloud with SSO. | ||
* | ||
* @author Claus-Justus Heine <[email protected]> | ||
* @copyright 2020, 2021, 2022, 2023 Claus-Justus Heine | ||
* @copyright 2020-2024 Claus-Justus Heine | ||
* @license AGPL-3.0-or-later | ||
* | ||
* Nextcloud DokuWiki is free software: you can redistribute it and/or | ||
|
@@ -65,18 +65,6 @@ class AuthDokuWiki | |
/** @var string */ | ||
private $appName; | ||
|
||
/** @var IConfig */ | ||
private $config; | ||
|
||
/** @var IRequest */ | ||
private $request; | ||
|
||
/** @var \OCP\IURLGeneator */ | ||
private $urlGenerator; | ||
|
||
/** @var \OCP\Authentication\LoginCredentials\IStore */ | ||
private $credentialsStore; | ||
|
||
private $dwProto = null; | ||
private $dwHost = null; | ||
private $dwPort = null; | ||
|
@@ -103,20 +91,13 @@ class AuthDokuWiki | |
// phpcs:disable Squiz.Commenting.FunctionComment.Missing | ||
public function __construct( | ||
Application $app, | ||
IConfig $config, | ||
IRequest $request, | ||
ICredentialsStore $credentialsStore, | ||
IURLGenerator $urlGenerator, | ||
ILogger $logger, | ||
IL10N $l10n, | ||
private IConfig $config, | ||
private IRequest $request, | ||
private ICredentialsStore $credentialsStore, | ||
private IURLGenerator $urlGenerator, | ||
protected ILogger $logger, | ||
) { | ||
$this->appName = $app->getAppName(); | ||
$this->config = $config; | ||
$this->request = $request; | ||
$this->credentialsStore = $credentialsStore; | ||
$this->urlGenerator = $urlGenerator; | ||
$this->logger = $logger; | ||
$this->l = $l10n; | ||
|
||
$this->errorReporting = self::ON_ERROR_RETURN; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Nextcloud DokuWiki -- Embed DokuWiki into NextCloud with SSO. | ||
* | ||
* @author Claus-Justus Heine <[email protected]> | ||
* @copyright 2020, 2021, 2022, 2023 Claus-Justus Heine | ||
* @copyright 2020-2024 Claus-Justus Heine | ||
* @license AGPL-3.0-or-later | ||
* | ||
* Nextcloud DokuWiki is free software: you can redistribute it and/or | ||
|
@@ -37,21 +37,12 @@ class Admin implements IDelegatedSettings | |
const TEMPLATE = 'admin-settings'; | ||
const ASSET_NAME = 'admin-settings'; | ||
|
||
/** @var IConfig */ | ||
private $config; | ||
|
||
/** @var AssetService */ | ||
private $assetService; | ||
|
||
// phpcs:disable Squiz.Commenting.FunctionComment.Missing | ||
public function __construct( | ||
string $appName, | ||
IConfig $config, | ||
AssetService $assetService, | ||
private string $appName, | ||
private IConfig $config, | ||
private AssetService $assetService, | ||
) { | ||
$this->appName = $appName; | ||
$this->config = $config; | ||
$this->assetService = $assetService; | ||
} | ||
// phpcs:enable Squiz.Commenting.FunctionComment.Missing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Nextcloud DokuWiki -- Embed DokuWiki into NextCloud with SSO. | ||
* | ||
* @author Claus-Justus Heine <[email protected]> | ||
* @copyright 2020, 2021, 2023 Claus-Justus Heine | ||
* @copyright 2020, 2021, 2023, 2024 Claus-Justus Heine | ||
* @license AGPL-3.0-or-later | ||
* | ||
* Nextcloud DokuWiki is free software: you can redistribute it and/or | ||
|
@@ -30,24 +30,12 @@ | |
/** Admin settings section. */ | ||
class AdminSection implements IIconSection | ||
{ | ||
/** @var string */ | ||
private $appName; | ||
|
||
/** @var \OCP\IURLGenerator */ | ||
private $urlGenerator; | ||
|
||
/** @var \OCP\IL10N */ | ||
private $l; | ||
|
||
// phpcs:disable Squiz.Commenting.FunctionComment.Missing | ||
public function __construct( | ||
string $appName, | ||
IURLGenerator $urlGenerator, | ||
IL10N $l10n, | ||
private string $appName, | ||
private IURLGenerator $urlGenerator, | ||
private IL10N $l, | ||
) { | ||
$this->appName = $appName; | ||
$this->urlGenerator = $urlGenerator; | ||
$this->l = $l10n; | ||
} | ||
// phpcs:enable Squiz.Commenting.FunctionComment.Missing | ||
|
||
|