Completed
Push — master ( 8e32f8...32ad89 )
by Jean-Christophe
03:26
created
Ajax/bootstrap/html/HtmlListgroup.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,14 +48,16 @@
 block discarded – undo
48 48
 		foreach ( $items as $item ) {
49 49
 			if (is_string($item)) {
50 50
 				$this->addItem($item);
51
-			} else
52
-				$this->content []=$item;
51
+			} else {
52
+							$this->content []=$item;
53
+			}
53 54
 		}
54 55
 	}
55 56
 
56 57
 	public function getItem($index) {
57
-		if ($index<sizeof($this->content))
58
-			return $this->content [$index];
58
+		if ($index<sizeof($this->content)) {
59
+					return $this->content [$index];
60
+		}
59 61
 	}
60 62
 
61 63
 	/* (non-PHPdoc)
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlModal.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -151,18 +151,20 @@  discard block
 block discarded – undo
151 151
 		$this->_bsComponent=$js->bootstrap()->modal("#".$this->identifier, array (
152 152
 				"show" => $this->showOnStartup
153 153
 		));
154
-		if ($this->draggable)
155
-			$this->_bsComponent->setDraggable(true);
154
+		if ($this->draggable) {
155
+					$this->_bsComponent->setDraggable(true);
156
+		}
156 157
 		$this->_bsComponent->setBackdrop($this->backdrop);
157 158
 		$this->addEventsOnRun($js);
158 159
 		return $this->_bsComponent;
159 160
 	}
160 161
 
161 162
 	public function getButton($index) {
162
-		if (is_int($index))
163
-			return $this->buttons [$index];
164
-		else
165
-			return $this->getElementById($index, $this->buttons);
163
+		if (is_int($index)) {
164
+					return $this->buttons [$index];
165
+		} else {
166
+					return $this->getElementById($index, $this->buttons);
167
+		}
166 168
 	}
167 169
 
168 170
 	public function showOnCreate() {
@@ -188,8 +190,9 @@  discard block
 block discarded – undo
188 190
 
189 191
 	public function jsHideButton($index) {
190 192
 		$btn=$this->getButton($index);
191
-		if ($btn)
192
-			return "$('#".$btn->getIdentifier()."').hide();";
193
+		if ($btn) {
194
+					return "$('#".$btn->getIdentifier()."').hide();";
195
+		}
193 196
 	}
194 197
 
195 198
 	/**
Please login to merge, or discard this patch.
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/HtmlPanel.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,8 +89,9 @@  discard block
 block discarded – undo
89 89
 	 * @return \Ajax\bootstrap\html\HtmlPanel default : "panel-default"
90 90
 	 */
91 91
 	public function setStyle($cssStyle) {
92
-		if (!PhalconUtils::startsWith($cssStyle, "panel"))
93
-			$cssStyle="panel".$cssStyle;
92
+		if (!PhalconUtils::startsWith($cssStyle, "panel")) {
93
+					$cssStyle="panel".$cssStyle;
94
+		}
94 95
 		return $this->addToPropertyCtrl("class", $cssStyle, CssRef::Styles("panel"));
95 96
 	}
96 97
 
@@ -132,7 +133,8 @@  discard block
 block discarded – undo
132 133
 	 * @return $this default : false
133 134
 	 */
134 135
 	public function show($value) {
135
-		if ($this->_collapsable)
136
-			$this->_showOnStartup=$value;
136
+		if ($this->_collapsable) {
137
+					$this->_showOnStartup=$value;
138
+		}
137 139
 	}
138 140
 }
139 141
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlTabs.php 1 patch
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@  discard block
 block discarded – undo
35 35
 					$tab
36 36
 			);
37 37
 			array_splice($this->tabs, $index, 0, $inserted);
38
-		} else
39
-			$this->tabs []=$tab;
38
+		} else {
39
+					$this->tabs []=$tab;
40
+		}
40 41
 	}
41 42
 
42 43
 	public function setActive($index){
@@ -116,9 +117,9 @@  discard block
 block discarded – undo
116 117
 	public function createTabContents() {
117 118
 		$tabContent=new HtmlTabContent("tabcontent-".$this->identifier);
118 119
 		foreach ( $this->tabs as $tab ) {
119
-			if ($tab instanceof HtmlTabItem)
120
-				$tabContent->addTabItem($tab->getHref());
121
-			elseif ($tab instanceof HtmlDropdown) {
120
+			if ($tab instanceof HtmlTabItem) {
121
+							$tabContent->addTabItem($tab->getHref());
122
+			} elseif ($tab instanceof HtmlDropdown) {
122 123
 				foreach ( $tab->getItems() as $dropdownItem ) {
123 124
 					$tabContent->addTabItem($dropdownItem->getHref());
124 125
 				}
@@ -137,8 +138,9 @@  discard block
 block discarded – undo
137 138
 
138 139
 	public function setContentToTab($index, $text) {
139 140
 		$tabContentItem=$this->content->getTabItem($index);
140
-		if (isset($tabContentItem))
141
-			$tabContentItem->setContent($text);
141
+		if (isset($tabContentItem)) {
142
+					$tabContentItem->setContent($text);
143
+		}
142 144
 	}
143 145
 
144 146
 	public function countTabs() {
@@ -146,8 +148,9 @@  discard block
 block discarded – undo
146 148
 	}
147 149
 
148 150
 	public function getTabItem($index) {
149
-		if ($index<sizeof($this->content->get))
150
-			return $this->content;
151
+		if ($index<sizeof($this->content->get)) {
152
+					return $this->content;
153
+		}
151 154
 	}
152 155
 
153 156
 	public function fadeEffect() {
@@ -168,9 +171,11 @@  discard block
 block discarded – undo
168 171
 	}
169 172
 
170 173
 	public function setStacked($stacked=true){
171
-		if($stacked)
172
-			$this->stacked="nav-stacked";
173
-		else $this->stacked="";
174
+		if($stacked) {
175
+					$this->stacked="nav-stacked";
176
+		} else {
177
+			$this->stacked="";
178
+		}
174 179
 	}
175 180
 
176 181
 	/* (non-PHPdoc)
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
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 		if (is_array($elements)) {
58 58
 			foreach ( $elements as $key => $element ) {
59 59
 				$iid=$this->getElementsCount()+1;
60
-				if ($element instanceof HtmlDropdownItem)
61
-					$this->elements []=$element;
62
-				else if (is_array($element)) {
60
+				if ($element instanceof HtmlDropdownItem) {
61
+									$this->elements []=$element;
62
+				} else if (is_array($element)) {
63 63
 					if (is_string($key)===true) {
64 64
 						$dropdown=new HtmlDropdown($this->identifier."-dropdown-".$iid);
65 65
 						$dropdown->addItems($element);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		$li=new HtmlDoubleElement($this->identifier."-li-".$iid, "li");
86 86
 		if($caption instanceof HtmlLink){
87 87
 			$link=$caption;
88
-		}else{
88
+		} else{
89 89
 			$link=new HtmlLink($this->identifier."-link-".$iid, $href, $caption);
90 90
 		}
91 91
 		$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/phalcon/PhBsForm.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,16 +30,18 @@
 block discarded – undo
30 30
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
31 31
 		$result="";
32 32
 		foreach ( $this->_elements as $element ) {
33
-			if ($element instanceof PhBsElement)
34
-				$result.=$element->compile($js, $view);
33
+			if ($element instanceof PhBsElement) {
34
+							$result.=$element->compile($js, $view);
35
+			}
35 36
 		}
36 37
 		return $result;
37 38
 	}
38 39
 
39 40
 	public function run(JsUtils $js) {
40 41
 		foreach ( $this->_elements as $element ) {
41
-			if ($element instanceof PhBsElement)
42
-				$element->run($js);
42
+			if ($element instanceof PhBsElement) {
43
+							$element->run($js);
44
+			}
43 45
 		}
44 46
 	}
45 47
 }
46 48
\ No newline at end of file
Please login to merge, or discard this patch.