Completed
Push — master ( 012895...9e0835 )
by Jean-Christophe
03:33
created
Ajax/semantic/html/collections/form/HtmlFormCheckbox.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
  * @version 1.001
10 10
  */
11 11
 class HtmlFormCheckbox extends AbstractHtmlFormRadioCheckbox {
12
-	public function __construct($identifier, $label=NULL,$value=NULL,$type=NULL) {
13
-		parent::__construct($identifier, NULL,$label,$value,$type);
12
+	public function __construct($identifier, $label=NULL, $value=NULL, $type=NULL) {
13
+		parent::__construct($identifier, NULL, $label, $value, $type);
14 14
 		$this->_input->setClass("ui checkbox");
15
-		if(isset($type))
15
+		if (isset($type))
16 16
 			$this->setType($type);
17 17
 	}
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,8 @@
 block discarded – undo
12 12
 	public function __construct($identifier, $label=NULL,$value=NULL,$type=NULL) {
13 13
 		parent::__construct($identifier, NULL,$label,$value,$type);
14 14
 		$this->_input->setClass("ui checkbox");
15
-		if(isset($type))
16
-			$this->setType($type);
15
+		if(isset($type)) {
16
+					$this->setType($type);
17
+		}
17 18
 	}
18 19
 }
19 20
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormInput.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
 class HtmlFormInput extends HtmlFormField {
9 9
 	use TextFieldsTrait;
10 10
 
11
-	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
12
-		if(!isset($placeholder) && $type==="text")
11
+	public function __construct($identifier, $label=NULL, $type="text", $value=NULL, $placeholder=NULL) {
12
+		if (!isset($placeholder) && $type==="text")
13 13
 			$placeholder=$label;
14
-		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
14
+		parent::__construct("field-".$identifier, new HtmlInput($identifier, $type, $value, $placeholder), $label);
15 15
 	}
16 16
 
17
-	public function setReadonly(){
17
+	public function setReadonly() {
18 18
 		$this->getField()->setProperty("readonly", "");
19 19
 	}
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,9 @@
 block discarded – undo
9 9
 	use TextFieldsTrait;
10 10
 
11 11
 	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
12
-		if(!isset($placeholder) && $type==="text")
13
-			$placeholder=$label;
12
+		if(!isset($placeholder) && $type==="text") {
13
+					$placeholder=$label;
14
+		}
14 15
 		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
15 16
 	}
16 17
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/AbstractHtmlFormRadioCheckbox.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,20 +12,20 @@  discard block
 block discarded – undo
12 12
 abstract class AbstractHtmlFormRadioCheckbox extends HtmlFormField {
13 13
 	protected $_input;
14 14
 
15
-	public function __construct($identifier, $name=NULL,$label=NULL,$value=NULL,$type=NULL) {
16
-		$input=new HtmlFormInput($identifier,$label,"checkbox",$value);
15
+	public function __construct($identifier, $name=NULL, $label=NULL, $value=NULL, $type=NULL) {
16
+		$input=new HtmlFormInput($identifier, $label, "checkbox", $value);
17 17
 		parent::__construct("rField-".$identifier, $input);
18
-		if(isset($label)){
18
+		if (isset($label)) {
19 19
 			$input->swapLabel();
20 20
 			$label=$input->getLabel();
21 21
 			$label->setClass="hidden";
22
-			$label->setProperty("tabindex",0);
22
+			$label->setProperty("tabindex", 0);
23 23
 		}
24 24
 		$this->_input=$input;
25
-		$input->getField()->addToProperty("class","hidden");
25
+		$input->getField()->addToProperty("class", "hidden");
26 26
 	}
27 27
 
28
-	public function setType($checkboxType){
28
+	public function setType($checkboxType) {
29 29
 		return $this->_input->addToPropertyCtrl("class", $checkboxType, CheckboxType::getConstants());
30 30
 	}
31 31
 
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 		return $this;
39 39
 	}
40 40
 
41
-	public function setReadonly(){
42
-		$this->_input->getField()->setProperty("disabled","disabled");
43
-		return $this->_input->addToProperty("class","read-only");
41
+	public function setReadonly() {
42
+		$this->_input->getField()->setProperty("disabled", "disabled");
43
+		return $this->_input->addToProperty("class", "read-only");
44 44
 	}
45 45
 
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlPopup.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 class HtmlPopup extends HtmlSemDoubleElement {
13 13
 	private $_params;
14 14
 	private $_container;
15
-	public function __construct(BaseHtml $container,$identifier, $content="") {
15
+	public function __construct(BaseHtml $container, $identifier, $content="") {
16 16
 		parent::__construct($identifier, "div");
17 17
 		$this->_container=$container;
18 18
 		$this->setClass("ui popup");
@@ -20,21 +20,21 @@  discard block
 block discarded – undo
20 20
 		$this->_params=array("on"=>"hover");
21 21
 	}
22 22
 
23
-	public function addList($items=array(),$header=NULL){
24
-		if(!$this->content instanceof HtmlGrid){
25
-			$this->content=new HtmlGrid("Grid-".$this->identifier,0);
23
+	public function addList($items=array(), $header=NULL) {
24
+		if (!$this->content instanceof HtmlGrid) {
25
+			$this->content=new HtmlGrid("Grid-".$this->identifier, 0);
26 26
 		}
27 27
 		$grid=$this->content;
28 28
 
29 29
 		$colCount=$grid->colCount();
30 30
 		$grid->setColsCount(++$colCount);
31 31
 
32
-		$list=new HtmlList("",$items);
32
+		$list=new HtmlList("", $items);
33 33
 		$list->asLink();
34
-		if(isset($header)){
35
-			$list->addHeader(4,$header);
34
+		if (isset($header)) {
35
+			$list->addHeader(4, $header);
36 36
 		}
37
-		$grid->getCell(0,$colCount-1)->setContent($list);
37
+		$grid->getCell(0, $colCount-1)->setContent($list);
38 38
 		$grid->setDivided()->setRelaxed(true);
39 39
 		return $list;
40 40
 	}
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 	/**
43 43
 	 * A popup can have no maximum width and continue to flow to fit its content
44 44
 	 */
45
-	public function setFlowing(){
45
+	public function setFlowing() {
46 46
 		return $this->addToProperty("class", "flowing");
47 47
 	}
48 48
 
49 49
 	/**
50 50
 	 * A popup can provide more basic formatting
51 51
 	 */
52
-	public function setBasic(){
52
+	public function setBasic() {
53 53
 		return $this->addToProperty("class", "basic");
54 54
 	}
55 55
 
@@ -57,22 +57,22 @@  discard block
 block discarded – undo
57 57
 	 * {@inheritDoc}
58 58
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
59 59
 	 */
60
-	public function run(JsUtils $js){
60
+	public function run(JsUtils $js) {
61 61
 		$this->_params["popup"]="#".$this->identifier;
62
-		$js->semantic()->popup("#".$this->_container->getIdentifier(),$this->_params);
62
+		$js->semantic()->popup("#".$this->_container->getIdentifier(), $this->_params);
63 63
 	}
64 64
 
65
-	public function setOn($event="click"){
65
+	public function setOn($event="click") {
66 66
 		$this->_params["on"]=$event;
67 67
 		return $this;
68 68
 	}
69 69
 
70
-	public function setInline($value=true){
70
+	public function setInline($value=true) {
71 71
 		$this->_params["inline"]=$value;
72 72
 		return $this;
73 73
 	}
74 74
 
75
-	public function setPosition($position){
75
+	public function setPosition($position) {
76 76
 		$this->_params["position"]=$position;
77 77
 		return $this;
78 78
 	}
Please login to merge, or discard this patch.