Passed
Branch develop (d6f62e)
by Tito
06:29
created
extensions/libraries/redcore/form/fields/rmedia.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
 					'showHeaderClose' => true,
275 275
 					'title' => $modalTitle,
276 276
 					'link' => $link,
277
-					'events' => array (
277
+					'events' => array(
278 278
 						'onload' => 'jSetIframeHeight'
279 279
 					)
280 280
 				)
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -173,8 +173,7 @@  discard block
 block discarded – undo
173 173
 			if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value))
174 174
 			{
175 175
 				$src = JUri::root() . $this->value;
176
-			}
177
-			else
176
+			} else
178 177
 			{
179 178
 				$src = '';
180 179
 			}
@@ -208,8 +207,7 @@  discard block
 block discarded – undo
208 207
 				{
209 208
 					$options['text'] = '<i class="icon-eye-open"></i>';
210 209
 					$options['class'] = 'hasTipPreview';
211
-				}
212
-				else
210
+				} else
213 211
 				{
214 212
 					$options['text'] = '<i class="glyphicon glyphicon-eye-open"></i>';
215 213
 					$options['data-toggle'] = 'tooltip';
@@ -217,8 +215,7 @@  discard block
 block discarded – undo
217 215
 
218 216
 				$html[] = RHtml::tooltip($tooltip, $options);
219 217
 				$html[] = '</div>';
220
-			}
221
-			else
218
+			} else
222 219
 			{
223 220
 				$html[] = '<div class="media-preview add-on input-group-addon" style="height:auto">';
224 221
 				$html[] = ' ' . $previewImgEmpty;
@@ -240,12 +237,10 @@  discard block
 block discarded – undo
240 237
 			$folder = array_diff_assoc($folder, explode('/', JComponentHelper::getParams('com_media')->get('image_path', 'images')));
241 238
 			array_pop($folder);
242 239
 			$folder = implode('/', $folder);
243
-		}
244
-		elseif (file_exists(JPATH_ROOT . '/' . JComponentHelper::getParams('com_media')->get('image_path', 'images') . '/' . $directory))
240
+		} elseif (file_exists(JPATH_ROOT . '/' . JComponentHelper::getParams('com_media')->get('image_path', 'images') . '/' . $directory))
245 241
 		{
246 242
 			$folder = $directory;
247
-		}
248
-		else
243
+		} else
249 244
 		{
250 245
 			$folder = '';
251 246
 		}
Please login to merge, or discard this patch.
extensions/libraries/redcore/form/fields/rordering.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
 		{
53 53
 			$html[] = JHtml::_('list.ordering', '', $query, trim($attr), $this->value, $itemId ? 0 : 1);
54 54
 			$html[] = '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '"/>';
55
-		}
56
-		else
55
+		} else
57 56
 		{
58 57
 			// Create a regular list.
59 58
 			$html[] = JHtml::_('list.ordering', $this->name, $query, trim($attr), $this->value, $itemId ? 0 : 1);
Please login to merge, or discard this patch.
extensions/libraries/redcore/form/fields/rdatepicker.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -160,12 +160,10 @@  discard block
 block discarded – undo
160 160
 				if (is_bool($value))
161 161
 				{
162 162
 					$this->$name = $value;
163
-				}
164
-				elseif ($value == 'true')
163
+				} elseif ($value == 'true')
165 164
 				{
166 165
 					$this->$name = true;
167
-				}
168
-				else
166
+				} else
169 167
 				{
170 168
 					$this->$name = false;
171 169
 				}
@@ -199,8 +197,7 @@  discard block
 block discarded – undo
199 197
 		{
200 198
 			$phpFormat .= ' H:i:s';
201 199
 			$this->picker = 'datetimepicker';
202
-		}
203
-		else
200
+		} else
204 201
 		{
205 202
 			$this->picker = 'datepicker';
206 203
 		}
@@ -242,8 +239,7 @@  discard block
 block discarded – undo
242 239
 		{
243 240
 			$class = ' class="' . (string) $this->element['class'] . '"';
244 241
 			$this->fieldHtml = '<div id="' . $this->getId($id, $this->element['name']) . '" ' . $class . '></div>';
245
-		}
246
-		else
242
+		} else
247 243
 		{
248 244
 			$this->fieldHtml = parent::getInput();
249 245
 		}
@@ -279,28 +275,24 @@  discard block
 block discarded – undo
279 275
 				if ($escaping)
280 276
 				{
281 277
 					$escaping = false;
282
-				}
283
-				else
278
+				} else
284 279
 				{
285 280
 					$i++;
286 281
 					$phpFormat .= '\\' . $jQueryFormat[$i];
287 282
 					$escaping = true;
288 283
 				}
289
-			}
290
-			else
284
+			} else
291 285
 			{
292 286
 				if ($escaping || !($findMatch = $this->findMatch(substr($jQueryFormat, $i))))
293 287
 				{
294 288
 					if ($char == ' ')
295 289
 					{
296 290
 						$phpFormat .= $char;
297
-					}
298
-					else
291
+					} else
299 292
 					{
300 293
 						$phpFormat .= "\\" . $char;
301 294
 					}
302
-				}
303
-				else
295
+				} else
304 296
 				{
305 297
 					$phpFormat .= $this->symbolsMatching[$findMatch];
306 298
 					$i += strlen($findMatch) - 1;
Please login to merge, or discard this patch.
extensions/libraries/redcore/form/fields/timepicker.php 1 patch
Braces   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,9 +69,7 @@
 block discarded – undo
69 69
 		if (empty($this->value))
70 70
 		{
71 71
 			$defaultTime = $this->element['default'] ? $this->element['default'] : 'current';
72
-		}
73
-
74
-		else
72
+		} else
75 73
 		{
76 74
 			$defaultTime = 'value';
77 75
 		}
Please login to merge, or discard this patch.
extensions/libraries/redcore/form/rules/integer.php 1 patch
Braces   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,9 +42,7 @@
 block discarded – undo
42 42
 		if (isset($element['signed']) && RHelperString::toBool($element['signed']))
43 43
 		{
44 44
 			$pattern = '/^[+\-]\d+$/';
45
-		}
46
-
47
-		else
45
+		} else
48 46
 		{
49 47
 			$pattern = '/^\d+$/';
50 48
 		}
Please login to merge, or discard this patch.
extensions/libraries/redcore/form/rules/date.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@
 block discarded – undo
47 47
 		try
48 48
 		{
49 49
 			$date = DateTime::createFromFormat($element['format'], $value);
50
-		}
51
-		catch (Exception $e)
50
+		} catch (Exception $e)
52 51
 		{
53 52
 			return false;
54 53
 		}
Please login to merge, or discard this patch.
extensions/libraries/redcore/form/rules/rangedate.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@  discard block
 block discarded – undo
48 48
 		try
49 49
 		{
50 50
 			$date = DateTime::createFromFormat($element['format'], $value);
51
-		}
52
-		catch (Exception $e)
51
+		} catch (Exception $e)
53 52
 		{
54 53
 			throw new InvalidArgumentException('Invalid "format" specified for the range date rule.');
55 54
 		}
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
 			try
72 71
 			{
73 72
 				$minDate = DateTime::createFromFormat($element['format'], $element['min']);
74
-			}
75
-			catch (Exception $e)
73
+			} catch (Exception $e)
76 74
 			{
77 75
 				throw new InvalidArgumentException('Invalid "min" date specified for the range date rule.');
78 76
 			}
@@ -94,8 +92,7 @@  discard block
 block discarded – undo
94 92
 			try
95 93
 			{
96 94
 				$maxDate = DateTime::createFromFormat($element['format'], $element['max']);
97
-			}
98
-			catch (Exception $e)
95
+			} catch (Exception $e)
99 96
 			{
100 97
 				throw new InvalidArgumentException('Invalid "max" date specified for the range date rule');
101 98
 			}
Please login to merge, or discard this patch.
extensions/libraries/redcore/form/form.php 1 patch
Braces   +5 added lines, -11 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 					if ($element['label'])
50 50
 					{
51 51
 						$message = JText::_($element['label']);
52
-					}
53
-					else
52
+					} else
54 53
 					{
55 54
 						$message = JText::_($element['name']);
56 55
 					}
@@ -100,8 +99,7 @@  discard block
 block discarded – undo
100 99
 					$message = RText::replace($message, $tags);
101 100
 
102 101
 					return new UnexpectedValueException($message);
103
-				}
104
-				else
102
+				} else
105 103
 				{
106 104
 					$message = JText::_($element['label']);
107 105
 					$message = JText::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID', $message);
@@ -113,9 +111,7 @@  discard block
 block discarded – undo
113 111
 			return true;
114 112
 		}
115 113
 	}
116
-}
117
-
118
-else
114
+} else
119 115
 {
120 116
 	/**
121 117
 	 * Form class.
@@ -155,8 +151,7 @@  discard block
 block discarded – undo
155 151
 					if ($element['label'])
156 152
 					{
157 153
 						$message = JText::_($element['label']);
158
-					}
159
-					else
154
+					} else
160 155
 					{
161 156
 						$message = JText::_($element['name']);
162 157
 					}
@@ -206,8 +201,7 @@  discard block
 block discarded – undo
206 201
 					$message = RText::replace($message, $tags);
207 202
 
208 203
 					return new UnexpectedValueException($message);
209
-				}
210
-				else
204
+				} else
211 205
 				{
212 206
 					$message = JText::_($element['label']);
213 207
 					$message = JText::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID', $message);
Please login to merge, or discard this patch.
extensions/libraries/redcore/api/soap/helper.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
58 58
 			{
59 59
 				$webserviceInstance = RApiHalHelper::getInstalledWebservice($client, $name, $version);
60 60
 				$wsPath = $webserviceInstance['path'];
61
-			}
62
-			else
61
+			} else
63 62
 			{
64 63
 				$wsPath = $webservicePath;
65 64
 			}
@@ -100,8 +99,7 @@  discard block
 block discarded – undo
100 99
 
101 100
 			// Complex type
102 101
 			$complexType = $element->addChild('complexType', null, 'http://www.w3.org/2001/XMLSchema');
103
-		}
104
-		else
102
+		} else
105 103
 		{
106 104
 			// Complex type
107 105
 			$complexType = $typeSchema->addChild('complexType', null, 'http://www.w3.org/2001/XMLSchema');
@@ -126,8 +124,7 @@  discard block
 block discarded – undo
126 124
 						$transformType = 'arraycomplex';
127 125
 						$additionalFields = $complexArrays->{$matches[1]}->field;
128 126
 						$fieldValidateOptional = true;
129
-					}
130
-					else
127
+					} else
131 128
 					{
132 129
 						$transformType = 'array';
133 130
 					}
@@ -187,8 +184,7 @@  discard block
 block discarded – undo
187 184
 						if ($namesOnly)
188 185
 						{
189 186
 							$outputResources[] = RApiHalHelper::attributeToString($resource, 'displayName');
190
-						}
191
-						else
187
+						} else
192 188
 						{
193 189
 							$resource->addAttribute('name', $resource['displayName']);
194 190
 							$outputResources[] = $resource;
@@ -377,8 +373,7 @@  discard block
 block discarded – undo
377 373
 			if (is_dir($file))
378 374
 			{
379 375
 				self::generateWsdlFromFolder($file);
380
-			}
381
-			elseif (is_file($file))
376
+			} elseif (is_file($file))
382 377
 			{
383 378
 				// Only handle XML files
384 379
 				if (JFile::getExt($file) == 'xml')
Please login to merge, or discard this patch.