Commit f42af951 by Johnny Theill

Fix newlines and missing parameter description

parent 63272f41
<?php <?php
namespace common\models; namespace common\models;
use yii\base\Model;
use Yii; use Yii;
use yii\base\Model;
/** /**
* Login form * Login form
...@@ -44,12 +44,13 @@ class LoginForm extends Model ...@@ -44,12 +44,13 @@ class LoginForm extends Model
/** /**
* Logs in a user using the provided username and password. * Logs in a user using the provided username and password.
*
* @return boolean whether the user is logged in successfully * @return boolean whether the user is logged in successfully
*/ */
public function login() public function login()
{ {
if ($this->validate()) { if ($this->validate()) {
return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0); return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0);
} else { } else {
return false; return false;
} }
......
...@@ -30,8 +30,8 @@ class User extends ActiveRecord implements IdentityInterface ...@@ -30,8 +30,8 @@ class User extends ActiveRecord implements IdentityInterface
/** /**
* Creates a new user * Creates a new user
* *
* @param $attributes * @param array $attributes the attributes given by field => value
* @return static|null * @return static|null the newly created model, or null on failure
*/ */
public static function create($attributes) public static function create($attributes)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment