Convert to short syntax (array)

This commit is contained in:
Yakir Sitbon
2013-10-18 09:48:27 +00:00
parent 153f697117
commit dfb3895457
4 changed files with 48 additions and 48 deletions

View File

@@ -19,14 +19,14 @@ class LoginForm extends Model
*/
public function rules()
{
return array(
return [
// username and password are both required
array('username, password', 'required'),
['username, password', 'required'],
// password is validated by validatePassword()
array('password', 'validatePassword'),
['password', 'validatePassword'],
// rememberMe must be a boolean value
array('rememberMe', 'boolean'),
);
['rememberMe', 'boolean'],
];
}
/**