Style fixes.
This commit is contained in:
parent
a7a59b690a
commit
8b44550f06
42 changed files with 186 additions and 148 deletions
|
|
@ -61,7 +61,7 @@ class User extends Base
|
|||
'message' => 'The username already exists.'
|
||||
]),
|
||||
'email' => new CallbackValidator([
|
||||
'callback' => function() {
|
||||
'callback' => function () {
|
||||
return $this->findFirstByEmail($this->getEmail()) === false;
|
||||
},
|
||||
'message' => 'The email address already exists.'
|
||||
|
|
@ -69,7 +69,7 @@ class User extends Base
|
|||
];
|
||||
|
||||
$validation = new Validation();
|
||||
foreach($rules as $field => $validator) {
|
||||
foreach ($rules as $field => $validator) {
|
||||
|
||||
// Only validate changed fields.
|
||||
if ($this->hasChanged($field)) {
|
||||
|
|
@ -414,7 +414,7 @@ class User extends Base
|
|||
{
|
||||
return self::findFirst([
|
||||
"(email = :v: OR username = :v:) AND status != :s:",
|
||||
"bind" => [ 'v' => $value, 's' => self::STATUS_DELETED ]
|
||||
"bind" => ['v' => $value, 's' => self::STATUS_DELETED]
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -422,7 +422,7 @@ class User extends Base
|
|||
{
|
||||
return self::findFirst([
|
||||
"email = :email: AND status != :s:",
|
||||
"bind" => [ 'email' => $email, 's' => self::STATUS_DELETED ]
|
||||
"bind" => ['email' => $email, 's' => self::STATUS_DELETED]
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -430,7 +430,7 @@ class User extends Base
|
|||
{
|
||||
return self::findFirst([
|
||||
"username = :username: AND status != :s:",
|
||||
"bind" => [ 'username' => $username, 's' => self::STATUS_DELETED ]
|
||||
"bind" => ['username' => $username, 's' => self::STATUS_DELETED]
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -440,7 +440,7 @@ class User extends Base
|
|||
|
||||
return self::findFirst([
|
||||
"{$column}_id = :id: AND status != :s:",
|
||||
"bind" => [ 'id' => $oauth->getId(), 's' => self::STATUS_DELETED ]
|
||||
"bind" => ['id' => $oauth->getId(), 's' => self::STATUS_DELETED]
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue