style(cs): run php-cs-fixer after nc/coding-standard update

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2024-10-21 09:16:35 +02:00
parent 932389bda9
commit 6db1e91d6c
14 changed files with 46 additions and 18 deletions

View File

@ -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 {

View File

@ -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;

View File

@ -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);
}

View File

@ -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();
}

View File

@ -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);
}

View File

@ -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 {

View File

@ -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 {

View File

@ -22,7 +22,7 @@ class LoginFlowService {
public function __construct(
protected IRequest $request,
protected ISession $session,
protected LoginFlowV2Service $loginFlowV2Service
protected LoginFlowV2Service $loginFlowV2Service,
) {
}

View File

@ -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());
}
}
}

View File

@ -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);
}

View File

@ -55,7 +55,7 @@ class RegistrationService {
private LoggerInterface $logger,
private ISession $session,
private IProvider $tokenProvider,
private ICrypto $crypto
private ICrypto $crypto,
) {
}

View File

@ -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 {

View File

@ -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,
) {
}
/**

View File

@ -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';