Skip to content

Commit

Permalink
Refactor UserModule class.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Dec 8, 2023
1 parent 5e3dbc9 commit 18ad6e7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/UserModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
namespace Yii\User;

use Yii;
use yii\base\Module;
use yii\helpers\Url;

final class UserModule extends Module
final class UserModule
{
/**
* Flag for email change.
Expand Down Expand Up @@ -57,8 +56,6 @@ final class UserModule extends Module
public readonly string $urlConfirmation;

public function __construct(

Check failure on line 58 in src/UserModule.php

View workflow job for this annotation

GitHub Actions / phpstan / PHP 8.1-ubuntu-latest

Constructor of class Yii\User\UserModule has an unused parameter $config.

Check failure on line 58 in src/UserModule.php

View workflow job for this annotation

GitHub Actions / phpstan / PHP 8.1-ubuntu-latest

Constructor of class Yii\User\UserModule has an unused parameter $config.
$id,
Module $module,
public readonly int $autoLogin = 1209600,
public readonly bool $confirmation = false,
public readonly bool $floatLabels = true,
Expand Down Expand Up @@ -86,7 +83,5 @@ public function __construct(
);
$this->mailerWelcomeSubject = $mailerWelcomeSubject ?? Yii::t('yii.user', 'Welcome to {0}', [Yii::$app->name]);
$this->urlConfirmation = $urlConfirmation ??= Url::to('/user/confirm');

parent::__construct($id, $module, $config);
}
}

0 comments on commit 18ad6e7

Please sign in to comment.