diff options
author | Joas Schilling <coding@schilljs.com> | 2023-11-23 10:22:34 +0100 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-23 10:36:13 +0100 |
commit | aa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch) | |
tree | 843203cd1346158aab3515687e37a90e78c929e9 /core/Controller | |
parent | 272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff) | |
download | nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip |
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/ClientFlowLoginController.php | 6 | ||||
-rw-r--r-- | core/Controller/LoginController.php | 10 | ||||
-rw-r--r-- | core/Controller/LostController.php | 14 | ||||
-rw-r--r-- | core/Controller/ProfileApiController.php | 2 | ||||
-rw-r--r-- | core/Controller/ProfilePageController.php | 8 | ||||
-rw-r--r-- | core/Controller/ReferenceController.php | 2 | ||||
-rw-r--r-- | core/Controller/TextProcessingApiController.php | 4 | ||||
-rw-r--r-- | core/Controller/TextToImageApiController.php | 4 | ||||
-rw-r--r-- | core/Controller/UnifiedSearchController.php | 2 |
9 files changed, 26 insertions, 26 deletions
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php index 0a073a586e4..07a78ba368b 100644 --- a/core/Controller/ClientFlowLoginController.php +++ b/core/Controller/ClientFlowLoginController.php @@ -181,8 +181,8 @@ class ClientFlowLoginController extends Controller { */ #[UseSession] public function grantPage(string $stateToken = '', - string $clientIdentifier = '', - int $direct = 0): StandaloneTemplateResponse { + string $clientIdentifier = '', + int $direct = 0): StandaloneTemplateResponse { if (!$this->isValidToken($stateToken)) { return $this->stateTokenForbiddenResponse(); } @@ -233,7 +233,7 @@ class ClientFlowLoginController extends Controller { */ #[UseSession] public function generateAppPassword(string $stateToken, - string $clientIdentifier = '') { + string $clientIdentifier = '') { if (!$this->isValidToken($stateToken)) { $this->session->remove(self::STATE_NAME); return $this->stateTokenForbiddenResponse(); diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 4f754204132..db3e8a64d64 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -272,11 +272,11 @@ class LoginController extends Controller { */ #[UseSession] public function tryLogin(Chain $loginChain, - string $user = '', - string $password = '', - string $redirect_url = null, - string $timezone = '', - string $timezone_offset = ''): RedirectResponse { + string $user = '', + string $password = '', + string $redirect_url = null, + string $timezone = '', + string $timezone_offset = ''): RedirectResponse { if (!$this->request->passesCSRFCheck()) { if ($this->userSession->isLoggedIn()) { // If the user is already logged in and the CSRF check does not pass then diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index 9a1424c4c48..56b8b8eadcb 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -37,6 +37,12 @@ namespace OC\Core\Controller; use Exception; +use OC\Authentication\TwoFactorAuth\Manager; +use OC\Core\Events\BeforePasswordResetEvent; +use OC\Core\Events\PasswordResetEvent; +use OC\Core\Exception\ResetPasswordException; +use OC\Security\RateLimiting\Exception\RateLimitExceededException; +use OC\Security\RateLimiting\Limiter; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; use OCP\AppFramework\Http\JSONResponse; @@ -54,14 +60,8 @@ use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; use OCP\Mail\IMailer; -use OCP\Security\VerificationToken\IVerificationToken; use OCP\Security\VerificationToken\InvalidTokenException; -use OC\Authentication\TwoFactorAuth\Manager; -use OC\Core\Events\BeforePasswordResetEvent; -use OC\Core\Events\PasswordResetEvent; -use OC\Core\Exception\ResetPasswordException; -use OC\Security\RateLimiting\Exception\RateLimitExceededException; -use OC\Security\RateLimiting\Limiter; +use OCP\Security\VerificationToken\IVerificationToken; use Psr\Log\LoggerInterface; use function array_filter; use function count; diff --git a/core/Controller/ProfileApiController.php b/core/Controller/ProfileApiController.php index cc91fb7d576..193102c20a7 100644 --- a/core/Controller/ProfileApiController.php +++ b/core/Controller/ProfileApiController.php @@ -28,6 +28,7 @@ declare(strict_types=1); namespace OC\Core\Controller; use OC\Core\Db\ProfileConfigMapper; +use OC\Profile\ProfileManager; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSBadRequestException; @@ -37,7 +38,6 @@ use OCP\AppFramework\OCSController; use OCP\IRequest; use OCP\IUserManager; use OCP\IUserSession; -use OC\Profile\ProfileManager; class ProfileApiController extends OCSController { public function __construct( diff --git a/core/Controller/ProfilePageController.php b/core/Controller/ProfilePageController.php index e32f54a8ff7..8ea2ad699c1 100644 --- a/core/Controller/ProfilePageController.php +++ b/core/Controller/ProfilePageController.php @@ -28,19 +28,19 @@ declare(strict_types=1); namespace OC\Core\Controller; use OC\Profile\ProfileManager; -use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; -use OCP\Profile\BeforeTemplateRenderedEvent; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\INavigationManager; use OCP\IRequest; use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; +use OCP\Profile\BeforeTemplateRenderedEvent; use OCP\Share\IManager as IShareManager; use OCP\UserStatus\IManager as IUserStatusManager; -use OCP\EventDispatcher\IEventDispatcher; -use OCP\INavigationManager; #[IgnoreOpenAPI] class ProfilePageController extends Controller { diff --git a/core/Controller/ReferenceController.php b/core/Controller/ReferenceController.php index cec2dc90cf5..8d1ff7f86d2 100644 --- a/core/Controller/ReferenceController.php +++ b/core/Controller/ReferenceController.php @@ -25,11 +25,11 @@ declare(strict_types=1); namespace OC\Core\Controller; -use OCP\Collaboration\Reference\IReferenceManager; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataDownloadResponse; use OCP\AppFramework\Http\DataResponse; +use OCP\Collaboration\Reference\IReferenceManager; use OCP\Files\AppData\IAppDataFactory; use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; diff --git a/core/Controller/TextProcessingApiController.php b/core/Controller/TextProcessingApiController.php index a6b85fd46ae..cbba7e976b0 100644 --- a/core/Controller/TextProcessingApiController.php +++ b/core/Controller/TextProcessingApiController.php @@ -38,11 +38,11 @@ use OCP\Common\Exception\NotFoundException; use OCP\DB\Exception; use OCP\IL10N; use OCP\IRequest; +use OCP\PreConditionNotMetException; use OCP\TextProcessing\Exception\TaskFailureException; +use OCP\TextProcessing\IManager; use OCP\TextProcessing\ITaskType; use OCP\TextProcessing\Task; -use OCP\TextProcessing\IManager; -use OCP\PreConditionNotMetException; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/core/Controller/TextToImageApiController.php b/core/Controller/TextToImageApiController.php index 13ce4658d59..9d97a538750 100644 --- a/core/Controller/TextToImageApiController.php +++ b/core/Controller/TextToImageApiController.php @@ -40,11 +40,11 @@ use OCP\DB\Exception; use OCP\Files\NotFoundException; use OCP\IL10N; use OCP\IRequest; +use OCP\PreConditionNotMetException; use OCP\TextToImage\Exception\TaskFailureException; use OCP\TextToImage\Exception\TaskNotFoundException; -use OCP\TextToImage\Task; use OCP\TextToImage\IManager; -use OCP\PreConditionNotMetException; +use OCP\TextToImage\Task; /** * @psalm-import-type CoreTextToImageTask from ResponseDefinitions diff --git a/core/Controller/UnifiedSearchController.php b/core/Controller/UnifiedSearchController.php index 5ae99c6a076..9754515603c 100644 --- a/core/Controller/UnifiedSearchController.php +++ b/core/Controller/UnifiedSearchController.php @@ -31,6 +31,7 @@ namespace OC\Core\Controller; use InvalidArgumentException; use OC\Search\SearchComposer; use OC\Search\SearchQuery; +use OC\Search\UnsupportedFilter; use OCA\Core\ResponseDefinitions; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; @@ -40,7 +41,6 @@ use OCP\IURLGenerator; use OCP\IUserSession; use OCP\Route\IRouter; use OCP\Search\ISearchQuery; -use OC\Search\UnsupportedFilter; use Symfony\Component\Routing\Exception\ResourceNotFoundException; /** |