mirror of
https://github.com/nextcloud/registration.git
synced 2025-07-20 16:53:48 +00:00
style(cs): run php-cs-fixer after nc/coding-standard update
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@ -11,7 +11,9 @@ use OCP\IURLGenerator;
|
||||
|
||||
class Capabilities implements IPublicCapability {
|
||||
|
||||
public function __construct(private IURLGenerator $urlGenerator) {
|
||||
public function __construct(
|
||||
private IURLGenerator $urlGenerator,
|
||||
) {
|
||||
}
|
||||
|
||||
public function getCapabilities(): array {
|
||||
|
@ -58,7 +58,7 @@ class RegisterController extends Controller {
|
||||
LoginFlowService $loginFlowService,
|
||||
MailService $mailService,
|
||||
IEventDispatcher $eventDispatcher,
|
||||
IInitialState $initialState
|
||||
IInitialState $initialState,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->l10n = $l10n;
|
||||
|
@ -18,7 +18,10 @@ use OCP\IDBConnection;
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,11 @@ use OCP\IUser;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,10 @@ use OCP\User\Events\UserChangedEvent;
|
||||
|
||||
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 {
|
||||
|
@ -14,7 +14,11 @@ use OCP\IURLGenerator;
|
||||
|
||||
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 {
|
||||
|
@ -22,7 +22,7 @@ class LoginFlowService {
|
||||
public function __construct(
|
||||
protected IRequest $request,
|
||||
protected ISession $session,
|
||||
protected LoginFlowV2Service $loginFlowV2Service
|
||||
protected LoginFlowV2Service $loginFlowV2Service,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,8 @@ class MailService {
|
||||
private IGroupManager $groupManager,
|
||||
private IConfig $config,
|
||||
private LoginFlowService $loginFlowService,
|
||||
private LoggerInterface $logger) {
|
||||
private LoggerInterface $logger,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,7 +131,7 @@ class MailService {
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ class RegistrationService {
|
||||
private LoggerInterface $logger,
|
||||
private ISession $session,
|
||||
private IProvider $tokenProvider,
|
||||
private ICrypto $crypto
|
||||
private ICrypto $crypto,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,12 @@ use OCP\Util;
|
||||
|
||||
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 {
|
||||
|
@ -15,7 +15,10 @@ use OCP\IURLGenerator;
|
||||
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,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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';
|
||||
|
Reference in New Issue
Block a user