Completed
Push — master ( 0ba4b1...2affe6 )
by Jean-Christophe
03:09
created
Ajax/semantic/html/collections/HtmlMenu.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public function addItem($item){
46 46
 		$item=parent::addItem($item);
47
-		if(!$item instanceof HtmlMenu)
48
-			$item->addToPropertyCtrl("class", "item",array("item"));
49
-		else{
47
+		if(!$item instanceof HtmlMenu) {
48
+					$item->addToPropertyCtrl("class", "item",array("item"));
49
+		} else{
50 50
 			$this->setSecondary();
51 51
 		}
52 52
 	}
@@ -81,8 +81,9 @@  discard block
 block discarded – undo
81 81
 
82 82
 	public function asTab($vertical=false){
83 83
 		$this->apply(function(HtmlDoubleElement &$item){$item->setTagName("a");});
84
-		if($vertical===true)
85
-			$this->setVertical();
84
+		if($vertical===true) {
85
+					$this->setVertical();
86
+		}
86 87
 		return $this->addToProperty("class", "tabular");
87 88
 	}
88 89
 
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlDropdown.php 1 patch
Braces   +22 added lines, -16 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		$itemO=$item;
36 36
 		if(\is_object($item)===false){
37 37
 			$itemO=new HtmlDropdownItem("dd-item-".$this->identifier."-".\sizeof($this->items),$item,$value,$image);
38
-		}elseif($itemO instanceof HtmlDropdownItem){
38
+		} elseif($itemO instanceof HtmlDropdownItem){
39 39
 			$this->addToProperty("class", "vertical");
40 40
 		}
41 41
 		$this->items[]=$itemO;
@@ -43,8 +43,9 @@  discard block
 block discarded – undo
43 43
 	}
44 44
 
45 45
 	public function addInput($name){
46
-		if(!isset($name))
47
-			$name="input-".$this->identifier;
46
+		if(!isset($name)) {
47
+					$name="input-".$this->identifier;
48
+		}
48 49
 		$this->setAction("activate");
49 50
 		$this->input=new HtmlInput($name,"hidden");
50 51
 	}
@@ -54,7 +55,7 @@  discard block
 block discarded – undo
54 55
 			foreach ($items as $k=>$v){
55 56
 				$this->addItem($v)->setData($k);
56 57
 			}
57
-		}else{
58
+		} else{
58 59
 			foreach ($items as $item){
59 60
 				$this->addItem($item);
60 61
 			}
@@ -68,7 +69,7 @@  discard block
 block discarded – undo
68 69
 		if($dropdown===false){
69 70
 			$this->_template=include dirname(__FILE__).'/../templates/tplDropdownMenu.php';
70 71
 			$dropdown="menu";
71
-		}else{
72
+		} else{
72 73
 			$dropdown="dropdown";
73 74
 			$this->mClass="menu";
74 75
 		}
@@ -84,18 +85,22 @@  discard block
 block discarded – undo
84 85
 	}
85 86
 
86 87
 	public function asButton($floating=false){
87
-		if($floating)
88
-			$this->addToProperty("class", "floating");
88
+		if($floating) {
89
+					$this->addToProperty("class", "floating");
90
+		}
89 91
 		return $this->addToProperty("class", "button");
90 92
 	}
91 93
 
92 94
 	public function asSelect($name=NULL,$multiple=false,$selection=true){
93
-		if(isset($name))
94
-			$this->addInput($name);
95
-		if($multiple)
96
-			$this->addToProperty("class", "multiple");
97
-		if ($selection)
98
-			$this->addToPropertyCtrl("class", "selection",array("selection"));
95
+		if(isset($name)) {
96
+					$this->addInput($name);
97
+		}
98
+		if($multiple) {
99
+					$this->addToProperty("class", "multiple");
100
+		}
101
+		if ($selection) {
102
+					$this->addToPropertyCtrl("class", "selection",array("selection"));
103
+		}
99 104
 		return $this;
100 105
 	}
101 106
 
@@ -105,8 +110,9 @@  discard block
 block discarded – undo
105 110
 	}
106 111
 
107 112
 	public function setSelect($name=NULL,$multiple=false){
108
-		if(!isset($name))
109
-			$name="select-".$this->identifier;
113
+		if(!isset($name)) {
114
+					$name="select-".$this->identifier;
115
+		}
110 116
 		$this->input=null;
111 117
 		if($multiple){
112 118
 			$this->setProperty("multiple", true);
@@ -137,7 +143,7 @@  discard block
 block discarded – undo
137 143
 	public function setValue($value){
138 144
 		if(isset($this->input)){
139 145
 			$this->input->setProperty("value", $value);
140
-		}else{
146
+		} else{
141 147
 			$this->setProperty("value", $value);
142 148
 		}
143 149
 		return $this;
Please login to merge, or discard this patch.
Ajax/common/html/HtmlCollection.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 			foreach ($items as $k=>$v){
18 18
 				$this->addItem([$k,$v]);
19 19
 			}
20
-		}else{
20
+		} else{
21 21
 			foreach ($items as $item){
22 22
 				$this->addItem($item);
23 23
 			}
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 	 * @return \Ajax\common\html\HtmlDoubleElement
54 54
 	 */
55 55
 	public function getItem($index) {
56
-		if (is_int($index))
57
-			return $this->content[$index];
58
-		else {
56
+		if (is_int($index)) {
57
+					return $this->content[$index];
58
+		} else {
59 59
 			$elm=$this->getElementById($index, $this->content);
60 60
 			return $elm;
61 61
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlHeader.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
 		if(isset($type)){
16 16
 			if($type=="page"){
17 17
 				$this->asPageHeader($niveau);
18
-			}else
19
-				$this->asContentHeader($niveau);
18
+			} else {
19
+							$this->asContentHeader($niveau);
20
+			}
20 21
 		}
21 22
 		$this->content=$content;
22 23
 	}
@@ -48,7 +49,7 @@  discard block
 block discarded – undo
48 49
 		if(!\is_object($title)){
49 50
 			$this->content=new HtmlDoubleElement("content-".$this->identifier,"div");
50 51
 			$this->content->setContent($title);
51
-		}else{
52
+		} else{
52 53
 			$this->content=$title;
53 54
 		}
54 55
 		$this->content->setClass("content");
Please login to merge, or discard this patch.
Ajax/common/BaseEnum.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	public static function getConstantValues($postFix=""){
27
-		if($postFix!=="")
28
-			return \array_values(self::getConstants());
29
-		else{
27
+		if($postFix!=="") {
28
+					return \array_values(self::getConstants());
29
+		} else{
30 30
 			return \array_map(function ($elem) use ($postFix) {return $elem." ".$postFix;},\array_values(self::getConstants()));
31 31
 		}
32 32
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlImage.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@
 block discarded – undo
19 19
 	}
20 20
 
21 21
 	public function asAvatar($caption=NULL){
22
-		if(isset($caption))
23
-			$this->wrap("",$caption);
22
+		if(isset($caption)) {
23
+					$this->wrap("",$caption);
24
+		}
24 25
 		return $this->addToProperty("class", "avatar");
25 26
 	}
26 27
 }
27 28
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlInput.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@
 block discarded – undo
11 11
 		parent::__construct($identifier, "input");
12 12
 		$this->setProperty("name", $identifier);
13 13
 		$this->setProperty("value", $value);
14
-		if(JString::isNotNull($placeholder))
15
-			$this->setProperty("placeholder", $placeholder);
14
+		if(JString::isNotNull($placeholder)) {
15
+					$this->setProperty("placeholder", $placeholder);
16
+		}
16 17
 		$this->setProperty("type", $type);
17 18
 	}
18 19
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlInput.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
30 30
 			$this->addContent($iconO,false);
31 31
 			$this->_hasIcon=true;
32
-		}else{
32
+		} else{
33 33
 			$iconO=$this->getIcon();
34 34
 			$iconO->setIcon($icon);
35 35
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
@@ -40,8 +40,9 @@  discard block
 block discarded – undo
40 40
 	public function getIcon(){
41 41
 		if(\is_array($this->content)){
42 42
 			foreach ($this->content as $item){
43
-				if($item instanceof HtmlIcon)
44
-					return $item;
43
+				if($item instanceof HtmlIcon) {
44
+									return $item;
45
+				}
45 46
 			}
46 47
 		}
47 48
 	}
@@ -57,9 +58,10 @@  discard block
 block discarded – undo
57 58
 		$labelO=$label;
58 59
 		if(\is_object($label)===false){
59 60
 			$labelO=new HtmlLabel("label-".$this->identifier,$label);
60
-			if(isset($icon))
61
-				$labelO->addIcon($icon);
62
-		}else{
61
+			if(isset($icon)) {
62
+							$labelO->addIcon($icon);
63
+			}
64
+		} else{
63 65
 			$labelO->addToPropertyCtrl("class", "label", array("label"));
64 66
 		}
65 67
 		$this->addToProperty("class", $direction." labeled");
@@ -75,8 +77,9 @@  discard block
 block discarded – undo
75 77
 		$actionO=$action;
76 78
 		if(\is_object($action)===false){
77 79
 			$actionO=new HtmlButton("action-".$this->identifier,$action);
78
-			if(isset($icon))
79
-				$actionO->addIcon($icon,true,$labeled);
80
+			if(isset($icon)) {
81
+							$actionO->addIcon($icon,true,$labeled);
82
+			}
80 83
 		}
81 84
 		$this->addToProperty("class", $direction." action");
82 85
 		$this->addContent($actionO,\strstr($direction,Direction::LEFT)!==false);
Please login to merge, or discard this patch.