Passed
Push — master ( 15d416...16888f )
by Jean-Christophe
02:23
created
Ajax/bootstrap/html/HtmlTabs.php 2 patches
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.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 use Ajax\bootstrap\html\content\HtmlTabContent;
16 16
 
17 17
 class HtmlTabs extends HtmlBsDoubleElement {
18
-	protected $tabs=array ();
18
+	protected $tabs=array();
19 19
 	protected $_tabsType="tabs";
20 20
 	protected $stacked="";
21 21
 
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 	}
27 27
 
28 28
 	protected function addTab_($tab, $index=null) {
29
-		if($tab instanceof HtmlDropdown){
29
+		if ($tab instanceof HtmlDropdown) {
30 30
 			$tab->setMTagName("li");
31 31
 		}
32 32
 		if (isset($index)) {
33
-			$inserted=array (
33
+			$inserted=array(
34 34
 					$tab
35 35
 			);
36 36
 			array_splice($this->tabs, $index, 0, $inserted);
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
 			$this->tabs []=$tab;
39 39
 	}
40 40
 
41
-	public function setActive($index){
41
+	public function setActive($index) {
42 42
 		$size=\sizeof($this->tabs);
43
-		for ($i=0;$i<$size;$i++){
43
+		for ($i=0; $i<$size; $i++) {
44 44
 			$this->tabs[$i]->setActive($i==$index);
45 45
 		}
46 46
 	}
47 47
 
48
-	public function disable($index){
48
+	public function disable($index) {
49 49
 		$this->tabs[$index]->disable();
50 50
 	}
51 51
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	}
77 77
 
78 78
 	public function addTabs($tabs) {
79
-		foreach ( $tabs as $tab ) {
79
+		foreach ($tabs as $tab) {
80 80
 			$this->addTab($tab);
81 81
 		}
82 82
 		return $this;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function run(JsUtils $js) {
108 108
 		$this->_bsComponent=new Tabs($js);
109
-		foreach ( $this->tabs as $tab ) {
109
+		foreach ($this->tabs as $tab) {
110 110
 			$this->_bsComponent->addTab($tab->run($js));
111 111
 		}
112 112
 		$this->addEventsOnRun($js);
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
 
116 116
 	public function createTabContents() {
117 117
 		$tabContent=new HtmlTabContent("tabcontent-".$this->identifier);
118
-		foreach ( $this->tabs as $tab ) {
118
+		foreach ($this->tabs as $tab) {
119 119
 			if ($tab instanceof HtmlTabItem)
120 120
 				$tabContent->addTabItem($tab->getHref());
121 121
 			elseif ($tab instanceof HtmlDropdown) {
122
-				foreach ( $tab->getItems() as $dropdownItem ) {
122
+				foreach ($tab->getItems() as $dropdownItem) {
123 123
 					$tabContent->addTabItem($dropdownItem->getHref());
124 124
 				}
125 125
 			}
@@ -154,21 +154,21 @@  discard block
 block discarded – undo
154 154
 		if (sizeof($this->content->getTabItems())>0) {
155 155
 			$this->content->getTabItem(0)->addToProperty("class", "fade in");
156 156
 			$size=sizeof($this->tabs);
157
-			for($index=0; $index<$size; $index++) {
157
+			for ($index=0; $index<$size; $index++) {
158 158
 				$this->content->getTabItem($index)->addToProperty("class", "fade");
159 159
 			}
160 160
 		}
161 161
 	}
162 162
 
163
-	public function on($event, $jsCode,$stopPropagation=false,$preventDefault=false){
164
-		foreach ($this->tabs as $tab){
165
-			$tab->on($event,$jsCode,$stopPropagation,$preventDefault);
163
+	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
164
+		foreach ($this->tabs as $tab) {
165
+			$tab->on($event, $jsCode, $stopPropagation, $preventDefault);
166 166
 		}
167 167
 		return $this;
168 168
 	}
169 169
 
170
-	public function setStacked($stacked=true){
171
-		if($stacked)
170
+	public function setStacked($stacked=true) {
171
+		if ($stacked)
172 172
 			$this->stacked="nav-stacked";
173 173
 		else $this->stacked="";
174 174
 	}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/base/HtmlElementAsContent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
 	}
33 33
 
34 34
 	public function addBadge($caption, $leftSeparator="&nbsp;") {
35
-		return $this->element->addBadge($caption,$leftSeparator);
35
+		return $this->element->addBadge($caption, $leftSeparator);
36 36
 	}
37 37
 
38 38
 	public function addLabel($caption, $style="label-default", $leftSeparator="&nbsp;") {
39
-		return $this->element->addLabel($caption,$style,$leftSeparator);
39
+		return $this->element->addLabel($caption, $style, $leftSeparator);
40 40
 	}
41 41
 
42 42
 	public function run(JsUtils $js) {
Please login to merge, or discard this patch.
Ajax/bootstrap/html/base/CssRef.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	const CSS_DEFAULT="-default", CSS_PRIMARY="-primary", CSS_SUCCESS="-success", CSS_INFO="-info", CSS_WARNING="-warning", CSS_DANGER="-danger", CSS_LINK="-link";
15 15
 
16 16
 	public static function buttonStyles() {
17
-		return array (
17
+		return array(
18 18
 				"btn-default",
19 19
 				"btn-primary",
20 20
 				"btn-success",
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	}
27 27
 
28 28
 	public static function Styles($prefix="btn") {
29
-		return array (
29
+		return array(
30 30
 				$prefix."-default",
31 31
 				$prefix."-primary",
32 32
 				$prefix."-success",
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	public static function sizes($prefix="btn") {
40
-		return array (
40
+		return array(
41 41
 				$prefix."-lg",
42 42
 				"",
43 43
 				$prefix."-sm",
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	public static function position() {
49
-		return array (
49
+		return array(
50 50
 				"top",
51 51
 				"left",
52 52
 				"right",
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	}
57 57
 
58 58
 	public static function alignment($prefix="") {
59
-		return array (
59
+		return array(
60 60
 				$prefix."",
61 61
 				$prefix."left",
62 62
 				$prefix."right",
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	}
67 67
 
68 68
 	public static function navbarZoneClasses() {
69
-		return array (
69
+		return array(
70 70
 				"navbar-nav",
71 71
 				"navbar-left",
72 72
 				"navbar-right",
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	}
76 76
 
77 77
 	public static function glyphIcons() {
78
-		return array (
78
+		return array(
79 79
 				"glyphicon-asterisk",
80 80
 				"glyphicon-plus",
81 81
 				"glyphicon-euro",
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 	public static function getStyle($cssStyle, $prefix) {
348 348
 		if (is_int($cssStyle)) {
349 349
 			$styles=CssRef::Styles($prefix);
350
-			if ($cssStyle<sizeof($styles)&&$cssStyle>=0) {
350
+			if ($cssStyle<sizeof($styles) && $cssStyle>=0) {
351 351
 				return CssRef::styles($prefix)[$cssStyle];
352 352
 			} else {
353 353
 				throw new \Exception("La valeur passée a propriété `Style` ne fait pas partie des valeurs possibles : index '".$cssStyle."' inexistant");
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlListgroup.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 	public function __construct($identifier, $tagName="ul") {
17 17
 		parent::__construct($identifier, $tagName);
18
-		$this->content=array ();
18
+		$this->content=array();
19 19
 		$this->_template='<%tagName% %properties%>%content%</%tagName%>';
20 20
 		$this->setProperty("class", "list-group");
21 21
 	}
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		if (is_object($text)) {
25 25
 			$element=$text;
26 26
 		} else {
27
-			switch($this->tagName) {
27
+			switch ($this->tagName) {
28 28
 				case "ul":
29 29
 					$element=new HtmlBsDoubleElement("list-gi-".$this->identifier);
30 30
 					$element->setTagName("li");
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	public function addItems($items) {
48
-		foreach ( $items as $item ) {
48
+		foreach ($items as $item) {
49 49
 			if (is_string($item)) {
50 50
 				$this->addItem($item);
51 51
 			} else
Please login to merge, or discard this 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/HtmlGridsystem.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 	public function getRow($index,$force=true){
44 44
 		if($index<sizeof($this->rows)){
45 45
 			$result=$this->rows[$index-1];
46
-		}else if ($force){
46
+		} else if ($force){
47 47
 			$this->setNumRows($index);
48 48
 			$result=$this->rows[$index-1];
49 49
 		}
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 class HtmlGridSystem extends HtmlBsDoubleElement {
17 17
 	private $rows;
18 18
 	
19
-	public function __construct($identifier,$numRows=1,$numCols=NULL){
20
-		parent::__construct($identifier,"div");
19
+	public function __construct($identifier, $numRows=1, $numCols=NULL) {
20
+		parent::__construct($identifier, "div");
21 21
 		$this->setProperty("class", "container-fluid");
22 22
 		$this->rows=array();
23
-		$this->setNumRows($numRows,$numCols);
23
+		$this->setNumRows($numRows, $numCols);
24 24
 	}
25 25
 	
26 26
 	/**
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 * @param int $numCols 
29 29
 	 * @return \Ajax\bootstrap\html\content\HtmlGridRow
30 30
 	 */
31
-	public function addRow($numCols=NULL){
32
-		$row=new HtmlGridRow($this->identifier."-row-".(sizeof($this->rows)+1),$numCols);
31
+	public function addRow($numCols=NULL) {
32
+		$row=new HtmlGridRow($this->identifier."-row-".(sizeof($this->rows)+1), $numCols);
33 33
 		$this->rows[]=$row;
34 34
 		return $row;
35 35
 	}
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 	 * @param boolean $force add the row at $index if true
41 41
 	 * @return \Ajax\bootstrap\html\content\HtmlGridRow
42 42
 	 */
43
-	public function getRow($index,$force=true){
44
-		if($index<sizeof($this->rows)){
43
+	public function getRow($index, $force=true) {
44
+		if ($index<sizeof($this->rows)) {
45 45
 			$result=$this->rows[$index-1];
46
-		}else if ($force){
46
+		} else if ($force) {
47 47
 			$this->setNumRows($index);
48 48
 			$result=$this->rows[$index-1];
49 49
 		}
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 	 * @param int $numCols
57 57
 	 * @return \Ajax\bootstrap\html\HtmlGridSystem
58 58
 	 */
59
-	public function setNumRows($numRows,$numCols=NULL){
60
-		for($i=sizeof($this->rows);$i<$numRows;$i++){
59
+	public function setNumRows($numRows, $numCols=NULL) {
60
+		for ($i=sizeof($this->rows); $i<$numRows; $i++) {
61 61
 			$this->addRow($numCols);
62 62
 		}
63 63
 		return $this;
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
 	 * @param boolean $force add the cell at $row,$col if true
70 70
 	 * @return HtmlGridCol
71 71
 	 */
72
-	public function getCell($row,$col,$force=true){
73
-		$row=$this->getRow($row,$force);
74
-		if(isset($row)){
75
-			$col=$row->getCol($col,$force);
72
+	public function getCell($row, $col, $force=true) {
73
+		$row=$this->getRow($row, $force);
74
+		if (isset($row)) {
75
+			$col=$row->getCol($col, $force);
76 76
 		}
77 77
 		return $col;
78 78
 	}
@@ -82,22 +82,22 @@  discard block
 block discarded – undo
82 82
 	 * @param int $col
83 83
 	 * @return HtmlGridCol
84 84
 	 */
85
-	public function getCellAt($row,$col,$force=true){
86
-		$row=$this->getRow($row,$force);
87
-		if(isset($row)){
88
-			$col=$row->getColAt($col,$force);
85
+	public function getCellAt($row, $col, $force=true) {
86
+		$row=$this->getRow($row, $force);
87
+		if (isset($row)) {
88
+			$col=$row->getColAt($col, $force);
89 89
 		}
90 90
 		return $col;
91 91
 	}
92 92
 	
93 93
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
94
-		foreach ($this->rows as $row){
94
+		foreach ($this->rows as $row) {
95 95
 			$this->addContent($row);
96 96
 		}
97
-		return parent::compile($js,$view);
97
+		return parent::compile($js, $view);
98 98
 	}
99
-	public function setContentForAll($content){
100
-		foreach ($this->rows as $row){
99
+	public function setContentForAll($content) {
100
+		foreach ($this->rows as $row) {
101 101
 			$row->setContentForAll($content);
102 102
 		}
103 103
 	}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButton.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 * @return \Ajax\bootstrap\html\HtmlButton
73 73
 	 */
74 74
 	public function setActive() {
75
-		return $this->addToPropertyCtrl("class", "active", array (
75
+		return $this->addToPropertyCtrl("class", "active", array(
76 76
 				"active"
77 77
 		));
78 78
 	}
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 * @return \Ajax\bootstrap\html\HtmlButton
83 83
 	 */
84 84
 	public function setDisabled() {
85
-		return $this->addToPropertyCtrl("class", "disabled", array (
85
+		return $this->addToPropertyCtrl("class", "disabled", array(
86 86
 				"disabled"
87 87
 		));
88 88
 	}
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	public function fromArray($array) {
114 114
 		$array=parent::fromArray($array);
115
-		foreach ( $array as $key => $value ) {
115
+		foreach ($array as $key => $value) {
116 116
 			$this->setProperty($key, $value);
117 117
 		}
118 118
 		return $array;
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlNavbar.php 2 patches
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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	public function __construct($identifier, $brand="Brand", $brandHref="#") {
33 33
 		parent::__construct($identifier);
34 34
 		$this->_template=include 'templates/tplNavbar.php';
35
-		$this->navZones=array ();
35
+		$this->navZones=array();
36 36
 		$this->class="navbar-default";
37 37
 		$this->brand=$brand;
38 38
 		$this->brandHref=$brandHref;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	public function setBrandImage($imageSrc) {
63
-		$this->brandImage=new HtmlImg("brand-img-".$this->_identifier,$imageSrc,$this->brand);
63
+		$this->brandImage=new HtmlImg("brand-img-".$this->_identifier, $imageSrc, $this->brand);
64 64
 		$this->brand="";
65 65
 		return $this;
66 66
 	}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 	public function setNavZones($navZones) {
106 106
 		if (\is_array($navZones)) {
107
-			foreach ( $navZones as $zoneType => $zoneArray ) {
107
+			foreach ($navZones as $zoneType => $zoneArray) {
108 108
 				if (is_string($zoneType)) {
109 109
 					$zone=$this->addZone($zoneType);
110 110
 					$zone->fromArray($zoneArray);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			if ($index<$nb)
145 145
 				$zone=$this->navZones [$index];
146 146
 		} else {
147
-			for($i=0; $i<$nb; $i++) {
147
+			for ($i=0; $i<$nb; $i++) {
148 148
 				if ($this->navZones [$i]->getIdentifier()===$index) {
149 149
 					$zone=$this->navZones [$i];
150 150
 					break;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	}
156 156
 
157 157
 	public function run(JsUtils $js) {
158
-		foreach ( $this->navZones as $zone ) {
158
+		foreach ($this->navZones as $zone) {
159 159
 			$zone->run($js);
160 160
 		}
161 161
 		if ($this->hasScrollspy) {
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
 	}
178 178
 
179 179
 	public function setFluid($fluid) {
180
-		if($fluid===true){
180
+		if ($fluid===true) {
181 181
 			$this->fluid="container-fluid";
182
-		}else{
182
+		} else {
183 183
 			$this->fluid="container";
184 184
 		}
185 185
 		return $this;
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlAlert.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
 
45 45
 	public function addCloseButton() {
46 46
 		$button=new HtmlButton("close-".$this->identifier);
47
-		$button->setProperties(array (
47
+		$button->setProperties(array(
48 48
 				"class" => "close",
49 49
 				"data-dismiss" => "alert",
50 50
 				"aria-label" => "close"
51 51
 		));
52 52
 		$button->setValue('<span aria-hidden="true">&times;</span>');
53
-		$this->addToPropertyCtrl("class", "alert-dismissible", array (
53
+		$this->addToPropertyCtrl("class", "alert-dismissible", array(
54 54
 				"alert-dismissible"
55 55
 		));
56 56
 		$this->button=$button;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::compile()
80 80
 	 */
81 81
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
82
-		if ($this->closeable&&$this->button==="") {
82
+		if ($this->closeable && $this->button==="") {
83 83
 			$this->addCloseButton();
84 84
 		}
85 85
 		return parent::compile($js, $view);
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButtontoolbar.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,15 +79,15 @@
 block discarded – undo
79 79
 		$element=null;
80 80
 		$i=0;
81 81
 		if (is_int($index)) {
82
-			$elements=array ();
83
-			foreach ( $this->elements as $group ) {
82
+			$elements=array();
83
+			foreach ($this->elements as $group) {
84 84
 				$elements=array_merge($elements, $group->getElements());
85 85
 			}
86 86
 			if ($index<sizeof($elements)) {
87 87
 				$element=$elements [$index];
88 88
 			}
89 89
 		} else {
90
-			while ( $element===null && $i<sizeof($this->elements) ) {
90
+			while ($element===null && $i<sizeof($this->elements)) {
91 91
 				$element=$this->elements [$i]->getElement($index);
92 92
 				$i++;
93 93
 			}
Please login to merge, or discard this patch.