diff --git a/composer.lock b/composer.lock index a3fab4fd..7074e8f8 100644 --- a/composer.lock +++ b/composer.lock @@ -119,6 +119,52 @@ ], "time": "2022-12-30T00:15:36+00:00" }, + { + "name": "kubawerlos/php-cs-fixer-custom-fixers", + "version": "v3.22.0", + "source": { + "type": "git", + "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", + "reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/8701394f0c7cd450ac4fa577d24589122c1d5d5e", + "reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-tokenizer": "*", + "friendsofphp/php-cs-fixer": "^3.61.1", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.4 || ^10.5.29" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpCsFixerCustomFixers\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kuba Werłos", + "email": "werlos@gmail.com" + } + ], + "description": "A set of custom fixers for PHP CS Fixer", + "support": { + "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.22.0" + }, + "time": "2024-08-16T20:44:35+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.12.0", @@ -181,19 +227,20 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.2.3", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da" + "reference": "9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/bc9c53a5306114b60c4363057aff9c2ed10a54da", - "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d", + "reference": "9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d", "shasum": "" }, "require": { + "kubawerlos/php-cs-fixer-custom-fixers": "^3.22", "php": "^7.3|^8.0", "php-cs-fixer/shim": "^3.17" }, @@ -216,9 +263,9 @@ "description": "Nextcloud coding standards for the php cs fixer", "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.2.3" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.3.2" }, - "time": "2024-08-23T14:32:32+00:00" + "time": "2024-10-14T16:49:05+00:00" }, { "name": "nikic/php-parser", diff --git a/lib/Capabilities.php b/lib/Capabilities.php index 14d9b4ec..d7567c16 100644 --- a/lib/Capabilities.php +++ b/lib/Capabilities.php @@ -11,7 +11,9 @@ class Capabilities implements IPublicCapability { - public function __construct(private IURLGenerator $urlGenerator) { + public function __construct( + private IURLGenerator $urlGenerator, + ) { } public function getCapabilities(): array { diff --git a/lib/Controller/RegisterController.php b/lib/Controller/RegisterController.php index 48d76535..6f79a67d 100644 --- a/lib/Controller/RegisterController.php +++ b/lib/Controller/RegisterController.php @@ -58,7 +58,7 @@ public function __construct( LoginFlowService $loginFlowService, MailService $mailService, IEventDispatcher $eventDispatcher, - IInitialState $initialState + IInitialState $initialState, ) { parent::__construct($appName, $request); $this->l10n = $l10n; diff --git a/lib/Db/RegistrationMapper.php b/lib/Db/RegistrationMapper.php index ba8a85c4..c1849196 100644 --- a/lib/Db/RegistrationMapper.php +++ b/lib/Db/RegistrationMapper.php @@ -18,7 +18,10 @@ use OCP\Security\ISecureRandom; class RegistrationMapper extends QBMapper { - public function __construct(IDBConnection $db, protected ISecureRandom $random) { + public function __construct( + IDBConnection $db, + protected ISecureRandom $random, + ) { parent::__construct($db, 'registration', Registration::class); } diff --git a/lib/Events/AFormEvent.php b/lib/Events/AFormEvent.php index f2ede075..566cc74f 100644 --- a/lib/Events/AFormEvent.php +++ b/lib/Events/AFormEvent.php @@ -16,7 +16,10 @@ abstract class AFormEvent extends Event { public const STEP_VERIFICATION = 'verification'; public const STEP_USER = 'user'; - public function __construct(protected string $step, protected string $registrationId = '') { + public function __construct( + protected string $step, + protected string $registrationId = '', + ) { parent::__construct(); } diff --git a/lib/Events/PassedFormEvent.php b/lib/Events/PassedFormEvent.php index 10d02d01..67844959 100644 --- a/lib/Events/PassedFormEvent.php +++ b/lib/Events/PassedFormEvent.php @@ -13,7 +13,11 @@ class PassedFormEvent extends AFormEvent { - public function __construct(string $step, string $registrationId = '', protected ?IUser $user = null) { + public function __construct( + string $step, + string $registrationId = '', + protected ?IUser $user = null, + ) { parent::__construct($step, $registrationId); } diff --git a/lib/Listener/UserEnabledListener.php b/lib/Listener/UserEnabledListener.php index fb33f6eb..76c7b2a2 100644 --- a/lib/Listener/UserEnabledListener.php +++ b/lib/Listener/UserEnabledListener.php @@ -17,8 +17,10 @@ class UserEnabledListener implements IEventListener { - public function __construct(private IConfig $config, - private RegistrationService $registrationService) { + public function __construct( + private IConfig $config, + private RegistrationService $registrationService, + ) { } public function handle(Event $event): void { diff --git a/lib/RegistrationLoginOption.php b/lib/RegistrationLoginOption.php index 4db37b5f..6befb766 100644 --- a/lib/RegistrationLoginOption.php +++ b/lib/RegistrationLoginOption.php @@ -14,7 +14,11 @@ class RegistrationLoginOption implements IAlternativeLogin { - public function __construct(protected IURLGenerator $url, protected IL10N $l, protected \OC_Defaults $theming) { + public function __construct( + protected IURLGenerator $url, + protected IL10N $l, + protected \OC_Defaults $theming, + ) { } public function getLabel(): string { diff --git a/lib/Service/LoginFlowService.php b/lib/Service/LoginFlowService.php index f1a27f64..d144c34b 100644 --- a/lib/Service/LoginFlowService.php +++ b/lib/Service/LoginFlowService.php @@ -22,7 +22,7 @@ class LoginFlowService { public function __construct( protected IRequest $request, protected ISession $session, - protected LoginFlowV2Service $loginFlowV2Service + protected LoginFlowV2Service $loginFlowV2Service, ) { } diff --git a/lib/Service/MailService.php b/lib/Service/MailService.php index e6bc6f29..e77070cf 100644 --- a/lib/Service/MailService.php +++ b/lib/Service/MailService.php @@ -31,7 +31,8 @@ public function __construct( private IGroupManager $groupManager, private IConfig $config, private LoginFlowService $loginFlowService, - private LoggerInterface $logger) { + private LoggerInterface $logger, + ) { } /** @@ -130,7 +131,7 @@ public function notifyAdmins(string $userId, ?string $userEMailAddress, bool $us try { $this->sendNewUserNotifyEmail([$email => $adminUser->getDisplayName()], $userId, $userEMailAddress, $userIsEnabled, $language); } catch (\Exception $e) { - $this->logger->error('Sending admin notification email failed: '. $e->getMessage()); + $this->logger->error('Sending admin notification email failed: ' . $e->getMessage()); } } } diff --git a/lib/Service/RegistrationException.php b/lib/Service/RegistrationException.php index b91d773c..bf0cfd63 100644 --- a/lib/Service/RegistrationException.php +++ b/lib/Service/RegistrationException.php @@ -7,7 +7,11 @@ namespace OCA\Registration\Service; class RegistrationException extends \Exception { - public function __construct(string $message, protected string $hint = '', int $code = 400) { + public function __construct( + string $message, + protected string $hint = '', + int $code = 400, + ) { parent::__construct($message, $code); } diff --git a/lib/Service/RegistrationService.php b/lib/Service/RegistrationService.php index 6ff09ce4..7c85f25f 100644 --- a/lib/Service/RegistrationService.php +++ b/lib/Service/RegistrationService.php @@ -55,7 +55,7 @@ public function __construct( private LoggerInterface $logger, private ISession $session, private IProvider $tokenProvider, - private ICrypto $crypto + private ICrypto $crypto, ) { } diff --git a/lib/Settings/RegistrationSettings.php b/lib/Settings/RegistrationSettings.php index 3883dea3..eb15b2e0 100644 --- a/lib/Settings/RegistrationSettings.php +++ b/lib/Settings/RegistrationSettings.php @@ -19,10 +19,12 @@ class RegistrationSettings implements ISettings { - public function __construct(protected string $appName, + public function __construct( + protected string $appName, private IConfig $config, private IGroupManager $groupManager, - private IInitialState $initialState) { + private IInitialState $initialState, + ) { } public function getForm(): TemplateResponse { diff --git a/lib/Settings/RegistrationSettingsSection.php b/lib/Settings/RegistrationSettingsSection.php index 9a7b6757..4691c5aa 100644 --- a/lib/Settings/RegistrationSettingsSection.php +++ b/lib/Settings/RegistrationSettingsSection.php @@ -15,7 +15,10 @@ use OCP\Settings\IIconSection; class RegistrationSettingsSection implements IIconSection { - public function __construct(private IL10N $l10n, private IURLGenerator $urlGenerator) { + public function __construct( + private IL10N $l10n, + private IURLGenerator $urlGenerator, + ) { } /** diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 381a9285..fd555993 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -5,5 +5,5 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -require_once __DIR__.'/../../../tests/bootstrap.php'; -require_once __DIR__.'/../vendor/autoload.php'; +require_once __DIR__ . '/../../../tests/bootstrap.php'; +require_once __DIR__ . '/../vendor/autoload.php';