Commit f42af951 by Johnny Theill

Fix newlines and missing parameter description

parent 63272f41
......@@ -72,4 +72,4 @@ class SiteController extends Controller
Yii::$app->user->logout();
return $this->goHome();
}
}
\ No newline at end of file
}
<?php
namespace common\models;
use yii\base\Model;
use Yii;
use yii\base\Model;
/**
* Login form
......@@ -44,12 +44,13 @@ class LoginForm extends Model
/**
* Logs in a user using the provided username and password.
*
* @return boolean whether the user is logged in successfully
*/
public function login()
{
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 {
return false;
}
......@@ -67,4 +68,4 @@ class LoginForm extends Model
}
return $this->_user;
}
}
\ No newline at end of file
}
......@@ -30,8 +30,8 @@ class User extends ActiveRecord implements IdentityInterface
/**
* Creates a new user
*
* @param $attributes
* @return static|null
* @param array $attributes the attributes given by field => value
* @return static|null the newly created model, or null on failure
*/
public static function create($attributes)
{
......@@ -195,4 +195,4 @@ class User extends ActiveRecord implements IdentityInterface
['email', 'unique'],
];
}
}
\ No newline at end of file
}
......@@ -153,4 +153,4 @@ class SiteController extends Controller
'model' => $model,
]);
}
}
\ No newline at end of file
}
......@@ -61,4 +61,4 @@ class ContactForm extends Model
return false;
}
}
}
\ No newline at end of file
}
......@@ -52,4 +52,4 @@ class PasswordResetRequestForm extends Model
return false;
}
}
\ No newline at end of file
}
......@@ -60,4 +60,4 @@ class ResetPasswordForm extends Model
$user->removePasswordResetToken();
return $user->save();
}
}
\ No newline at end of file
}
......@@ -46,4 +46,4 @@ class SignupForm extends Model
}
return null;
}
}
\ No newline at end of file
}
......@@ -91,4 +91,4 @@ class SiteController extends Controller
{
return $this->render('about');
}
}
\ No newline at end of file
}
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