Completed
Push — master ( 9de830...b49918 )
by Jean-Christophe
03:44
created
Ajax/semantic/html/collections/form/HtmlFormInput.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 
8 8
 class HtmlFormInput extends HtmlFormField {
9 9
 
10
-	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
11
-		if(!isset($placeholder))
10
+	public function __construct($identifier, $label=NULL, $type="text", $value=NULL, $placeholder=NULL) {
11
+		if (!isset($placeholder))
12 12
 			$placeholder=$label;
13
-		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
13
+		parent::__construct("field-".$identifier, new HtmlInput($identifier, $type, $value, $placeholder), $label);
14 14
 	}
15 15
 }
16 16
\ 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
@@ -8,8 +8,9 @@
 block discarded – undo
8 8
 class HtmlFormInput extends HtmlFormField {
9 9
 
10 10
 	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
11
-		if(!isset($placeholder))
12
-			$placeholder=$label;
11
+		if(!isset($placeholder)) {
12
+					$placeholder=$label;
13
+		}
13 14
 		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
14 15
 	}
15 16
 }
16 17
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormCheckbox.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 
7 7
 class HtmlFormCheckbox extends HtmlFormInput {
8 8
 
9
-	public function __construct($identifier, $label=NULL,$value=NULL) {
9
+	public function __construct($identifier, $label=NULL, $value=NULL) {
10 10
 		parent::__construct($identifier, $label, "checkbox", $value=NULL);
11
-		if(isset($label)){
11
+		if (isset($label)) {
12 12
 			$this->swapLabel();
13 13
 			$label=$this->getLabel();
14 14
 			$label->setClass="hidden";
15
-			$label->setProperty("tabindex",0);
15
+			$label->setProperty("tabindex", 0);
16 16
 		}
17 17
 		$this->setClass("ui checkbox");
18
-		$this->wrap("<div class='field'>","</div>");
18
+		$this->wrap("<div class='field'>", "</div>");
19 19
 	}
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlForm.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemCollection;
6 6
 use Ajax\service\JArray;
7 7
 
8
-class HtmlForm extends HtmlSemCollection{
8
+class HtmlForm extends HtmlSemCollection {
9 9
 
10 10
 
11
-	public function __construct( $identifier, $elements=array()){
12
-		parent::__construct( $identifier, "form", "ui form");
11
+	public function __construct($identifier, $elements=array()) {
12
+		parent::__construct($identifier, "form", "ui form");
13 13
 		$this->setProperty("name", $this->identifier);
14 14
 		$this->addItems($elements);
15 15
 	}
16 16
 
17 17
 
18
-	protected function createItem($value){
19
-		if(\is_array($value)){
20
-			$itemO=new HtmlFormInput(JArray::getDefaultValue($value, "id",""),JArray::getDefaultValue($value, "label",null),JArray::getDefaultValue($value, "type", "text"),JArray::getDefaultValue($value, "value",""),JArray::getDefaultValue($value, "placeholder",JArray::getDefaultValue($value, "label",null)));
18
+	protected function createItem($value) {
19
+		if (\is_array($value)) {
20
+			$itemO=new HtmlFormInput(JArray::getDefaultValue($value, "id", ""), JArray::getDefaultValue($value, "label", null), JArray::getDefaultValue($value, "type", "text"), JArray::getDefaultValue($value, "value", ""), JArray::getDefaultValue($value, "placeholder", JArray::getDefaultValue($value, "label", null)));
21 21
 			return $itemO;
22 22
 		}else
23 23
 		return new HtmlFormInput($value);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@
 block discarded – undo
19 19
 		if(\is_array($value)){
20 20
 			$itemO=new HtmlFormInput(JArray::getDefaultValue($value, "id",""),JArray::getDefaultValue($value, "label",null),JArray::getDefaultValue($value, "type", "text"),JArray::getDefaultValue($value, "value",""),JArray::getDefaultValue($value, "placeholder",JArray::getDefaultValue($value, "label",null)));
21 21
 			return $itemO;
22
-		}else
23
-		return new HtmlFormInput($value);
22
+		} else {
23
+				return new HtmlFormInput($value);
24
+		}
24 25
 	}
25 26
 
26 27
 }
27 28
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlLabeledIconMenu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
  * @author jc
13 13
  * @version 1.001
14 14
  */
15
-class HtmlLabeledIconMenu extends HtmlMenu{
15
+class HtmlLabeledIconMenu extends HtmlMenu {
16 16
 
17 17
 
18 18
 	/**
19 19
 	 * @param string $identifier
20 20
 	 * @param array $items icons
21 21
 	 */
22
-	public function __construct( $identifier, $items=array()){
23
-		parent::__construct( $identifier, $items);
22
+	public function __construct($identifier, $items=array()) {
23
+		parent::__construct($identifier, $items);
24 24
 		$this->addToProperty("class", "labeled icon");
25 25
 	}
26 26
 
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 	protected function createItem($value) {
32 32
 		$text="";
33 33
 		$v=$value;
34
-		if(\is_array($value)){
34
+		if (\is_array($value)) {
35 35
 			$v=@$value[0];
36 36
 			$text=@$value[1];
37 37
 		}
38 38
 		$count=\sizeof($this->content);
39 39
 		$value=new HtmlIcon("icon-".$count, $v);
40
-		$value->wrap("",$text);
41
-		$itemO=new HtmlLink("item-".$count,"",$value);
40
+		$value->wrap("", $text);
41
+		$itemO=new HtmlLink("item-".$count, "", $value);
42 42
 		return $itemO->setClass("item");
43 43
 	}
44 44
 }
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlIconMenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
  * @author jc
13 13
  * @version 1.001
14 14
  */
15
-class HtmlIconMenu extends HtmlMenu{
15
+class HtmlIconMenu extends HtmlMenu {
16 16
 
17 17
 
18 18
 	/**
19 19
 	 * @param string $identifier
20 20
 	 * @param array $items icons
21 21
 	 */
22
-	public function __construct( $identifier, $items=array()){
23
-		parent::__construct( $identifier, $items);
22
+	public function __construct($identifier, $items=array()) {
23
+		parent::__construct($identifier, $items);
24 24
 		$this->addToProperty("class", "icon");
25 25
 	}
26 26
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	protected function createItem($value) {
33 33
 		$count=\sizeof($this->content);
34 34
 		$value=new HtmlIcon("icon-".$count, $value);
35
-		$itemO=new HtmlLink("item-".$count,"",$value);
35
+		$itemO=new HtmlLink("item-".$count, "", $value);
36 36
 		return $itemO->setClass("item");
37 37
 	}
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
  * @author jc
10 10
  * @version 1.001
11 11
  */
12
-abstract class HtmlSemCollection extends HtmlCollection{
12
+abstract class HtmlSemCollection extends HtmlCollection {
13 13
 	use BaseTrait;
14
-	public function __construct( $identifier, $tagName="div",$baseClass="ui"){
15
-		parent::__construct( $identifier, $tagName);
14
+	public function __construct($identifier, $tagName="div", $baseClass="ui") {
15
+		parent::__construct($identifier, $tagName);
16 16
 		$this->_baseClass=$baseClass;
17 17
 		$this->setClass($baseClass);
18 18
 	}
Please login to merge, or discard this patch.