ResetPasswordFormBuilder::getEmail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Anomaly\UsersModule\User\Password;
2
3
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
4
use Illuminate\Contracts\Encryption\Encrypter;
5
6
/**
7
 * Class ResetPasswordFormBuilder
8
 *
9
 * @link          http://pyrocms.com/
10
 * @author        PyroCMS, Inc. <[email protected]>
11
 * @author        Ryan Thompson <[email protected]>
12
 */
13
class ResetPasswordFormBuilder extends FormBuilder
14
{
15
16
    /**
17
     * The reset code.
18
     *
19
     * @var null|string
20
     */
21
    protected $code = null;
22
23
    /**
24
     * The user email.
25
     *
26
     * @var null|string
27
     */
28
    protected $email = null;
29
30
    /**
31
     * No model.
32
     *
33
     * @var bool
34
     */
35
    protected $model = false;
36
37
    /**
38
     * The form actions.
39
     *
40
     * @var array
41
     */
42
    protected $actions = [
43
        'submit',
44
    ];
45
46
    /**
47
     * The form options.
48
     *
49
     * @var array
50
     */
51
    protected $options = [
52
        'redirect' => '/',
53
    ];
54
55
    /**
56
     * Get the email.
57
     *
58
     * @return null|string
59
     */
60
    public function getEmail()
61
    {
62
        return $this->getFormValue('email', $this->email);
63
    }
64
65
    /**
66
     * Set the email.
67
     *
68
     * @param $email
69
     * @return $this
70
     */
71
    public function setEmail($email)
72
    {
73
        $this->email = $email;
74
75
        return $this;
76
    }
77
78
    /**
79
     * Get the code.
80
     *
81
     * @return null|string
82
     */
83
    public function getCode()
84
    {
85
        return $this->getFormValue('code', $this->code);
86
    }
87
88
    /**
89
     * Set the code.
90
     *
91
     * @param $code
92
     * @return $this
93
     */
94
    public function setCode($code)
95
    {
96
        $this->code = $code;
97
98
        return $this;
99
    }
100
}
101