Close #108 phpcs fixes

This commit is contained in:
Antonio Ramirez
2017-11-12 22:01:28 +01:00
parent 190fafa5f1
commit c418ad967c
14 changed files with 27 additions and 29 deletions

View File

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

View File

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

View File

@ -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 = [])
{

View File

@ -43,7 +43,6 @@ class AccessRuleFilter extends AccessRule
return true;
}
} else {
$roleParams = $this->roleParams instanceof Closure
? call_user_func($this->roleParams, $this)
: $this->roleParams;

View File

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

View File

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

View File

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

View File

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

View File

@ -279,9 +279,9 @@ class User extends ActiveRecord implements IdentityInterface
}
/**
* @throws \Exception
* @return SocialNetworkAccount[] social connected accounts [ 'providerName' => socialAccountModel ]
*
* @throws \Exception
*/
public function getSocialNetworkAccounts()
{

View File

@ -36,10 +36,10 @@ class UserCreateService implements ServiceInterface
}
/**
* @return bool
*
* @throws InvalidCallException
* @throws \yii\db\Exception
* @return bool
*
*/
public function run()
{

View File

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

View File

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

View File

@ -37,9 +37,9 @@ class TwoFactorCodeValidator implements ValidatorInterface
}
/**
* @throws InvalidSecretKeyException
* @return bool|int
*
* @throws InvalidSecretKeyException
*/
public function validate()
{