Close #108 phpcs fixes
This commit is contained in:
@ -139,9 +139,8 @@ class AdminController extends Controller
|
||||
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'User has been created'));
|
||||
$this->trigger(UserEvent::EVENT_AFTER_CREATE, $event);
|
||||
return $this->redirect(['update', 'id' => $user->id]);
|
||||
} else {
|
||||
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'User account could not be created.'));
|
||||
}
|
||||
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'User account could not be created.'));
|
||||
}
|
||||
|
||||
return $this->render('create', ['user' => $user]);
|
||||
|
||||
@ -121,9 +121,8 @@ class RegistrationController extends Controller
|
||||
'module' => $this->module,
|
||||
]
|
||||
);
|
||||
} else {
|
||||
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'User could not be registered.'));
|
||||
}
|
||||
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'User could not be registered.'));
|
||||
}
|
||||
return $this->render('register', ['model' => $form, 'module' => $this->module]);
|
||||
}
|
||||
|
||||
@ -120,9 +120,9 @@ class MailFactory
|
||||
* @param string $view
|
||||
* @param array $params
|
||||
*
|
||||
* @throws InvalidConfigException
|
||||
* @return MailService
|
||||
*
|
||||
* @throws InvalidConfigException
|
||||
*/
|
||||
public static function makeMailerService($type, $from, $to, $subject, $view, $params = [])
|
||||
{
|
||||
|
||||
@ -43,7 +43,6 @@ class AccessRuleFilter extends AccessRule
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
|
||||
$roleParams = $this->roleParams instanceof Closure
|
||||
? call_user_func($this->roleParams, $this)
|
||||
: $this->roleParams;
|
||||
|
||||
@ -60,10 +60,10 @@ class SettingsForm extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @throws InvalidConfigException
|
||||
* @throws \Exception
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
@ -124,9 +124,9 @@ class SettingsForm extends Model
|
||||
/**
|
||||
* Saves new account settings.
|
||||
*
|
||||
* @throws \Exception
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
|
||||
@ -18,9 +18,9 @@ class MigrationHelper
|
||||
/**
|
||||
* @param string $driverName
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* @return null|string
|
||||
*
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public static function resolveTableOptions($driverName)
|
||||
{
|
||||
@ -40,9 +40,9 @@ class MigrationHelper
|
||||
/**
|
||||
* @param $driverName
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* @return string
|
||||
*
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public static function resolveDbType($driverName)
|
||||
{
|
||||
@ -63,9 +63,9 @@ class MigrationHelper
|
||||
/**
|
||||
* @param string $driverName
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* @return bool
|
||||
*
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public static function isMicrosoftSQLServer($driverName)
|
||||
{
|
||||
|
||||
@ -32,9 +32,9 @@ class SecurityHelper
|
||||
* @param string $password
|
||||
* @param null|int $cost
|
||||
*
|
||||
* @throws Exception
|
||||
* @return string
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function generatePasswordHash($password, $cost = null)
|
||||
{
|
||||
@ -46,9 +46,9 @@ class SecurityHelper
|
||||
*
|
||||
* @param int $length
|
||||
*
|
||||
* @throws Exception
|
||||
* @return string
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function generateRandomString($length = 32)
|
||||
{
|
||||
|
||||
@ -21,9 +21,9 @@ class TimezoneHelper
|
||||
/**
|
||||
* Get all of the time zones with the offsets sorted by their offset.
|
||||
*
|
||||
* @throws InvalidParamException
|
||||
* @return array
|
||||
*
|
||||
* @throws InvalidParamException
|
||||
*/
|
||||
public static function getAll()
|
||||
{
|
||||
|
||||
@ -279,9 +279,9 @@ class User extends ActiveRecord implements IdentityInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
* @return SocialNetworkAccount[] social connected accounts [ 'providerName' => socialAccountModel ]
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getSocialNetworkAccounts()
|
||||
{
|
||||
|
||||
@ -31,13 +31,13 @@ class MailService implements ServiceInterface
|
||||
/**
|
||||
* MailService constructor.
|
||||
*
|
||||
* @param string $type the mailer type
|
||||
* @param string $from from email account
|
||||
* @param string $to to email account
|
||||
* @param string $subject the email subject
|
||||
* @param string $view the view to render mail
|
||||
* @param array $params view parameters
|
||||
* @param BaseMailer|MailerInterface $mailer mailer interface
|
||||
* @param string $type the mailer type
|
||||
* @param string $from from email account
|
||||
* @param string $to to email account
|
||||
* @param string $subject the email subject
|
||||
* @param string $view the view to render mail
|
||||
* @param array $params view parameters
|
||||
* @param BaseMailer|MailerInterface $mailer mailer interface
|
||||
*/
|
||||
public function __construct($type, $from, $to, $subject, $view, array $params, MailerInterface $mailer)
|
||||
{
|
||||
|
||||
@ -36,10 +36,10 @@ class UserCreateService implements ServiceInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @throws InvalidCallException
|
||||
* @throws \yii\db\Exception
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
@ -19,8 +19,8 @@ use Da\User\Model\User;
|
||||
use Da\User\Traits\MailAwareTrait;
|
||||
use Da\User\Traits\ModuleAwareTrait;
|
||||
use Exception;
|
||||
use yii\base\InvalidCallException;
|
||||
use Yii;
|
||||
use yii\base\InvalidCallException;
|
||||
|
||||
class UserRegisterService implements ServiceInterface
|
||||
{
|
||||
|
||||
@ -40,6 +40,7 @@ trait ContainerAwareTrait
|
||||
* @param array $params constructor parameters
|
||||
* @param array $config attributes
|
||||
*
|
||||
* @throws InvalidConfigException
|
||||
* @return object
|
||||
*/
|
||||
public function make($class, $params = [], $config = [])
|
||||
@ -48,9 +49,9 @@ trait ContainerAwareTrait
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InvalidConfigException
|
||||
* @return \Da\User\Helper\AuthHelper|object
|
||||
*
|
||||
* @throws InvalidConfigException
|
||||
*/
|
||||
public function getAuth()
|
||||
{
|
||||
@ -58,9 +59,9 @@ trait ContainerAwareTrait
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InvalidConfigException
|
||||
* @return \Da\User\Helper\ClassMapHelper|object
|
||||
*
|
||||
* @throws InvalidConfigException
|
||||
*/
|
||||
public function getClassMap()
|
||||
{
|
||||
|
||||
@ -37,9 +37,9 @@ class TwoFactorCodeValidator implements ValidatorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InvalidSecretKeyException
|
||||
* @return bool|int
|
||||
*
|
||||
* @throws InvalidSecretKeyException
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user