Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:58
created
framework/Web/UI/WebControls/TStyle.php 2 patches
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 		parent::_getZappableSleepProps($exprops);
57 57
 		if ($this->_fields === [])
58 58
 			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_fields";
59
-		if($this->_font === null)
59
+		if ($this->_font === null)
60 60
 			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_font";
61
-		if($this->_class === null)
61
+		if ($this->_class === null)
62 62
 			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_class";
63 63
 		if ($this->_customStyle === null)
64 64
 			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_customStyle";
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	public function __construct($style = null)
74 74
 	{
75 75
 	parent::__construct();
76
-		if($style !== null)
76
+		if ($style !== null)
77 77
 			$this->copyFrom($style);
78 78
 	}
79 79
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function __clone()
84 84
 	{
85
-		if($this->_font !== null)
85
+		if ($this->_font !== null)
86 86
 			$this->_font = clone($this->_font);
87 87
 	}
88 88
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function getBackColor()
93 93
 	{
94
-		return isset($this->_fields['background-color'])?$this->_fields['background-color']:'';
94
+		return isset($this->_fields['background-color']) ? $this->_fields['background-color'] : '';
95 95
 	}
96 96
 
97 97
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	public function setBackColor($value)
101 101
 	{
102
-		if(trim($value) === '')
102
+		if (trim($value) === '')
103 103
 			unset($this->_fields['background-color']);
104 104
 		else
105 105
 			$this->_fields['background-color'] = $value;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 */
111 111
 	public function getBorderColor()
112 112
 	{
113
-		return isset($this->_fields['border-color'])?$this->_fields['border-color']:'';
113
+		return isset($this->_fields['border-color']) ? $this->_fields['border-color'] : '';
114 114
 	}
115 115
 
116 116
 	/**
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public function setBorderColor($value)
120 120
 	{
121
-		if(trim($value) === '')
121
+		if (trim($value) === '')
122 122
 			unset($this->_fields['border-color']);
123 123
 		else
124 124
 			$this->_fields['border-color'] = $value;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	public function getBorderStyle()
131 131
 	{
132
-		return isset($this->_fields['border-style'])?$this->_fields['border-style']:'';
132
+		return isset($this->_fields['border-style']) ? $this->_fields['border-style'] : '';
133 133
 	}
134 134
 
135 135
 	/**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function setBorderStyle($value)
140 140
 	{
141
-		if(trim($value) === '')
141
+		if (trim($value) === '')
142 142
 			unset($this->_fields['border-style']);
143 143
 		else
144 144
 			$this->_fields['border-style'] = $value;
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	public function getBorderWidth()
151 151
 	{
152
-		return isset($this->_fields['border-width'])?$this->_fields['border-width']:'';
152
+		return isset($this->_fields['border-width']) ? $this->_fields['border-width'] : '';
153 153
 	}
154 154
 
155 155
 	/**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 */
158 158
 	public function setBorderWidth($value)
159 159
 	{
160
-		if(trim($value) === '')
160
+		if (trim($value) === '')
161 161
 			unset($this->_fields['border-width']);
162 162
 		else
163 163
 			$this->_fields['border-width'] = $value;
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function getCssClass()
170 170
 	{
171
-		return $this->_class === null?'':$this->_class;
171
+		return $this->_class === null ? '' : $this->_class;
172 172
 	}
173 173
 
174 174
 	/**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 */
193 193
 	public function getFont()
194 194
 	{
195
-		if($this->_font === null)
195
+		if ($this->_font === null)
196 196
 			$this->_font = new TFont;
197 197
 		return $this->_font;
198 198
 	}
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	public function setDisplayStyle($value)
212 212
 	{
213 213
 		$this->_displayStyle = TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TDisplayStyle');
214
-		switch($this->_displayStyle)
214
+		switch ($this->_displayStyle)
215 215
 		{
216 216
 			case TDisplayStyle::None:
217 217
 				$this->_fields['display'] = 'none';
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	 */
242 242
 	public function getForeColor()
243 243
 	{
244
-		return isset($this->_fields['color'])?$this->_fields['color']:'';
244
+		return isset($this->_fields['color']) ? $this->_fields['color'] : '';
245 245
 	}
246 246
 
247 247
 	/**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 	 */
250 250
 	public function setForeColor($value)
251 251
 	{
252
-		if(trim($value) === '')
252
+		if (trim($value) === '')
253 253
 			unset($this->_fields['color']);
254 254
 		else
255 255
 			$this->_fields['color'] = $value;
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	 */
261 261
 	public function getHeight()
262 262
 	{
263
-		return isset($this->_fields['height'])?$this->_fields['height']:'';
263
+		return isset($this->_fields['height']) ? $this->_fields['height'] : '';
264 264
 	}
265 265
 
266 266
 	/**
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 	 */
269 269
 	public function setHeight($value)
270 270
 	{
271
-		if(trim($value) === '')
271
+		if (trim($value) === '')
272 272
 			unset($this->_fields['height']);
273 273
 		else
274 274
 			$this->_fields['height'] = $value;
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	 */
280 280
 	public function getCustomStyle()
281 281
 	{
282
-		return $this->_customStyle === null?'':$this->_customStyle;
282
+		return $this->_customStyle === null ? '' : $this->_customStyle;
283 283
 	}
284 284
 
285 285
 	/**
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	 */
298 298
 	public function getStyleField($name)
299 299
 	{
300
-		return isset($this->_fields[$name])?$this->_fields[$name]:'';
300
+		return isset($this->_fields[$name]) ? $this->_fields[$name] : '';
301 301
 	}
302 302
 
303 303
 	/**
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 	 */
334 334
 	public function getWidth()
335 335
 	{
336
-		return isset($this->_fields['width'])?$this->_fields['width']:'';
336
+		return isset($this->_fields['width']) ? $this->_fields['width'] : '';
337 337
 	}
338 338
 
339 339
 	/**
@@ -363,14 +363,14 @@  discard block
 block discarded – undo
363 363
 	 */
364 364
 	public function copyFrom($style)
365 365
 	{
366
-		if($style instanceof TStyle)
366
+		if ($style instanceof TStyle)
367 367
 		{
368 368
 			$this->_fields = array_merge($this->_fields, $style->_fields);
369
-			if($style->_class !== null)
369
+			if ($style->_class !== null)
370 370
 				$this->_class = $style->_class;
371
-			if($style->_customStyle !== null)
371
+			if ($style->_customStyle !== null)
372 372
 				$this->_customStyle = $style->_customStyle;
373
-			if($style->_font !== null)
373
+			if ($style->_font !== null)
374 374
 				$this->getFont()->copyFrom($style->_font);
375 375
 		}
376 376
 	}
@@ -383,14 +383,14 @@  discard block
 block discarded – undo
383 383
 	 */
384 384
 	public function mergeWith($style)
385 385
 	{
386
-		if($style instanceof TStyle)
386
+		if ($style instanceof TStyle)
387 387
 		{
388 388
 			$this->_fields = array_merge($style->_fields, $this->_fields);
389
-			if($this->_class === null)
389
+			if ($this->_class === null)
390 390
 				$this->_class = $style->_class;
391
-			if($this->_customStyle === null)
391
+			if ($this->_customStyle === null)
392 392
 				$this->_customStyle = $style->_customStyle;
393
-			if($style->_font !== null)
393
+			if ($style->_font !== null)
394 394
 				$this->getFont()->mergeWith($style->_font);
395 395
 		}
396 396
 	}
@@ -401,19 +401,19 @@  discard block
 block discarded – undo
401 401
 	 */
402 402
 	public function addAttributesToRender($writer)
403 403
 	{
404
-		if($this->_customStyle !== null)
404
+		if ($this->_customStyle !== null)
405 405
 		{
406
-			foreach(explode(';', $this->_customStyle) as $style)
406
+			foreach (explode(';', $this->_customStyle) as $style)
407 407
 			{
408 408
 				$arr = explode(':', $style, 2);
409
-				if(isset($arr[1]) && trim($arr[0]) !== '')
409
+				if (isset($arr[1]) && trim($arr[0]) !== '')
410 410
 					$writer->addStyleAttribute(trim($arr[0]), trim($arr[1]));
411 411
 			}
412 412
 		}
413 413
 		$writer->addStyleAttributes($this->_fields);
414
-		if($this->_font !== null)
414
+		if ($this->_font !== null)
415 415
 			$this->_font->addAttributesToRender($writer);
416
-		if($this->_class !== null)
416
+		if ($this->_class !== null)
417 417
 			$writer->addAttribute('class', $this->_class);
418 418
 	}
419 419
 
Please login to merge, or discard this patch.
Braces   +81 added lines, -58 removed lines patch added patch discarded remove patch
@@ -54,16 +54,21 @@  discard block
 block discarded – undo
54 54
 	protected function _getZappableSleepProps(&$exprops)
55 55
 	{
56 56
 		parent::_getZappableSleepProps($exprops);
57
-		if ($this->_fields === [])
58
-			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_fields";
59
-		if($this->_font === null)
60
-			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_font";
61
-		if($this->_class === null)
62
-			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_class";
63
-		if ($this->_customStyle === null)
64
-			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_customStyle";
65
-		if ($this->_displayStyle === 'Fixed')
66
-			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_displayStyle";
57
+		if ($this->_fields === []) {
58
+					$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_fields";
59
+		}
60
+		if($this->_font === null) {
61
+					$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_font";
62
+		}
63
+		if($this->_class === null) {
64
+					$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_class";
65
+		}
66
+		if ($this->_customStyle === null) {
67
+					$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_customStyle";
68
+		}
69
+		if ($this->_displayStyle === 'Fixed') {
70
+					$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_displayStyle";
71
+		}
67 72
 	}
68 73
 
69 74
 	/**
@@ -73,8 +78,9 @@  discard block
 block discarded – undo
73 78
 	public function __construct($style = null)
74 79
 	{
75 80
 	parent::__construct();
76
-		if($style !== null)
77
-			$this->copyFrom($style);
81
+		if($style !== null) {
82
+					$this->copyFrom($style);
83
+		}
78 84
 	}
79 85
 
80 86
 	/**
@@ -82,8 +88,9 @@  discard block
 block discarded – undo
82 88
 	 */
83 89
 	public function __clone()
84 90
 	{
85
-		if($this->_font !== null)
86
-			$this->_font = clone($this->_font);
91
+		if($this->_font !== null) {
92
+					$this->_font = clone($this->_font);
93
+		}
87 94
 	}
88 95
 
89 96
 	/**
@@ -99,10 +106,11 @@  discard block
 block discarded – undo
99 106
 	 */
100 107
 	public function setBackColor($value)
101 108
 	{
102
-		if(trim($value) === '')
103
-			unset($this->_fields['background-color']);
104
-		else
105
-			$this->_fields['background-color'] = $value;
109
+		if(trim($value) === '') {
110
+					unset($this->_fields['background-color']);
111
+		} else {
112
+					$this->_fields['background-color'] = $value;
113
+		}
106 114
 	}
107 115
 
108 116
 	/**
@@ -118,10 +126,11 @@  discard block
 block discarded – undo
118 126
 	 */
119 127
 	public function setBorderColor($value)
120 128
 	{
121
-		if(trim($value) === '')
122
-			unset($this->_fields['border-color']);
123
-		else
124
-			$this->_fields['border-color'] = $value;
129
+		if(trim($value) === '') {
130
+					unset($this->_fields['border-color']);
131
+		} else {
132
+					$this->_fields['border-color'] = $value;
133
+		}
125 134
 	}
126 135
 
127 136
 	/**
@@ -138,10 +147,11 @@  discard block
 block discarded – undo
138 147
 	 */
139 148
 	public function setBorderStyle($value)
140 149
 	{
141
-		if(trim($value) === '')
142
-			unset($this->_fields['border-style']);
143
-		else
144
-			$this->_fields['border-style'] = $value;
150
+		if(trim($value) === '') {
151
+					unset($this->_fields['border-style']);
152
+		} else {
153
+					$this->_fields['border-style'] = $value;
154
+		}
145 155
 	}
146 156
 
147 157
 	/**
@@ -157,10 +167,11 @@  discard block
 block discarded – undo
157 167
 	 */
158 168
 	public function setBorderWidth($value)
159 169
 	{
160
-		if(trim($value) === '')
161
-			unset($this->_fields['border-width']);
162
-		else
163
-			$this->_fields['border-width'] = $value;
170
+		if(trim($value) === '') {
171
+					unset($this->_fields['border-width']);
172
+		} else {
173
+					$this->_fields['border-width'] = $value;
174
+		}
164 175
 	}
165 176
 
166 177
 	/**
@@ -192,8 +203,9 @@  discard block
 block discarded – undo
192 203
 	 */
193 204
 	public function getFont()
194 205
 	{
195
-		if($this->_font === null)
196
-			$this->_font = new TFont;
206
+		if($this->_font === null) {
207
+					$this->_font = new TFont;
208
+		}
197 209
 		return $this->_font;
198 210
 	}
199 211
 
@@ -249,10 +261,11 @@  discard block
 block discarded – undo
249 261
 	 */
250 262
 	public function setForeColor($value)
251 263
 	{
252
-		if(trim($value) === '')
253
-			unset($this->_fields['color']);
254
-		else
255
-			$this->_fields['color'] = $value;
264
+		if(trim($value) === '') {
265
+					unset($this->_fields['color']);
266
+		} else {
267
+					$this->_fields['color'] = $value;
268
+		}
256 269
 	}
257 270
 
258 271
 	/**
@@ -268,10 +281,11 @@  discard block
 block discarded – undo
268 281
 	 */
269 282
 	public function setHeight($value)
270 283
 	{
271
-		if(trim($value) === '')
272
-			unset($this->_fields['height']);
273
-		else
274
-			$this->_fields['height'] = $value;
284
+		if(trim($value) === '') {
285
+					unset($this->_fields['height']);
286
+		} else {
287
+					$this->_fields['height'] = $value;
288
+		}
275 289
 	}
276 290
 
277 291
 	/**
@@ -366,12 +380,15 @@  discard block
 block discarded – undo
366 380
 		if($style instanceof TStyle)
367 381
 		{
368 382
 			$this->_fields = array_merge($this->_fields, $style->_fields);
369
-			if($style->_class !== null)
370
-				$this->_class = $style->_class;
371
-			if($style->_customStyle !== null)
372
-				$this->_customStyle = $style->_customStyle;
373
-			if($style->_font !== null)
374
-				$this->getFont()->copyFrom($style->_font);
383
+			if($style->_class !== null) {
384
+							$this->_class = $style->_class;
385
+			}
386
+			if($style->_customStyle !== null) {
387
+							$this->_customStyle = $style->_customStyle;
388
+			}
389
+			if($style->_font !== null) {
390
+							$this->getFont()->copyFrom($style->_font);
391
+			}
375 392
 		}
376 393
 	}
377 394
 
@@ -386,12 +403,15 @@  discard block
 block discarded – undo
386 403
 		if($style instanceof TStyle)
387 404
 		{
388 405
 			$this->_fields = array_merge($style->_fields, $this->_fields);
389
-			if($this->_class === null)
390
-				$this->_class = $style->_class;
391
-			if($this->_customStyle === null)
392
-				$this->_customStyle = $style->_customStyle;
393
-			if($style->_font !== null)
394
-				$this->getFont()->mergeWith($style->_font);
406
+			if($this->_class === null) {
407
+							$this->_class = $style->_class;
408
+			}
409
+			if($this->_customStyle === null) {
410
+							$this->_customStyle = $style->_customStyle;
411
+			}
412
+			if($style->_font !== null) {
413
+							$this->getFont()->mergeWith($style->_font);
414
+			}
395 415
 		}
396 416
 	}
397 417
 
@@ -406,15 +426,18 @@  discard block
 block discarded – undo
406 426
 			foreach(explode(';', $this->_customStyle) as $style)
407 427
 			{
408 428
 				$arr = explode(':', $style, 2);
409
-				if(isset($arr[1]) && trim($arr[0]) !== '')
410
-					$writer->addStyleAttribute(trim($arr[0]), trim($arr[1]));
429
+				if(isset($arr[1]) && trim($arr[0]) !== '') {
430
+									$writer->addStyleAttribute(trim($arr[0]), trim($arr[1]));
431
+				}
411 432
 			}
412 433
 		}
413 434
 		$writer->addStyleAttributes($this->_fields);
414
-		if($this->_font !== null)
415
-			$this->_font->addAttributesToRender($writer);
416
-		if($this->_class !== null)
417
-			$writer->addAttribute('class', $this->_class);
435
+		if($this->_font !== null) {
436
+					$this->_font->addAttributesToRender($writer);
437
+		}
438
+		if($this->_class !== null) {
439
+					$writer->addAttribute('class', $this->_class);
440
+		}
418 441
 	}
419 442
 
420 443
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TWizardNavigationTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 	 */
63 63
 	protected function createNavigationButton($buttonStyle, $causesValidation, $commandName)
64 64
 	{
65
-		switch($buttonStyle->getButtonType())
65
+		switch ($buttonStyle->getButtonType())
66 66
 		{
67 67
 			case TWizardNavigationButtonType::Button:
68 68
 				$button = new TButton;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TContentPlaceHolder.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	 */
42 42
 	public function createdOnTemplate($parent)
43 43
 	{
44
-		if(($id = $this->getID()) === '')
44
+		if (($id = $this->getID()) === '')
45 45
 			throw new TConfigurationException('contentplaceholder_id_required');
46 46
 		$this->getTemplateControl()->registerContentPlaceHolder($id, $this);
47 47
 		$parent->getControls()->add($this);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,9 @@
 block discarded – undo
41 41
 	 */
42 42
 	public function createdOnTemplate($parent)
43 43
 	{
44
-		if(($id = $this->getID()) === '')
45
-			throw new TConfigurationException('contentplaceholder_id_required');
44
+		if(($id = $this->getID()) === '') {
45
+					throw new TConfigurationException('contentplaceholder_id_required');
46
+		}
46 47
 		$this->getTemplateControl()->registerContentPlaceHolder($id, $this);
47 48
 		$parent->getControls()->add($this);
48 49
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataSourceSelectParameters.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 	public function setStartRowIndex($value)
36 36
 	{
37
-		if(($value = TPropertyValue::ensureInteger($value)) < 0)
37
+		if (($value = TPropertyValue::ensureInteger($value)) < 0)
38 38
 			$value = 0;
39 39
 		$this->_startRowIndex = $value;
40 40
 	}
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 	public function setMaximumRows($value)
48 48
 	{
49
-		if(($value = TPropertyValue::ensureInteger($value)) < 0)
49
+		if (($value = TPropertyValue::ensureInteger($value)) < 0)
50 50
 			$value = 0;
51 51
 		$this->_maximumRows = $value;
52 52
 	}
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 	public function setTotalRowCount($value)
70 70
 	{
71
-		if(($value = TPropertyValue::ensureInteger($value)) < 0)
71
+		if (($value = TPropertyValue::ensureInteger($value)) < 0)
72 72
 			$value = 0;
73 73
 		$this->_totalRowCount = $value;
74 74
 	}
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@  discard block
 block discarded – undo
34 34
 
35 35
 	public function setStartRowIndex($value)
36 36
 	{
37
-		if(($value = TPropertyValue::ensureInteger($value)) < 0)
38
-			$value = 0;
37
+		if(($value = TPropertyValue::ensureInteger($value)) < 0) {
38
+					$value = 0;
39
+		}
39 40
 		$this->_startRowIndex = $value;
40 41
 	}
41 42
 
@@ -46,8 +47,9 @@  discard block
 block discarded – undo
46 47
 
47 48
 	public function setMaximumRows($value)
48 49
 	{
49
-		if(($value = TPropertyValue::ensureInteger($value)) < 0)
50
-			$value = 0;
50
+		if(($value = TPropertyValue::ensureInteger($value)) < 0) {
51
+					$value = 0;
52
+		}
51 53
 		$this->_maximumRows = $value;
52 54
 	}
53 55
 
@@ -68,8 +70,9 @@  discard block
 block discarded – undo
68 70
 
69 71
 	public function setTotalRowCount($value)
70 72
 	{
71
-		if(($value = TPropertyValue::ensureInteger($value)) < 0)
72
-			$value = 0;
73
+		if(($value = TPropertyValue::ensureInteger($value)) < 0) {
74
+					$value = 0;
75
+		}
73 76
 		$this->_totalRowCount = $value;
74 77
 	}
75 78
 }
76 79
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TLabel.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	protected function getTagName()
44 44
 	{
45
-		return ($this->getForControl() === '')?'span':'label';
45
+		return ($this->getForControl() === '') ? 'span' : 'label';
46 46
 	}
47 47
 
48 48
 	/**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	protected function addAttributesToRender($writer)
54 54
 	{
55
-		if($this->_forControl !== '')
55
+		if ($this->_forControl !== '')
56 56
 			$writer->addAttribute('for', $this->_forControl);
57 57
 		parent::addAttributesToRender($writer);
58 58
 	}
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function render($writer)
67 67
 	{
68
-		if(($aid = $this->getForControl()) !== '')
68
+		if (($aid = $this->getForControl()) !== '')
69 69
 		{
70
-			if($control = $this->findControl($aid))
70
+			if ($control = $this->findControl($aid))
71 71
 			{
72
-				if($control->getVisible(true))
72
+				if ($control->getVisible(true))
73 73
 				{
74 74
 					$this->_forControl = $control->getClientID();
75 75
 					parent::render($writer);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function renderContents($writer)
90 90
 	{
91
-		if(($text = $this->getText()) === '')
91
+		if (($text = $this->getText()) === '')
92 92
 			parent::renderContents($writer);
93 93
 		else
94 94
 			$writer->write($text);
Please login to merge, or discard this patch.
Braces   +12 added lines, -10 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	protected function addAttributesToRender($writer)
54 54
 	{
55
-		if($this->_forControl !== '')
56
-			$writer->addAttribute('for', $this->_forControl);
55
+		if($this->_forControl !== '') {
56
+					$writer->addAttribute('for', $this->_forControl);
57
+		}
57 58
 		parent::addAttributesToRender($writer);
58 59
 	}
59 60
 
@@ -74,12 +75,12 @@  discard block
 block discarded – undo
74 75
 					$this->_forControl = $control->getClientID();
75 76
 					parent::render($writer);
76 77
 				}
78
+			} else {
79
+							throw new TInvalidDataValueException('label_associatedcontrol_invalid', $aid);
77 80
 			}
78
-			else
79
-				throw new TInvalidDataValueException('label_associatedcontrol_invalid', $aid);
81
+		} else {
82
+					parent::render($writer);
80 83
 		}
81
-		else
82
-			parent::render($writer);
83 84
 	}
84 85
 
85 86
 	/**
@@ -88,10 +89,11 @@  discard block
 block discarded – undo
88 89
 	 */
89 90
 	public function renderContents($writer)
90 91
 	{
91
-		if(($text = $this->getText()) === '')
92
-			parent::renderContents($writer);
93
-		else
94
-			$writer->write($text);
92
+		if(($text = $this->getText()) === '') {
93
+					parent::renderContents($writer);
94
+		} else {
95
+					$writer->write($text);
96
+		}
95 97
 	}
96 98
 
97 99
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TCheckBoxList.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	protected function getRepeatInfo()
123 123
 	{
124
-		if(($repeatInfo = $this->getViewState('RepeatInfo', null)) === null)
124
+		if (($repeatInfo = $this->getViewState('RepeatInfo', null)) === null)
125 125
 		{
126 126
 			$repeatInfo = new TRepeatInfo;
127 127
 			$this->setViewState('RepeatInfo', $repeatInfo, null);
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	 */
183 183
 	public function getCellSpacing()
184 184
 	{
185
-		if($this->getHasStyle())
185
+		if ($this->getHasStyle())
186 186
 			return $this->getStyle()->getCellSpacing();
187 187
 		else
188 188
 			return -1;
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	 */
203 203
 	public function getCellPadding()
204 204
 	{
205
-		if($this->getHasStyle())
205
+		if ($this->getHasStyle())
206 206
 			return $this->getStyle()->getCellPadding();
207 207
 		else
208 208
 			return -1;
@@ -258,16 +258,16 @@  discard block
 block discarded – undo
258 258
 		// and it's a callback,
259 259
 		// and we can update clientside,
260 260
 		// then update the 'disabled' attribute of the items.
261
-		if(($this instanceof IActiveControl) &&
261
+		if (($this instanceof IActiveControl) &&
262 262
 				$this->getPage()->getIsCallBack() &&
263 263
 				$this->getActiveControl()->canUpdateClientSide())
264 264
 		{
265 265
 			$items = $this->getItems();
266 266
 			$cs = $this->getPage()->getCallbackClient();
267
-			$baseClientID = $this->getClientID() . '_c';
268
-			foreach($items as $index => $item)
267
+			$baseClientID = $this->getClientID().'_c';
268
+			foreach ($items as $index => $item)
269 269
 			{
270
-				$cs->setAttribute($baseClientID . $index, 'disabled', $value);
270
+				$cs->setAttribute($baseClientID.$index, 'disabled', $value);
271 271
 			}
272 272
 		}
273 273
 	}
@@ -296,9 +296,9 @@  discard block
 block discarded – undo
296 296
 	{
297 297
 		$repeatedControl = $this->_repeatedControl;
298 298
 		$item = $this->getItems()->itemAt($index);
299
-		if($item->getHasAttributes())
299
+		if ($item->getHasAttributes())
300 300
 			$repeatedControl->getAttributes()->copyFrom($item->getAttributes());
301
-		elseif($repeatedControl->getHasAttributes())
301
+		elseif ($repeatedControl->getHasAttributes())
302 302
 			$repeatedControl->getAttributes()->clear();
303 303
 		$repeatedControl->setID("c$index");
304 304
 		$repeatedControl->setText($item->getText());
@@ -318,20 +318,20 @@  discard block
 block discarded – undo
318 318
 	 */
319 319
 	public function loadPostData($key, $values)
320 320
 	{
321
-		if($this->getEnabled(true))
321
+		if ($this->getEnabled(true))
322 322
 		{
323
-			$index = (int)substr($key, strlen($this->getUniqueID()) + 2);
323
+			$index = (int) substr($key, strlen($this->getUniqueID()) + 2);
324 324
 			$this->ensureDataBound();
325
-			if($index >= 0 && $index < $this->getItemCount())
325
+			if ($index >= 0 && $index < $this->getItemCount())
326 326
 			{
327 327
 				$item = $this->getItems()->itemAt($index);
328
-				if($item->getEnabled())
328
+				if ($item->getEnabled())
329 329
 				{
330 330
 					$checked = isset($values[$key]);
331
-					if($item->getSelected() !== $checked)
331
+					if ($item->getSelected() !== $checked)
332 332
 					{
333 333
 						$item->setSelected($checked);
334
-						if(!$this->_changedEventRaised)
334
+						if (!$this->_changedEventRaised)
335 335
 						{
336 336
 							$this->_changedEventRaised = true;
337 337
 							return $this->_dataChanged = true;
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 	 */
353 353
 	public function raisePostDataChangedEvent()
354 354
 	{
355
-		if($this->getAutoPostBack() && $this->getCausesValidation())
355
+		if ($this->getAutoPostBack() && $this->getCausesValidation())
356 356
 			$this->getPage()->validate($this->getValidationGroup());
357 357
 		$this->onSelectedIndexChanged(null);
358 358
 	}
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 		$this->_repeatedControl->setValidationGroup($this->getValidationGroup());
371 371
 		$page = $this->getPage();
372 372
 		$n = $this->getItemCount();
373
-		for($i = 0;$i < $n;++$i)
373
+		for ($i = 0; $i < $n; ++$i)
374 374
 		{
375 375
 			$this->_repeatedControl->setID("c$i");
376 376
 			$page->registerRequiresPostData($this->_repeatedControl);
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 	 *
383 383
 	 *@return boolean true if we need a span
384 384
 	 */
385
-	protected function getSpanNeeded ()
385
+	protected function getSpanNeeded()
386 386
 	{
387 387
 		return $this->getRepeatLayout() === TRepeatLayout::Raw;
388 388
 	}
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 		$writer->addAttribute('id', $this->getClientId());
400 400
 		$writer->renderBeginTag('span');
401 401
 	  }
402
-		if($this->getItemCount() > 0)
402
+		if ($this->getItemCount() > 0)
403 403
 		{
404 404
 			$this->_isEnabled = $this->getEnabled(true);
405 405
 			$repeatInfo = $this->getRepeatInfo();
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 		  $writer->renderEndTag();
420 420
 
421 421
 		//checkbox skipped the client control script in addAttributesToRender
422
-		if($this->getEnabled(true)
422
+		if ($this->getEnabled(true)
423 423
 			&& $this->getEnableClientScript()
424 424
 			&& $this->getAutoPostBack()
425 425
 			&& $this->getPage()->getClientSupportsJavaScript())
Please login to merge, or discard this patch.
Braces   +24 added lines, -18 removed lines patch added patch discarded remove patch
@@ -76,8 +76,9 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function findControl($id, $real = false)
78 78
 	{
79
-		if ($real === true)
80
-			return parent::findControl($id);
79
+		if ($real === true) {
80
+					return parent::findControl($id);
81
+		}
81 82
 		return $this;
82 83
 	}
83 84
 
@@ -182,10 +183,11 @@  discard block
 block discarded – undo
182 183
 	 */
183 184
 	public function getCellSpacing()
184 185
 	{
185
-		if($this->getHasStyle())
186
-			return $this->getStyle()->getCellSpacing();
187
-		else
188
-			return -1;
186
+		if($this->getHasStyle()) {
187
+					return $this->getStyle()->getCellSpacing();
188
+		} else {
189
+					return -1;
190
+		}
189 191
 	}
190 192
 
191 193
 	/**
@@ -202,10 +204,11 @@  discard block
 block discarded – undo
202 204
 	 */
203 205
 	public function getCellPadding()
204 206
 	{
205
-		if($this->getHasStyle())
206
-			return $this->getStyle()->getCellPadding();
207
-		else
208
-			return -1;
207
+		if($this->getHasStyle()) {
208
+					return $this->getStyle()->getCellPadding();
209
+		} else {
210
+					return -1;
211
+		}
209 212
 	}
210 213
 
211 214
 	/**
@@ -296,10 +299,11 @@  discard block
 block discarded – undo
296 299
 	{
297 300
 		$repeatedControl = $this->_repeatedControl;
298 301
 		$item = $this->getItems()->itemAt($index);
299
-		if($item->getHasAttributes())
300
-			$repeatedControl->getAttributes()->copyFrom($item->getAttributes());
301
-		elseif($repeatedControl->getHasAttributes())
302
-			$repeatedControl->getAttributes()->clear();
302
+		if($item->getHasAttributes()) {
303
+					$repeatedControl->getAttributes()->copyFrom($item->getAttributes());
304
+		} elseif($repeatedControl->getHasAttributes()) {
305
+					$repeatedControl->getAttributes()->clear();
306
+		}
303 307
 		$repeatedControl->setID("c$index");
304 308
 		$repeatedControl->setText($item->getText());
305 309
 		$repeatedControl->setChecked($item->getSelected());
@@ -352,8 +356,9 @@  discard block
 block discarded – undo
352 356
 	 */
353 357
 	public function raisePostDataChangedEvent()
354 358
 	{
355
-		if($this->getAutoPostBack() && $this->getCausesValidation())
356
-			$this->getPage()->validate($this->getValidationGroup());
359
+		if($this->getAutoPostBack() && $this->getCausesValidation()) {
360
+					$this->getPage()->validate($this->getValidationGroup());
361
+		}
357 362
 		$this->onSelectedIndexChanged(null);
358 363
 	}
359 364
 
@@ -415,8 +420,9 @@  discard block
 block discarded – undo
415 420
 			$this->setAccessKey($accessKey);
416 421
 			$this->setTabIndex($tabIndex);
417 422
 		}
418
-		if ($needSpan)
419
-		  $writer->renderEndTag();
423
+		if ($needSpan) {
424
+				  $writer->renderEndTag();
425
+		}
420 426
 
421 427
 		//checkbox skipped the client control script in addAttributesToRender
422 428
 		if($this->getEnabled(true)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TPanel.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	protected function addAttributesToRender($writer)
71 71
 	{
72 72
 		parent::addAttributesToRender($writer);
73
-		if(($butt = $this->getDefaultButton()) !== '')
73
+		if (($butt = $this->getDefaultButton()) !== '')
74 74
 			$writer->addAttribute('id', $this->getClientID());
75 75
 	}
76 76
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	public function renderBeginTag($writer)
204 204
 	{
205 205
 		parent::renderBeginTag($writer);
206
-		if(($text = $this->getGroupingText()) !== '')
206
+		if (($text = $this->getGroupingText()) !== '')
207 207
 		{
208 208
 			$writer->renderBeginTag('fieldset');
209 209
 			$writer->renderBeginTag('legend');
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 */
219 219
 	public function renderEndTag($writer)
220 220
 	{
221
-		if($this->getGroupingText() !== '')
221
+		if ($this->getGroupingText() !== '')
222 222
 			$writer->renderEndTag();
223 223
 		parent::renderEndTag($writer);
224 224
 	}
@@ -227,9 +227,9 @@  discard block
 block discarded – undo
227 227
 	{
228 228
 		parent::render($writer);
229 229
 
230
-		if(($butt = $this->getDefaultButton()) !== '')
230
+		if (($butt = $this->getDefaultButton()) !== '')
231 231
 		{
232
-			if(($button = $this->findControl($butt)) === null)
232
+			if (($button = $this->findControl($butt)) === null)
233 233
 				throw new TInvalidDataValueException('panel_defaultbutton_invalid', $butt);
234 234
 			else
235 235
 				$this->getPage()->getClientScript()->registerDefaultButton($this, $button);
Please login to merge, or discard this patch.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -70,8 +70,9 @@  discard block
 block discarded – undo
70 70
 	protected function addAttributesToRender($writer)
71 71
 	{
72 72
 		parent::addAttributesToRender($writer);
73
-		if(($butt = $this->getDefaultButton()) !== '')
74
-			$writer->addAttribute('id', $this->getClientID());
73
+		if(($butt = $this->getDefaultButton()) !== '') {
74
+					$writer->addAttribute('id', $this->getClientID());
75
+		}
75 76
 	}
76 77
 
77 78
 	/**
@@ -218,8 +219,9 @@  discard block
 block discarded – undo
218 219
 	 */
219 220
 	public function renderEndTag($writer)
220 221
 	{
221
-		if($this->getGroupingText() !== '')
222
-			$writer->renderEndTag();
222
+		if($this->getGroupingText() !== '') {
223
+					$writer->renderEndTag();
224
+		}
223 225
 		parent::renderEndTag($writer);
224 226
 	}
225 227
 
@@ -229,10 +231,11 @@  discard block
 block discarded – undo
229 231
 
230 232
 		if(($butt = $this->getDefaultButton()) !== '')
231 233
 		{
232
-			if(($button = $this->findControl($butt)) === null)
233
-				throw new TInvalidDataValueException('panel_defaultbutton_invalid', $butt);
234
-			else
235
-				$this->getPage()->getClientScript()->registerDefaultButton($this, $button);
234
+			if(($button = $this->findControl($butt)) === null) {
235
+							throw new TInvalidDataValueException('panel_defaultbutton_invalid', $butt);
236
+			} else {
237
+							$this->getPage()->getClientScript()->registerDefaultButton($this, $button);
238
+			}
236 239
 		}
237 240
 	}
238 241
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TWebControlDecorator.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 * @param string sets the text before the open tag in the TWebControl
164 164
 	 */
165 165
 	public function setPreTagText($value) {
166
-		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
166
+		if (!$this->_internalonly && !$this->_control->getIsSkinApplied())
167 167
 			$this->_pretagtext = TPropertyValue::ensureString($value);
168 168
 	}
169 169
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 * @param string sets the text after the open tag in the TWebControl
180 180
 	 */
181 181
 	public function setPreContentsText($value) {
182
-		if(!$this->_control->getIsSkinApplied())
182
+		if (!$this->_control->getIsSkinApplied())
183 183
 			$this->_precontentstext = TPropertyValue::ensureString($value);
184 184
 	}
185 185
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	 * @param string sets the text before the close tag in the TWebControl
196 196
 	 */
197 197
 	public function setPostContentsText($value) {
198
-		if(!$this->_control->getIsSkinApplied())
198
+		if (!$this->_control->getIsSkinApplied())
199 199
 			$this->_postcontentstext = TPropertyValue::ensureString($value);
200 200
 	}
201 201
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 * @param string sets the text after the close tag in the TWebControl
212 212
 	 */
213 213
 	public function setPostTagText($value) {
214
-		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
214
+		if (!$this->_internalonly && !$this->_control->getIsSkinApplied())
215 215
 			$this->_posttagtext = TPropertyValue::ensureString($value);
216 216
 	}
217 217
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 * @param TTemplate sets the template before the open tag in the TWebControl
228 228
 	 */
229 229
 	public function setPreTagTemplate($value) {
230
-		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
230
+		if (!$this->_internalonly && !$this->_control->getIsSkinApplied())
231 231
 			$this->_pretagtemplate = $value;
232 232
 	}
233 233
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	 * @param TTemplate sets the template after the open tag in the TWebControl
244 244
 	 */
245 245
 	public function setPreContentsTemplate($value) {
246
-		if(!$this->_control->getIsSkinApplied())
246
+		if (!$this->_control->getIsSkinApplied())
247 247
 			$this->_precontentstemplate = $value;
248 248
 	}
249 249
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	 * @param TTemplate sets the template before the close tag in the TWebControl
260 260
 	 */
261 261
 	public function setPostContentsTemplate($value) {
262
-		if(!$this->_control->getIsSkinApplied())
262
+		if (!$this->_control->getIsSkinApplied())
263 263
 			$this->_postcontentstemplate = $value;
264 264
 	}
265 265
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 	 * @param TTemplate sets the template before the close tag in the TWebControl
276 276
 	 */
277 277
 	public function setPostTagTemplate($value) {
278
-		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
278
+		if (!$this->_internalonly && !$this->_control->getIsSkinApplied())
279 279
 			$this->_posttagtemplate = $value;
280 280
 	}
281 281
 
@@ -286,11 +286,11 @@  discard block
 block discarded – undo
286 286
 	 * these controls don't have page states.  This is as close to not influencing the page as possible.
287 287
 	 */
288 288
 	public function instantiate($outercontrol = null) {
289
-		if($this->getPreTagTemplate() || $this->getPreContentsTemplate() ||
289
+		if ($this->getPreTagTemplate() || $this->getPreContentsTemplate() ||
290 290
 			$this->getPostContentsTemplate() || $this->getPostTagTemplate()) {
291 291
 
292 292
 			$this->_outercontrol = $outercontrol;
293
-			if($this->getUseState())
293
+			if ($this->getUseState())
294 294
 				$this->ensureTemplateDecoration();
295 295
 			else
296 296
 				$this->_control->getPage()->onSaveStateComplete[] = [$this, 'ensureTemplateDecoration'];
@@ -310,40 +310,40 @@  discard block
 block discarded – undo
310 310
 
311 311
 		$control = $this->_control;
312 312
 		$outercontrol = $this->_outercontrol;
313
-		if($outercontrol === null)
313
+		if ($outercontrol === null)
314 314
 			$outercontrol = $control;
315 315
 
316
-		if($this->_addedTemplateDecoration)
316
+		if ($this->_addedTemplateDecoration)
317 317
 			return $this->_addedTemplateDecoration;
318 318
 
319 319
 		$this->_addedTemplateDecoration = true;
320 320
 
321
-		if($this->getPreContentsTemplate())
321
+		if ($this->getPreContentsTemplate())
322 322
 		{
323 323
 			$precontents = new TCompositeControl;
324 324
 			$this->getPreContentsTemplate()->instantiateIn($precontents);
325 325
 			$control->getControls()->insertAt(0, $precontents);
326 326
 		}
327 327
 
328
-		if($this->getPostContentsTemplate())
328
+		if ($this->getPostContentsTemplate())
329 329
 		{
330 330
 			$postcontents = new TCompositeControl;
331 331
 			$this->getPostContentsTemplate()->instantiateIn($postcontents);
332 332
 			$control->getControls()->add($postcontents);
333 333
 		}
334 334
 
335
-		if(!$outercontrol->getParent())
335
+		if (!$outercontrol->getParent())
336 336
 			return $this->_addedTemplateDecoration;
337 337
 
338 338
 
339
-		if($this->getPreTagTemplate())
339
+		if ($this->getPreTagTemplate())
340 340
 		{
341 341
 			$pretag = new TCompositeControl;
342 342
 			$this->getPreTagTemplate()->instantiateIn($pretag);
343 343
 			$outercontrol->getParent()->getControls()->insertBefore($outercontrol, $pretag);
344 344
 		}
345 345
 
346
-		if($this->getPostTagTemplate())
346
+		if ($this->getPostTagTemplate())
347 347
 		{
348 348
 			$posttag = new TCompositeControl;
349 349
 			$this->getPostTagTemplate()->instantiateIn($posttag);
Please login to merge, or discard this patch.
Braces   +38 added lines, -26 removed lines patch added patch discarded remove patch
@@ -163,8 +163,9 @@  discard block
 block discarded – undo
163 163
 	 * @param string sets the text before the open tag in the TWebControl
164 164
 	 */
165 165
 	public function setPreTagText($value) {
166
-		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
167
-			$this->_pretagtext = TPropertyValue::ensureString($value);
166
+		if(!$this->_internalonly && !$this->_control->getIsSkinApplied()) {
167
+					$this->_pretagtext = TPropertyValue::ensureString($value);
168
+		}
168 169
 	}
169 170
 
170 171
 
@@ -179,8 +180,9 @@  discard block
 block discarded – undo
179 180
 	 * @param string sets the text after the open tag in the TWebControl
180 181
 	 */
181 182
 	public function setPreContentsText($value) {
182
-		if(!$this->_control->getIsSkinApplied())
183
-			$this->_precontentstext = TPropertyValue::ensureString($value);
183
+		if(!$this->_control->getIsSkinApplied()) {
184
+					$this->_precontentstext = TPropertyValue::ensureString($value);
185
+		}
184 186
 	}
185 187
 
186 188
 
@@ -195,8 +197,9 @@  discard block
 block discarded – undo
195 197
 	 * @param string sets the text before the close tag in the TWebControl
196 198
 	 */
197 199
 	public function setPostContentsText($value) {
198
-		if(!$this->_control->getIsSkinApplied())
199
-			$this->_postcontentstext = TPropertyValue::ensureString($value);
200
+		if(!$this->_control->getIsSkinApplied()) {
201
+					$this->_postcontentstext = TPropertyValue::ensureString($value);
202
+		}
200 203
 	}
201 204
 
202 205
 
@@ -211,8 +214,9 @@  discard block
 block discarded – undo
211 214
 	 * @param string sets the text after the close tag in the TWebControl
212 215
 	 */
213 216
 	public function setPostTagText($value) {
214
-		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
215
-			$this->_posttagtext = TPropertyValue::ensureString($value);
217
+		if(!$this->_internalonly && !$this->_control->getIsSkinApplied()) {
218
+					$this->_posttagtext = TPropertyValue::ensureString($value);
219
+		}
216 220
 	}
217 221
 
218 222
 
@@ -227,8 +231,9 @@  discard block
 block discarded – undo
227 231
 	 * @param TTemplate sets the template before the open tag in the TWebControl
228 232
 	 */
229 233
 	public function setPreTagTemplate($value) {
230
-		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
231
-			$this->_pretagtemplate = $value;
234
+		if(!$this->_internalonly && !$this->_control->getIsSkinApplied()) {
235
+					$this->_pretagtemplate = $value;
236
+		}
232 237
 	}
233 238
 
234 239
 
@@ -243,8 +248,9 @@  discard block
 block discarded – undo
243 248
 	 * @param TTemplate sets the template after the open tag in the TWebControl
244 249
 	 */
245 250
 	public function setPreContentsTemplate($value) {
246
-		if(!$this->_control->getIsSkinApplied())
247
-			$this->_precontentstemplate = $value;
251
+		if(!$this->_control->getIsSkinApplied()) {
252
+					$this->_precontentstemplate = $value;
253
+		}
248 254
 	}
249 255
 
250 256
 
@@ -259,8 +265,9 @@  discard block
 block discarded – undo
259 265
 	 * @param TTemplate sets the template before the close tag in the TWebControl
260 266
 	 */
261 267
 	public function setPostContentsTemplate($value) {
262
-		if(!$this->_control->getIsSkinApplied())
263
-			$this->_postcontentstemplate = $value;
268
+		if(!$this->_control->getIsSkinApplied()) {
269
+					$this->_postcontentstemplate = $value;
270
+		}
264 271
 	}
265 272
 
266 273
 
@@ -275,8 +282,9 @@  discard block
 block discarded – undo
275 282
 	 * @param TTemplate sets the template before the close tag in the TWebControl
276 283
 	 */
277 284
 	public function setPostTagTemplate($value) {
278
-		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
279
-			$this->_posttagtemplate = $value;
285
+		if(!$this->_internalonly && !$this->_control->getIsSkinApplied()) {
286
+					$this->_posttagtemplate = $value;
287
+		}
280 288
 	}
281 289
 
282 290
 	/**
@@ -290,10 +298,11 @@  discard block
 block discarded – undo
290 298
 			$this->getPostContentsTemplate() || $this->getPostTagTemplate()) {
291 299
 
292 300
 			$this->_outercontrol = $outercontrol;
293
-			if($this->getUseState())
294
-				$this->ensureTemplateDecoration();
295
-			else
296
-				$this->_control->getPage()->onSaveStateComplete[] = [$this, 'ensureTemplateDecoration'];
301
+			if($this->getUseState()) {
302
+							$this->ensureTemplateDecoration();
303
+			} else {
304
+							$this->_control->getPage()->onSaveStateComplete[] = [$this, 'ensureTemplateDecoration'];
305
+			}
297 306
 		}
298 307
 	}
299 308
 
@@ -310,11 +319,13 @@  discard block
 block discarded – undo
310 319
 
311 320
 		$control = $this->_control;
312 321
 		$outercontrol = $this->_outercontrol;
313
-		if($outercontrol === null)
314
-			$outercontrol = $control;
322
+		if($outercontrol === null) {
323
+					$outercontrol = $control;
324
+		}
315 325
 
316
-		if($this->_addedTemplateDecoration)
317
-			return $this->_addedTemplateDecoration;
326
+		if($this->_addedTemplateDecoration) {
327
+					return $this->_addedTemplateDecoration;
328
+		}
318 329
 
319 330
 		$this->_addedTemplateDecoration = true;
320 331
 
@@ -332,8 +343,9 @@  discard block
 block discarded – undo
332 343
 			$control->getControls()->add($postcontents);
333 344
 		}
334 345
 
335
-		if(!$outercontrol->getParent())
336
-			return $this->_addedTemplateDecoration;
346
+		if(!$outercontrol->getParent()) {
347
+					return $this->_addedTemplateDecoration;
348
+		}
337 349
 
338 350
 
339 351
 		if($this->getPreTagTemplate())
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TStatements.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 	 */
57 57
 	public function render($writer)
58 58
 	{
59
-		if($this->_s !== '')
59
+		if ($this->_s !== '')
60 60
 			$writer->write($this->evaluateStatements($this->_s));
61 61
 	}
62 62
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,9 @@
 block discarded – undo
56 56
 	 */
57 57
 	public function render($writer)
58 58
 	{
59
-		if($this->_s !== '')
60
-			$writer->write($this->evaluateStatements($this->_s));
59
+		if($this->_s !== '') {
60
+					$writer->write($this->evaluateStatements($this->_s));
61
+		}
61 62
 	}
62 63
 }
63 64
 
Please login to merge, or discard this patch.