Completed
Push — master ( 2aad8b...141d55 )
by Jean-Christophe
03:21
created
Ajax/bootstrap/html/HtmlNavbar.php 1 patch
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -86,8 +86,9 @@  discard block
 block discarded – undo
86 86
 
87 87
 	public function addElement($element, HtmlNavzone $zone=NULL) {
88 88
 		$zone=$this->getZoneToInsertIn($zone);
89
-		if ($element instanceof HtmlDropdown)
90
-			$element->setMTagName("li");
89
+		if ($element instanceof HtmlDropdown) {
90
+					$element->setMTagName("li");
91
+		}
91 92
 		$zone->addElement($element);
92 93
 	}
93 94
 
@@ -111,10 +112,11 @@  discard block
 block discarded – undo
111 112
 				if (is_string($zoneType)) {
112 113
 					$zone=$this->addZone($zoneType);
113 114
 					$zone->fromArray($zoneArray);
114
-				} else if (is_string($zoneArray))
115
-					$this->addElement($zoneArray);
116
-				else
117
-					$this->addElements($zoneArray);
115
+				} else if (is_string($zoneArray)) {
116
+									$this->addElement($zoneArray);
117
+				} else {
118
+									$this->addElements($zoneArray);
119
+				}
118 120
 			}
119 121
 		}
120 122
 	}
@@ -127,10 +129,11 @@  discard block
 block discarded – undo
127 129
 	public function getZoneToInsertIn($zone=NULL) {
128 130
 		if (!isset($zone)) {
129 131
 			$nb=sizeof($this->navZones);
130
-			if ($nb<1)
131
-				$zone=$this->addZone();
132
-			else
133
-				$zone=$this->navZones [$nb-1];
132
+			if ($nb<1) {
133
+							$zone=$this->addZone();
134
+			} else {
135
+							$zone=$this->navZones [$nb-1];
136
+			}
134 137
 		}
135 138
 		return $zone;
136 139
 	}
@@ -144,8 +147,9 @@  discard block
 block discarded – undo
144 147
 		$zone=null;
145 148
 		$nb=sizeof($this->navZones);
146 149
 		if (is_int($index)) {
147
-			if ($index<$nb)
148
-				$zone=$this->navZones [$index];
150
+			if ($index<$nb) {
151
+							$zone=$this->navZones [$index];
152
+			}
149 153
 		} else {
150 154
 			for($i=0; $i<$nb; $i++) {
151 155
 				if ($this->navZones [$i]->getIdentifier()===$index) {
@@ -182,7 +186,7 @@  discard block
 block discarded – undo
182 186
 	public function setFluid($fluid) {
183 187
 		if($fluid===true){
184 188
 			$this->fluid="container-fluid";
185
-		}else{
189
+		} else{
186 190
 			$this->fluid="container";
187 191
 		}
188 192
 		return $this;
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButtontoolbar.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	private function getLastButtonGroup() {
48 48
 		$nb=sizeof($this->elements);
49
-		if ($nb>0)
50
-			$bg=$this->elements [$nb-1];
51
-		else {
49
+		if ($nb>0) {
50
+					$bg=$this->elements [$nb-1];
51
+		} else {
52 52
 			$bg=new HtmlButtongroups($this->identifier."-buttongroups-".$nb);
53 53
 			$this->elements []=$bg;
54 54
 		}
@@ -66,8 +66,9 @@  discard block
 block discarded – undo
66 66
 	public function getLastGroup() {
67 67
 		$bg=null;
68 68
 		$nb=sizeof($this->elements);
69
-		if ($nb>0)
70
-			$bg=$this->elements [$nb-1];
69
+		if ($nb>0) {
70
+					$bg=$this->elements [$nb-1];
71
+		}
71 72
 		return $bg;
72 73
 	}
73 74
 
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButtongroups.php 1 patch
Braces   +20 added lines, -16 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	public function setStyle($value) {
48
-		foreach ( $this->elements as $element )
49
-			$element->setStyle($value);
48
+		foreach ( $this->elements as $element ) {
49
+					$element->setStyle($value);
50
+		}
50 51
 	}
51 52
 
52 53
 	private function dropdownAsButton($bt) {
@@ -71,16 +72,18 @@  discard block
 block discarded – undo
71 72
 		} elseif ($element instanceof HtmlButton) {
72 73
 			$this->elements[]=$element;
73 74
 		} elseif (is_array($element)) {
74
-			if (array_key_exists("glyph", $element))
75
-				$bt=new HtmlGlyphButton($this->identifier."-button-".$iid);
76
-			elseif (array_key_exists("btnCaption", $element)) {
77
-				if (array_key_exists("split", $element))
78
-					$bt=new HtmlSplitbutton($this->identifier."-dropdown-".$iid);
79
-				else
80
-					$bt=new HtmlDropdown($this->identifier."-dropdown-".$iid);
75
+			if (array_key_exists("glyph", $element)) {
76
+							$bt=new HtmlGlyphButton($this->identifier."-button-".$iid);
77
+			} elseif (array_key_exists("btnCaption", $element)) {
78
+				if (array_key_exists("split", $element)) {
79
+									$bt=new HtmlSplitbutton($this->identifier."-dropdown-".$iid);
80
+				} else {
81
+									$bt=new HtmlDropdown($this->identifier."-dropdown-".$iid);
82
+				}
81 83
 				$this->dropdownAsButton($bt);
82
-			} else
83
-				$bt=new HtmlButton($this->identifier."-button-".$iid);
84
+			} else {
85
+							$bt=new HtmlButton($this->identifier."-button-".$iid);
86
+			}
84 87
 			$bt->fromArray($element);
85 88
 			$this->elements[]=$bt;
86 89
 			$result=$bt;
@@ -111,8 +114,9 @@  discard block
 block discarded – undo
111 114
 	public function setAlignment($value) {
112 115
 		if (is_int($value)) {
113 116
 			$value=CssRef::alignment("btn-group")[$value];
114
-		} else
115
-			$value="btn-group-".$value;
117
+		} else {
118
+					$value="btn-group-".$value;
119
+		}
116 120
 		if (strstr($value, "justified")) {
117 121
 			foreach ( $this->elements as $element ) {
118 122
 				$element->wrap('<div class="btn-group" role="group">', '</div>');
@@ -127,9 +131,9 @@  discard block
 block discarded – undo
127 131
 	 * @return HtmlButton
128 132
 	 */
129 133
 	public function getElement($index) {
130
-		if (is_int($index))
131
-			return $this->elements[$index];
132
-		else {
134
+		if (is_int($index)) {
135
+					return $this->elements[$index];
136
+		} else {
133 137
 			$elm=$this->getElementById($index, $this->elements);
134 138
 			return $elm;
135 139
 		}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlInputgroup.php 1 patch
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -28,10 +28,11 @@  discard block
 block discarded – undo
28 28
 		$this->setProperty("aria-describedby", $id);
29 29
 		$span->setContent($text);
30 30
 		$span->setClass("input-group-addon");
31
-		if (strtolower($position)==="left")
32
-			$this->addonLeft=$span;
33
-		else
34
-			$this->addonRight=$span;
31
+		if (strtolower($position)==="left") {
32
+					$this->addonLeft=$span;
33
+		} else {
34
+					$this->addonRight=$span;
35
+		}
35 36
 		return $span;
36 37
 	}
37 38
 
@@ -74,7 +75,7 @@  discard block
 block discarded – undo
74 75
 			$bt=NULL;
75 76
 			if(is_string($item)){
76 77
 				$bt=new HtmlButton($this->identifier."-bt-".$i++,$item);
77
-			}elseif ($item instanceof HtmlButton){
78
+			} elseif ($item instanceof HtmlButton){
78 79
 				$bt=$item;
79 80
 			}
80 81
 			if(isset($bt)){
@@ -88,10 +89,11 @@  discard block
 block discarded – undo
88 89
 		$dropdown->setBtnCaption($caption);
89 90
 		$dropdown->fromArray($items);
90 91
 
91
-		if (strtolower($position)==="left")
92
-			$this->addonLeft=$dropdown;
93
-		else
94
-			$this->addonRight=$dropdown;
92
+		if (strtolower($position)==="left") {
93
+					$this->addonLeft=$dropdown;
94
+		} else {
95
+					$this->addonRight=$dropdown;
96
+		}
95 97
 		return $dropdown;
96 98
 	}
97 99
 
@@ -126,10 +128,12 @@  discard block
 block discarded – undo
126 128
 
127 129
 	public function run(JsUtils $js) {
128 130
 		parent::run($js);
129
-		if (isset($this->addonLeft))
130
-			$this->addonLeft->run($js);
131
-		if (isset($this->addonRight))
132
-			$this->addonRight->run($js);
131
+		if (isset($this->addonLeft)) {
132
+					$this->addonLeft->run($js);
133
+		}
134
+		if (isset($this->addonRight)) {
135
+					$this->addonRight->run($js);
136
+		}
133 137
 	}
134 138
 
135 139
 }
136 140
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/bootstrap/html/content/HtmlListgroupItem.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
 	 * @return \Ajax\bootstrap\html\HtmlListgroupItem default : "list-group-item-default"
41 41
 	 */
42 42
 	public function setStyle($cssStyle) {
43
-		if (!PhalconUtils::startsWith($cssStyle, "list-group-item"))
44
-			$cssStyle="list-group-item".$cssStyle;
43
+		if (!PhalconUtils::startsWith($cssStyle, "list-group-item")) {
44
+					$cssStyle="list-group-item".$cssStyle;
45
+		}
45 46
 		$this->element->addToPropertyCtrl("class", $cssStyle, CssRef::Styles("list-group-item"));
46 47
 		return $this->element;
47 48
 	}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/content/HtmlNavzone.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 		if (is_array($elements)) {
62 62
 			foreach ( $elements as $key => $element ) {
63 63
 				$iid=$this->getElementsCount()+1;
64
-				if ($element instanceof HtmlDropdownItem)
65
-					$this->elements []=$element;
66
-				else if (is_array($element)) {
64
+				if ($element instanceof HtmlDropdownItem) {
65
+									$this->elements []=$element;
66
+				} else if (is_array($element)) {
67 67
 					if (is_string($key)===true) {
68 68
 						$dropdown=new HtmlDropdown($this->identifier."-dropdown-".$iid);
69 69
 						$dropdown->addItems($element);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		$li=new HtmlBsDoubleElement($this->identifier."-li-".$iid, "li");
90 90
 		if($caption instanceof HtmlLink){
91 91
 			$link=$caption;
92
-		}else{
92
+		} else{
93 93
 			$link=new HtmlLink($this->identifier."-link-".$iid, $href, $caption);
94 94
 		}
95 95
 		$li->setContent($link);
Please login to merge, or discard this patch.
Ajax/bootstrap/html/content/HtmlTabContent.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,9 @@
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	public function getTabItem($index) {
26
-		if ($index<sizeof($this->content))
27
-			return $this->content [$index];
26
+		if ($index<sizeof($this->content)) {
27
+					return $this->content [$index];
28
+		}
28 29
 	}
29 30
 
30 31
 	public function getTabItems() {
Please login to merge, or discard this patch.
Ajax/bootstrap/html/content/HtmlGridRow.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		$result=null;
44 44
 		if($index<sizeof($this->cols)+1){
45 45
 			$result=$this->cols[$index-1];
46
-		}else if ($force){
46
+		} else if ($force){
47 47
 			$result=$this->addColAt(CssSize::SIZE_MD,1,$index);
48 48
 		}
49 49
 		return $result;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 					$this->cols = array_values($this->cols);
97 97
 					$width=$width-$widthCol;
98 98
 				}
99
-			}else{
99
+			} else{
100 100
 				$width=0;
101 101
 			}
102 102
 		}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlAccordion.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@
 block discarded – undo
69 69
 	}
70 70
 
71 71
 	public function getPanel($index) {
72
-		if ($index<sizeof($this->content))
73
-			return $this->content [$index];
72
+		if ($index<sizeof($this->content)) {
73
+					return $this->content [$index];
74
+		}
74 75
 	}
75 76
 }
76 77
\ No newline at end of file
Please login to merge, or discard this patch.