Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:58
created
framework/Web/UI/WebControls/TButton.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -105,18 +105,18 @@  discard block
 block discarded – undo
105 105
 		$page = $this->getPage();
106 106
 		$page->ensureRenderInForm($this);
107 107
 		$writer->addAttribute('type', strtolower($this->getButtonType()));
108
-		if(($uniqueID = $this->getUniqueID()) !== '')
108
+		if (($uniqueID = $this->getUniqueID()) !== '')
109 109
 			$writer->addAttribute('name', $uniqueID);
110
-		if($this->getButtonTag() === TButtonTag::Button)
110
+		if ($this->getButtonTag() === TButtonTag::Button)
111 111
 		  $this->addParsedObject($this->getText());
112 112
 		else
113 113
 		  $writer->addAttribute('value', $this->getText());
114
-		if($this->getEnabled(true))
114
+		if ($this->getEnabled(true))
115 115
 		{
116
-			if($this->getEnableClientScript() && $this->needPostBackScript())
116
+			if ($this->getEnableClientScript() && $this->needPostBackScript())
117 117
 				$this->renderClientControlScript($writer);
118 118
 		}
119
-		elseif($this->getEnabled()) // in this case, parent will not render 'disabled'
119
+		elseif ($this->getEnabled()) // in this case, parent will not render 'disabled'
120 120
 			$writer->addAttribute('disabled', 'disabled');
121 121
 
122 122
 		parent::addAttributesToRender($writer);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	protected function canCauseValidation()
148 148
 	{
149
-		if($this->getCausesValidation())
149
+		if ($this->getCausesValidation())
150 150
 		{
151 151
 			$group = $this->getValidationGroup();
152 152
 			return $this->getPage()->getValidators($group)->getCount() > 0;
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	 */
205 205
 	public function renderContents($writer)
206 206
 	{
207
-		if($this->getButtonTag() === TButtonTag::Button)
207
+		if ($this->getButtonTag() === TButtonTag::Button)
208 208
 			parent::renderContents($writer);
209 209
 	}
210 210
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	 */
245 245
 	public function raisePostBackEvent($param)
246 246
 	{
247
-		if($this->getCausesValidation())
247
+		if ($this->getCausesValidation())
248 248
 			$this->getPage()->validate($this->getValidationGroup());
249 249
 		$this->onClick(null);
250 250
 		$this->onCommand(new \Prado\Web\UI\TCommandEventParameter($this->getCommandName(), $this->getCommandParameter()));
Please login to merge, or discard this patch.
Braces   +22 added lines, -16 removed lines patch added patch discarded remove patch
@@ -105,19 +105,23 @@  discard block
 block discarded – undo
105 105
 		$page = $this->getPage();
106 106
 		$page->ensureRenderInForm($this);
107 107
 		$writer->addAttribute('type', strtolower($this->getButtonType()));
108
-		if(($uniqueID = $this->getUniqueID()) !== '')
109
-			$writer->addAttribute('name', $uniqueID);
110
-		if($this->getButtonTag() === TButtonTag::Button)
111
-		  $this->addParsedObject($this->getText());
112
-		else
113
-		  $writer->addAttribute('value', $this->getText());
108
+		if(($uniqueID = $this->getUniqueID()) !== '') {
109
+					$writer->addAttribute('name', $uniqueID);
110
+		}
111
+		if($this->getButtonTag() === TButtonTag::Button) {
112
+				  $this->addParsedObject($this->getText());
113
+		} else {
114
+				  $writer->addAttribute('value', $this->getText());
115
+		}
114 116
 		if($this->getEnabled(true))
115 117
 		{
116
-			if($this->getEnableClientScript() && $this->needPostBackScript())
117
-				$this->renderClientControlScript($writer);
118
-		}
119
-		elseif($this->getEnabled()) // in this case, parent will not render 'disabled'
118
+			if($this->getEnableClientScript() && $this->needPostBackScript()) {
119
+							$this->renderClientControlScript($writer);
120
+			}
121
+		} elseif($this->getEnabled()) {
122
+			// in this case, parent will not render 'disabled'
120 123
 			$writer->addAttribute('disabled', 'disabled');
124
+		}
121 125
 
122 126
 		parent::addAttributesToRender($writer);
123 127
 	}
@@ -150,9 +154,9 @@  discard block
 block discarded – undo
150 154
 		{
151 155
 			$group = $this->getValidationGroup();
152 156
 			return $this->getPage()->getValidators($group)->getCount() > 0;
157
+		} else {
158
+					return false;
153 159
 		}
154
-		else
155
-			return false;
156 160
 	}
157 161
 
158 162
 	/**
@@ -204,8 +208,9 @@  discard block
 block discarded – undo
204 208
 	 */
205 209
 	public function renderContents($writer)
206 210
 	{
207
-		if($this->getButtonTag() === TButtonTag::Button)
208
-			parent::renderContents($writer);
211
+		if($this->getButtonTag() === TButtonTag::Button) {
212
+					parent::renderContents($writer);
213
+		}
209 214
 	}
210 215
 
211 216
 	/**
@@ -244,8 +249,9 @@  discard block
 block discarded – undo
244 249
 	 */
245 250
 	public function raisePostBackEvent($param)
246 251
 	{
247
-		if($this->getCausesValidation())
248
-			$this->getPage()->validate($this->getValidationGroup());
252
+		if($this->getCausesValidation()) {
253
+					$this->getPage()->validate($this->getValidationGroup());
254
+		}
249 255
 		$this->onClick(null);
250 256
 		$this->onCommand(new \Prado\Web\UI\TCommandEventParameter($this->getCommandName(), $this->getCommandParameter()));
251 257
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TMetaTagCollection.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 */
36 36
 	public function insertAt($index, $item)
37 37
 	{
38
-		if($item instanceof TMetaTag)
38
+		if ($item instanceof TMetaTag)
39 39
 			parent::insertAt($index, $item);
40 40
 		else
41 41
 			throw new TInvalidDataTypeException('metatagcollection_metatag_invalid');
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 	public function findIndexByID($id)
50 50
 	{
51 51
 		$index = 0;
52
-		foreach($this as $item)
52
+		foreach ($this as $item)
53 53
 		{
54
-			if($item->getID() === $id)
54
+			if ($item->getID() === $id)
55 55
 				return $index;
56 56
 			$index++;
57 57
 		}
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function findMetaTagByID($id)
67 67
 	{
68
-		if(($index = $this->findIndexByID($id)) >= 0)
68
+		if (($index = $this->findIndexByID($id)) >= 0)
69 69
 			return $this->itemAt($index);
70 70
 		else
71 71
 			return null;
Please login to merge, or discard this patch.
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,10 +35,11 @@  discard block
 block discarded – undo
35 35
 	 */
36 36
 	public function insertAt($index, $item)
37 37
 	{
38
-		if($item instanceof TMetaTag)
39
-			parent::insertAt($index, $item);
40
-		else
41
-			throw new TInvalidDataTypeException('metatagcollection_metatag_invalid');
38
+		if($item instanceof TMetaTag) {
39
+					parent::insertAt($index, $item);
40
+		} else {
41
+					throw new TInvalidDataTypeException('metatagcollection_metatag_invalid');
42
+		}
42 43
 	}
43 44
 
44 45
 	/**
@@ -51,8 +52,9 @@  discard block
 block discarded – undo
51 52
 		$index = 0;
52 53
 		foreach($this as $item)
53 54
 		{
54
-			if($item->getID() === $id)
55
-				return $index;
55
+			if($item->getID() === $id) {
56
+							return $index;
57
+			}
56 58
 			$index++;
57 59
 		}
58 60
 		return -1;
@@ -65,9 +67,10 @@  discard block
 block discarded – undo
65 67
 	 */
66 68
 	public function findMetaTagByID($id)
67 69
 	{
68
-		if(($index = $this->findIndexByID($id)) >= 0)
69
-			return $this->itemAt($index);
70
-		else
71
-			return null;
70
+		if(($index = $this->findIndexByID($id)) >= 0) {
71
+					return $this->itemAt($index);
72
+		} else {
73
+					return null;
74
+		}
72 75
 	}
73 76
 }
74 77
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBoundColumn.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -164,15 +164,15 @@  discard block
 block discarded – undo
164 164
 	public function initializeCell($cell, $columnIndex, $itemType)
165 165
 	{
166 166
 		$item = $cell->getParent();
167
-		switch($itemType)
167
+		switch ($itemType)
168 168
 		{
169 169
 			case TListItemType::Item:
170 170
 			case TListItemType::AlternatingItem:
171 171
 			case TListItemType::SelectedItem:
172
-				if(($classPath = $this->getItemRenderer()) !== '')
172
+				if (($classPath = $this->getItemRenderer()) !== '')
173 173
 				{
174 174
 					$control = Prado::createComponent($classPath);
175
-					if($control instanceof IItemDataRenderer)
175
+					if ($control instanceof IItemDataRenderer)
176 176
 					{
177 177
 						$control->setItemIndex($item->getItemIndex());
178 178
 						$control->setItemType($item->getItemType());
@@ -181,15 +181,15 @@  discard block
 block discarded – undo
181 181
 				}
182 182
 				else
183 183
 					$control = $cell;
184
-				$control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
184
+				$control->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']);
185 185
 				break;
186 186
 			case TListItemType::EditItem:
187
-				if(!$this->getReadOnly())
187
+				if (!$this->getReadOnly())
188 188
 				{
189
-					if(($classPath = $this->getEditItemRenderer()) !== '')
189
+					if (($classPath = $this->getEditItemRenderer()) !== '')
190 190
 					{
191 191
 						$control = Prado::createComponent($classPath);
192
-						if($control instanceof IItemDataRenderer)
192
+						if ($control instanceof IItemDataRenderer)
193 193
 						{
194 194
 							$control->setItemIndex($item->getItemIndex());
195 195
 							$control->setItemType($item->getItemType());
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
 				}
207 207
 				else
208 208
 				{
209
-					if(($classPath = $this->getItemRenderer()) !== '')
209
+					if (($classPath = $this->getItemRenderer()) !== '')
210 210
 					{
211 211
 						$control = Prado::createComponent($classPath);
212
-						if($control instanceof IItemDataRenderer)
212
+						if ($control instanceof IItemDataRenderer)
213 213
 						{
214 214
 							$control->setItemIndex($item->getItemIndex());
215 215
 							$control->setItemType($item->getItemType());
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 					else
220 220
 						$control = $cell;
221 221
 				}
222
-				$control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
222
+				$control->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']);
223 223
 				break;
224 224
 			default:
225 225
 				parent::initializeCell($cell, $columnIndex, $itemType);
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 		$item = $sender->getNamingContainer();
238 238
 		$data = $item->getData();
239 239
 		$formatString = $this->getDataFormatString();
240
-		if(($field = $this->getDataField()) !== '')
240
+		if (($field = $this->getDataField()) !== '')
241 241
 			$value = $this->formatDataValue($formatString, $this->getDataFieldValue($data, $field));
242 242
 		else
243 243
 			$value = $this->formatDataValue($formatString, $data);
Please login to merge, or discard this patch.
Braces   +11 added lines, -12 removed lines patch added patch discarded remove patch
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
 						$control->setItemType($item->getItemType());
179 179
 					}
180 180
 					$cell->getControls()->add($control);
181
+				} else {
182
+									$control = $cell;
181 183
 				}
182
-				else
183
-					$control = $cell;
184 184
 				$control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
185 185
 				break;
186 186
 			case TListItemType::EditItem:
@@ -196,15 +196,13 @@  discard block
 block discarded – undo
196 196
 						}
197 197
 						$cell->getControls()->add($control);
198 198
 						$cell->registerObject('EditControl', $control);
199
-					}
200
-					else
199
+					} else
201 200
 					{
202 201
 						$control = new TTextBox;
203 202
 						$cell->getControls()->add($control);
204 203
 						$cell->registerObject('TextBox', $control);
205 204
 					}
206
-				}
207
-				else
205
+				} else
208 206
 				{
209 207
 					if(($classPath = $this->getItemRenderer()) !== '')
210 208
 					{
@@ -215,9 +213,9 @@  discard block
 block discarded – undo
215 213
 							$control->setItemType($item->getItemType());
216 214
 						}
217 215
 						$cell->getControls()->add($control);
216
+					} else {
217
+											$control = $cell;
218 218
 					}
219
-					else
220
-						$control = $cell;
221 219
 				}
222 220
 				$control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
223 221
 				break;
@@ -237,10 +235,11 @@  discard block
 block discarded – undo
237 235
 		$item = $sender->getNamingContainer();
238 236
 		$data = $item->getData();
239 237
 		$formatString = $this->getDataFormatString();
240
-		if(($field = $this->getDataField()) !== '')
241
-			$value = $this->formatDataValue($formatString, $this->getDataFieldValue($data, $field));
242
-		else
243
-			$value = $this->formatDataValue($formatString, $data);
238
+		if(($field = $this->getDataField()) !== '') {
239
+					$value = $this->formatDataValue($formatString, $this->getDataFieldValue($data, $field));
240
+		} else {
241
+					$value = $this->formatDataValue($formatString, $data);
242
+		}
244 243
 		$sender->setData($value);
245 244
 	}
246 245
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TExpression.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 	 */
56 56
 	public function render($writer)
57 57
 	{
58
-		if($this->_e !== '')
58
+		if ($this->_e !== '')
59 59
 			$writer->write($this->evaluateExpression($this->_e));
60 60
 	}
61 61
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@
 block discarded – undo
55 55
 	 */
56 56
 	public function render($writer)
57 57
 	{
58
-		if($this->_e !== '')
59
-			$writer->write($this->evaluateExpression($this->_e));
58
+		if($this->_e !== '') {
59
+					$writer->write($this->evaluateExpression($this->_e));
60
+		}
60 61
 	}
61 62
 }
62 63
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TReCaptcha2.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 		{
116 116
 			if ($this->getClientID() == $captcha->ClientID)
117 117
 			{
118
-				$responseFieldName .= ($cont > 0) ? '-' . $cont : '';
118
+				$responseFieldName .= ($cont > 0) ? '-'.$cont : '';
119 119
 			}
120 120
 			$cont++;
121 121
 		}
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	public function validate()
293 293
 	{
294 294
 		$value = $this->getValidationPropertyValue();
295
-		if($value === null || empty($value))
295
+		if ($value === null || empty($value))
296 296
 			return false;
297 297
 
298 298
 		return true;
@@ -305,14 +305,14 @@  discard block
 block discarded – undo
305 305
 	{
306 306
 		parent::onPreRender($param);
307 307
 
308
-		if("" == $this->getSiteKey())
308
+		if ("" == $this->getSiteKey())
309 309
 			throw new TConfigurationException('recaptcha_publickey_unknown');
310
-		if("" == $this->getSecretKey())
310
+		if ("" == $this->getSecretKey())
311 311
 			throw new TConfigurationException('recaptcha_privatekey_unknown');
312 312
 
313 313
 		// need to register captcha fields so they will be sent postback
314 314
 		$this->Page->registerRequiresPostData($this->getResponseFieldName());
315
-		$this->Page->ClientScript->registerHeadScriptFile('grecaptcha2', 'https://www.google.com/recaptcha/api.js?onload=TReCaptcha2_onloadCallback&render=explicit&hl=' . $this->getLanguage());
315
+		$this->Page->ClientScript->registerHeadScriptFile('grecaptcha2', 'https://www.google.com/recaptcha/api.js?onload=TReCaptcha2_onloadCallback&render=explicit&hl='.$this->getLanguage());
316 316
 	}
317 317
 	protected function addAttributesToRender($writer)
318 318
 	{
Please login to merge, or discard this patch.
Braces   +21 added lines, -10 removed lines patch added patch discarded remove patch
@@ -271,10 +271,18 @@  discard block
 block discarded – undo
271 271
 		$options['onCallback'] = $this->hasEventHandler('OnCallback');
272 272
 		$options['onCallbackExpired'] = $this->hasEventHandler('OnCallbackExpired');
273 273
 		$options['options']['sitekey'] = $this->getSiteKey();
274
-		if ($theme = $this->getTheme()) $options['options']['theme'] = $theme;
275
-		if ($type = $this->getType()) $options['options']['type'] = $type;
276
-		if ($size = $this->getSize()) $options['options']['size'] = $size;
277
-		if ($tabIndex = $this->getTabIndex()) $options['options']['tabindex'] = $tabIndex;
274
+		if ($theme = $this->getTheme()) {
275
+			$options['options']['theme'] = $theme;
276
+		}
277
+		if ($type = $this->getType()) {
278
+			$options['options']['type'] = $type;
279
+		}
280
+		if ($size = $this->getSize()) {
281
+			$options['options']['size'] = $size;
282
+		}
283
+		if ($tabIndex = $this->getTabIndex()) {
284
+			$options['options']['tabindex'] = $tabIndex;
285
+		}
278 286
 
279 287
 		return $options;
280 288
 	}
@@ -292,8 +300,9 @@  discard block
 block discarded – undo
292 300
 	public function validate()
293 301
 	{
294 302
 		$value = $this->getValidationPropertyValue();
295
-		if($value === null || empty($value))
296
-			return false;
303
+		if($value === null || empty($value)) {
304
+					return false;
305
+		}
297 306
 
298 307
 		return true;
299 308
 	}
@@ -305,10 +314,12 @@  discard block
 block discarded – undo
305 314
 	{
306 315
 		parent::onPreRender($param);
307 316
 
308
-		if("" == $this->getSiteKey())
309
-			throw new TConfigurationException('recaptcha_publickey_unknown');
310
-		if("" == $this->getSecretKey())
311
-			throw new TConfigurationException('recaptcha_privatekey_unknown');
317
+		if("" == $this->getSiteKey()) {
318
+					throw new TConfigurationException('recaptcha_publickey_unknown');
319
+		}
320
+		if("" == $this->getSecretKey()) {
321
+					throw new TConfigurationException('recaptcha_privatekey_unknown');
322
+		}
312 323
 
313 324
 		// need to register captcha fields so they will be sent postback
314 325
 		$this->Page->registerRequiresPostData($this->getResponseFieldName());
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THead.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function addParsedObject($object)
75 75
 	{
76
-		if($object instanceof TMetaTag)
76
+		if ($object instanceof TMetaTag)
77 77
 			$this->getMetaTags()->add($object);
78 78
 		else
79 79
 			parent::addParsedObject($object);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function getMetaTags()
137 137
 	{
138
-		if(($metaTags = $this->getViewState('MetaTags', null)) === null)
138
+		if (($metaTags = $this->getViewState('MetaTags', null)) === null)
139 139
 		{
140 140
 			$metaTags = new TMetaTagCollection;
141 141
 			$this->setViewState('MetaTags', $metaTags, null);
@@ -151,15 +151,15 @@  discard block
 block discarded – undo
151 151
 	{
152 152
 		$page = $this->getPage();
153 153
 		$title = $this->getTitle();
154
-		$writer->write("<head>\n<title>" . THttpUtility::htmlEncode($title) . "</title>\n");
155
-		if(($baseUrl = $this->getBaseUrl()) !== '')
156
-			$writer->write('<base href="' . $baseUrl . "\" />\n");
157
-		if(($icon = $this->getShortcutIcon()) !== '')
158
-			$writer->write('<link rel="shortcut icon" href="' . $icon . "\" />\n");
154
+		$writer->write("<head>\n<title>".THttpUtility::htmlEncode($title)."</title>\n");
155
+		if (($baseUrl = $this->getBaseUrl()) !== '')
156
+			$writer->write('<base href="'.$baseUrl."\" />\n");
157
+		if (($icon = $this->getShortcutIcon()) !== '')
158
+			$writer->write('<link rel="shortcut icon" href="'.$icon."\" />\n");
159 159
 
160
-		if(($metaTags = $this->getMetaTags()) !== null)
160
+		if (($metaTags = $this->getMetaTags()) !== null)
161 161
 		{
162
-			foreach($metaTags as $metaTag)
162
+			foreach ($metaTags as $metaTag)
163 163
 			{
164 164
 				$metaTag->render($writer);
165 165
 				$writer->writeLine();
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		$cs = $page->getClientScript();
169 169
 		$cs->renderStyleSheetFiles($writer);
170 170
 		$cs->renderStyleSheets($writer);
171
-		if($page->getClientSupportsJavaScript())
171
+		if ($page->getClientSupportsJavaScript())
172 172
 		{
173 173
 			$cs->renderHeadScriptFiles($writer);
174 174
 			$cs->renderHeadScripts($writer);
Please login to merge, or discard this patch.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -73,10 +73,11 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function addParsedObject($object)
75 75
 	{
76
-		if($object instanceof TMetaTag)
77
-			$this->getMetaTags()->add($object);
78
-		else
79
-			parent::addParsedObject($object);
76
+		if($object instanceof TMetaTag) {
77
+					$this->getMetaTags()->add($object);
78
+		} else {
79
+					parent::addParsedObject($object);
80
+		}
80 81
 	}
81 82
 
82 83
 	/**
@@ -152,10 +153,12 @@  discard block
 block discarded – undo
152 153
 		$page = $this->getPage();
153 154
 		$title = $this->getTitle();
154 155
 		$writer->write("<head>\n<title>" . THttpUtility::htmlEncode($title) . "</title>\n");
155
-		if(($baseUrl = $this->getBaseUrl()) !== '')
156
-			$writer->write('<base href="' . $baseUrl . "\" />\n");
157
-		if(($icon = $this->getShortcutIcon()) !== '')
158
-			$writer->write('<link rel="shortcut icon" href="' . $icon . "\" />\n");
156
+		if(($baseUrl = $this->getBaseUrl()) !== '') {
157
+					$writer->write('<base href="' . $baseUrl . "\" />\n");
158
+		}
159
+		if(($icon = $this->getShortcutIcon()) !== '') {
160
+					$writer->write('<link rel="shortcut icon" href="' . $icon . "\" />\n");
161
+		}
159 162
 
160 163
 		if(($metaTags = $this->getMetaTags()) !== null)
161 164
 		{
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TContent.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 	 */
44 44
 	public function createdOnTemplate($parent)
45 45
 	{
46
-		if(($id = $this->getID()) === '')
46
+		if (($id = $this->getID()) === '')
47 47
 			throw new TConfigurationException('content_id_required');
48 48
 		$this->getTemplateControl()->registerContent($id, $this);
49 49
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,9 @@
 block discarded – undo
43 43
 	 */
44 44
 	public function createdOnTemplate($parent)
45 45
 	{
46
-		if(($id = $this->getID()) === '')
47
-			throw new TConfigurationException('content_id_required');
46
+		if(($id = $this->getID()) === '') {
47
+					throw new TConfigurationException('content_id_required');
48
+		}
48 49
 		$this->getTemplateControl()->registerContent($id, $this);
49 50
 	}
50 51
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THiddenField.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,16 +59,16 @@  discard block
 block discarded – undo
59 59
 		$uniqueID = $this->getUniqueID();
60 60
 		$this->getPage()->ensureRenderInForm($this);
61 61
 		$writer->addAttribute('type', 'hidden');
62
-		if($uniqueID !== '')
62
+		if ($uniqueID !== '')
63 63
 			$writer->addAttribute('name', $uniqueID);
64
-		if($this->getID() !== '')
64
+		if ($this->getID() !== '')
65 65
 			$writer->addAttribute('id', $this->getClientID());
66
-		if(($value = $this->getValue()) !== '')
66
+		if (($value = $this->getValue()) !== '')
67 67
 			$writer->addAttribute('value', $value);
68 68
 
69
-		if($this->getHasAttributes())
69
+		if ($this->getHasAttributes())
70 70
 		{
71
-			foreach($this->getAttributes() as $name => $value)
71
+			foreach ($this->getAttributes() as $name => $value)
72 72
 				$writer->addAttribute($name, $value);
73 73
 		}
74 74
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	public function loadPostData($key, $values)
87 87
 	{
88 88
 		$value = $values[$key];
89
-		if($value === $this->getValue())
89
+		if ($value === $this->getValue())
90 90
 			return false;
91 91
 		else
92 92
 		{
Please login to merge, or discard this patch.
Braces   +15 added lines, -11 removed lines patch added patch discarded remove patch
@@ -59,17 +59,21 @@  discard block
 block discarded – undo
59 59
 		$uniqueID = $this->getUniqueID();
60 60
 		$this->getPage()->ensureRenderInForm($this);
61 61
 		$writer->addAttribute('type', 'hidden');
62
-		if($uniqueID !== '')
63
-			$writer->addAttribute('name', $uniqueID);
64
-		if($this->getID() !== '')
65
-			$writer->addAttribute('id', $this->getClientID());
66
-		if(($value = $this->getValue()) !== '')
67
-			$writer->addAttribute('value', $value);
62
+		if($uniqueID !== '') {
63
+					$writer->addAttribute('name', $uniqueID);
64
+		}
65
+		if($this->getID() !== '') {
66
+					$writer->addAttribute('id', $this->getClientID());
67
+		}
68
+		if(($value = $this->getValue()) !== '') {
69
+					$writer->addAttribute('value', $value);
70
+		}
68 71
 
69 72
 		if($this->getHasAttributes())
70 73
 		{
71
-			foreach($this->getAttributes() as $name => $value)
72
-				$writer->addAttribute($name, $value);
74
+			foreach($this->getAttributes() as $name => $value) {
75
+							$writer->addAttribute($name, $value);
76
+			}
73 77
 		}
74 78
 
75 79
 		$writer->renderBeginTag('input');
@@ -86,9 +90,9 @@  discard block
 block discarded – undo
86 90
 	public function loadPostData($key, $values)
87 91
 	{
88 92
 		$value = $values[$key];
89
-		if($value === $this->getValue())
90
-			return false;
91
-		else
93
+		if($value === $this->getValue()) {
94
+					return false;
95
+		} else
92 96
 		{
93 97
 			$this->setValue($value);
94 98
 			return $this->_dataChanged = true;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRegularExpressionValidator.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,9 +79,9 @@
 block discarded – undo
79 79
 	 */
80 80
 	public function evaluateIsValid()
81 81
 	{
82
-		if(($value = $this->getValidationValue($this->getValidationTarget())) === '')
82
+		if (($value = $this->getValidationValue($this->getValidationTarget())) === '')
83 83
 			return true;
84
-		if(($expression = addcslashes($this->getRegularExpression(), "/")) !== '')
84
+		if (($expression = addcslashes($this->getRegularExpression(), "/")) !== '')
85 85
 		{
86 86
 			$mods = $this->getPatternModifiers();
87 87
 			return preg_match("/^$expression\$/{$mods}", $value);
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,15 +79,16 @@
 block discarded – undo
79 79
 	 */
80 80
 	public function evaluateIsValid()
81 81
 	{
82
-		if(($value = $this->getValidationValue($this->getValidationTarget())) === '')
83
-			return true;
82
+		if(($value = $this->getValidationValue($this->getValidationTarget())) === '') {
83
+					return true;
84
+		}
84 85
 		if(($expression = addcslashes($this->getRegularExpression(), "/")) !== '')
85 86
 		{
86 87
 			$mods = $this->getPatternModifiers();
87 88
 			return preg_match("/^$expression\$/{$mods}", $value);
89
+		} else {
90
+					return true;
88 91
 		}
89
-		else
90
-			return true;
91 92
 	}
92 93
 
93 94
 	/**
Please login to merge, or discard this patch.