Completed
Push — master ( 3cf661...c0f044 )
by Jean-Christophe
03:28
created

HtmlFormInput::setPlaceholder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Ajax\semantic\html\collections\form;
4
5
use Ajax\common\html\html5\HtmlInput;
6
7 View Code Duplication
class HtmlFormInput extends HtmlFormField {
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
	use TextFieldsTrait;
9
10
	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
11
		if(!isset($placeholder))
12
			$placeholder=$label;
13
		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
14
	}
15
}