Completed
Push — master ( 416cb1...222de5 )
by Anton
03:44
created

Recover::__construct()   A

Complexity

Conditions 3
Paths 1

Size

Total Lines 14
Code Lines 6

Duplication

Lines 14
Ratio 100 %
Metric Value
dl 14
loc 14
rs 9.4286
cc 3
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace Modules\Auth\Form {
4
5
	use Modules\Auth, Utils\Form, Language;
6
7 View Code Duplication
	class Recover extends Form {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
9
		# Constructor
10
11
		public function __construct() {
12
13
			parent::__construct('recover');
14
15
			# Add fields
16
17
			$this->addText('password_new', '', FORM_FIELD_PASSWORD, CONFIG_USER_PASSWORD_MAX_LENGTH,
18
19
				['placeholder' => (Auth::admin() ? Language::get('USER_FIELD_PASSWORD_NEW') : ''), 'required' => true]);
20
21
			$this->addText('password_retype', '', FORM_FIELD_PASSWORD, CONFIG_USER_PASSWORD_MAX_LENGTH,
22
23
				['placeholder' => (Auth::admin() ? Language::get('USER_FIELD_PASSWORD_RETYPE') : ''), 'required' => true]);
24
		}
25
	}
26
}
27