Adding Docblocks throughout the project and lowering the missing docblock limit in phpci.yml to zero.

Closes #692
This commit is contained in:
Dan Cryer 2014-12-08 11:25:33 +00:00
commit 7f9a09fa29
83 changed files with 1283 additions and 69 deletions

View file

@ -25,6 +25,9 @@ class SessionController extends \PHPCI\Controller
*/
protected $userStore;
/**
* Initialise the controller, set up stores and services.
*/
public function init()
{
$this->response->disableLayout();
@ -92,6 +95,10 @@ class SessionController extends \PHPCI\Controller
die;
}
/**
* Allows the user to request a password reset email.
* @return string
*/
public function forgotPassword()
{
if ($this->request->getMethod() == 'POST') {
@ -135,6 +142,12 @@ MSG;
return $this->view->render();
}
/**
* Allows the user to change their password after a password reset email.
* @param $userId
* @param $key
* @return string
*/
public function resetPassword($userId, $key)
{
$user = $this->userStore->getById($userId);
@ -162,6 +175,10 @@ MSG;
return $this->view->render();
}
/**
* Get the URL the user was trying to go to prior to being asked to log in.
* @return string
*/
protected function getLoginRedirect()
{
$rtn = PHPCI_URL;