Completed
Pull Request — master (#40)
by
unknown
02:05
created

PasswordController   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 41
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A forgot() 0 4 1
A reset() 0 4 1
A change() 0 4 1
1
<?php namespace Anomaly\UsersModule\Http\Controller;
2
3
use Anomaly\Streams\Platform\Http\Controller\PublicController;
4
use Illuminate\Contracts\Encryption\Encrypter;
5
6
/**
7
 * Class PasswordController
8
 *
9
 * @link          http://pyrocms.com/
10
 * @author        PyroCMS, Inc. <[email protected]>
11
 * @author        Ryan Thompson <[email protected]>
12
 */
13
class PasswordController extends PublicController
14
{
15
16
    /**
17
     * Constructor
18
     */
19
    public function __construct()
20
    {
21
        $this->middleware('auth')->only('change');
22
23
        parent::__construct();
24
    }
25
26
    /**
27
     * Return a forgot password view.
28
     */
29
    public function forgot()
30
    {
31
        return $this->view->make('anomaly.module.users::password/forgot');
32
    }
33
34
    /**
35
     * Reset a user password.
36
     *
37
     * @return \Illuminate\Contracts\View\View|mixed
38
     */
39
    public function reset()
40
    {
41
        return $this->view->make('anomaly.module.users::password/reset');
42
    }
43
44
    /**
45
     * Change a logged-user password.
46
     *
47
     * @return \Illuminate\Contracts\View\View|mixed
48
     */
49
    public function change()
50
    {
51
        return $this->view->make('anomaly.module.users::password/change');
52
    }
53
}
54