1 | <?php namespace Anomaly\UsersModule\User\Reset; |
||
15 | class CompleteResetFormBuilder extends FormBuilder |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * The reset code. |
||
20 | * |
||
21 | * @var null|string |
||
22 | */ |
||
23 | protected $code = null; |
||
24 | |||
25 | /** |
||
26 | * The user email. |
||
27 | * |
||
28 | * @var null|string |
||
29 | */ |
||
30 | protected $email = null; |
||
31 | |||
32 | /** |
||
33 | * No model. |
||
34 | * |
||
35 | * @var bool |
||
36 | */ |
||
37 | protected $model = false; |
||
38 | |||
39 | /** |
||
40 | * The form actions. |
||
41 | * |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $actions = [ |
||
45 | 'submit' |
||
46 | ]; |
||
47 | |||
48 | /** |
||
49 | * Fired just before building. |
||
50 | * |
||
51 | * @param Encrypter $encrypter |
||
52 | * @param Request $request |
||
53 | */ |
||
54 | public function onReady(Encrypter $encrypter, Request $request) |
||
64 | |||
65 | /** |
||
66 | * Get the email. |
||
67 | * |
||
68 | * @return null|string |
||
69 | */ |
||
70 | public function getEmail() |
||
74 | |||
75 | /** |
||
76 | * Set the email. |
||
77 | * |
||
78 | * @param $email |
||
79 | * @return $this |
||
80 | */ |
||
81 | public function setEmail($email) |
||
87 | |||
88 | /** |
||
89 | * Get the code. |
||
90 | * |
||
91 | * @return null|string |
||
92 | */ |
||
93 | public function getCode() |
||
97 | |||
98 | /** |
||
99 | * Set the code. |
||
100 | * |
||
101 | * @param $code |
||
102 | * @return $this |
||
103 | */ |
||
104 | public function setCode($code) |
||
110 | } |
||
111 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: