Completed
Push — php-cs-fixer ( b6f93e...b9836a )
by Fabio
07:15
created
framework/Web/Services/TFeedService.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -80,8 +80,7 @@  discard block
 block discarded – undo
80 80
 				foreach($config as $id => $feed)
81 81
 					$this->_feeds[$id] = $feed;
82 82
 			}
83
-		}
84
-		else
83
+		} else
85 84
 		{
86 85
 			foreach($config->getElementsByTagName('feed') as $feed)
87 86
 			{
@@ -122,11 +121,9 @@  discard block
 block discarded – undo
122 121
 						$properties = isset($feedConfig['properties'])?$feedConfig['properties']:[];
123 122
 					else
124 123
 						throw new TConfigurationException('jsonservice_response_type_invalid', $id);
125
-				}
126
-				else
124
+				} else
127 125
 					throw new TConfigurationException('jsonservice_class_required', $id);
128
-			}
129
-			else
126
+			} else
130 127
 			{
131 128
 				$properties = $feedConfig->getAttributes();
132 129
 				if(($class = $properties->remove('class')) !== null)
@@ -134,8 +131,7 @@  discard block
 block discarded – undo
134 131
 					$feed = Prado::createComponent($class);
135 132
 					if(!($feed instanceof IFeedContentProvider))
136 133
 						throw new TConfigurationException('feedservice_feedtype_invalid', $id);
137
-				}
138
-				else
134
+				} else
139 135
 					throw new TConfigurationException('feedservice_class_required', $id);
140 136
 			}
141 137
 
@@ -148,8 +144,7 @@  discard block
 block discarded – undo
148 144
 			//$this->getResponse()->setContentType('application/rss+xml');
149 145
 			$this->getResponse()->setContentType($feed->getContentType());
150 146
 			$this->getResponse()->write($content);
151
-		}
152
-		else
147
+		} else
153 148
 			throw new THttpException(404, 'feedservice_feed_unknown', $id);
154 149
 	}
155 150
 }
156 151
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/Services/TSoapService.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -126,8 +126,7 @@  discard block
 block discarded – undo
126 126
 				$dom = new TXmlDocument;
127 127
 				$dom->loadFromFile($this->_configFile);
128 128
 				$this->loadConfig($dom);
129
-			}
130
-			else
129
+			} else
131 130
 				throw new TConfigurationException('soapservice_configfile_invalid', $this->_configFile);
132 131
 		}
133 132
 		$this->loadConfig($config);
@@ -149,8 +148,7 @@  discard block
 block discarded – undo
149 148
 		{
150 149
 			$serverID = substr($serverID, 0, $pos);
151 150
 			$this->_wsdlRequest = true;
152
-		}
153
-		else
151
+		} else
154 152
 			$this->_wsdlRequest = false;
155 153
 		$this->_serverID = $serverID;
156 154
 		if(!isset($this->_servers[$serverID]))
@@ -176,8 +174,7 @@  discard block
 block discarded – undo
176 174
 					$this->_servers[$id] = $properties;
177 175
 				}
178 176
 			}
179
-		}
180
-		else
177
+		} else
181 178
 		{
182 179
 			foreach($config->getElementsByTagName('soap') as $serverXML)
183 180
 			{
@@ -284,8 +281,7 @@  discard block
 block discarded – undo
284 281
 			Prado::trace("Generating WSDL", 'Prado\Web\Services\TSoapService');
285 282
 			$this->getResponse()->clear();
286 283
 			$this->getResponse()->write($server->getWsdl());
287
-		}
288
-		else
284
+		} else
289 285
 		{
290 286
 			// provide SOAP service
291 287
 			Prado::trace("Handling SOAP request", 'Prado\Web\Services\TSoapService');
Please login to merge, or discard this patch.
framework/Web/Services/TSoapServer.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -81,14 +81,12 @@  discard block
 block discarded – undo
81 81
 			$server->setClass($providerClass, $this);
82 82
 			if($this->_persistent)
83 83
 				$server->setPersistence(SOAP_PERSISTENCE_SESSION);
84
-		}
85
-		else
84
+		} else
86 85
 			$server = $this->createServer();
87 86
 		try
88 87
 		{
89 88
 			$server->handle();
90
-		}
91
-		catch (\Exception $e)
89
+		} catch (\Exception $e)
92 90
 		{
93 91
 			if($this->getApplication()->getMode() === TApplicationMode::Debug)
94 92
 				$this->fault($e->getMessage(), $e->__toString());
@@ -200,13 +198,11 @@  discard block
 block discarded – undo
200 198
 				$wsdl = WsdlGenerator::generate($providerClass, $this->getUri(), $this->getEncoding());
201 199
 				$cache->set(self::WSDL_CACHE_PREFIX . $providerClass, $wsdl);
202 200
 				return $wsdl;
203
-			}
204
-			else
201
+			} else
205 202
 			{
206 203
 				return WsdlGenerator::generate($providerClass, $this->getUri(), $this->getEncoding());
207 204
 			}
208
-		}
209
-		else
205
+		} else
210 206
 			return file_get_contents($this->_wsdlUri);
211 207
 	}
212 208
 
Please login to merge, or discard this patch.
framework/Web/Services/TPageConfiguration.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,8 +142,7 @@
 block discarded – undo
142 142
 		{
143 143
 			$fcontent = include $fname;
144 144
 			$this->loadFromPhp($fcontent, dirname($fname), $configPagePath);
145
-		}
146
-		else
145
+		} else
147 146
 		{
148 147
 			$dom = new TXmlDocument;
149 148
 			if($dom->loadFromFile($fname))
Please login to merge, or discard this patch.
framework/Web/Services/TJsonService.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -87,8 +87,7 @@  discard block
 block discarded – undo
87 87
 				foreach($config['json'] as $id => $json)
88 88
 					$this->_services[$id] = $json;
89 89
 			}
90
-		}
91
-		else
90
+		} else
92 91
 		{
93 92
 			foreach($config->getElementsByTagName('json') as $json)
94 93
 			{
@@ -119,14 +118,11 @@  discard block
 block discarded – undo
119 118
 					{
120 119
 						$properties = isset($serviceConfig['properties'])?$serviceConfig['properties']:[];
121 120
 						$this->createJsonResponse($service, $properties, $serviceConfig);
122
-					}
123
-					else
121
+					} else
124 122
 						throw new TConfigurationException('jsonservice_response_type_invalid', $id);
125
-				}
126
-				else
123
+				} else
127 124
 					throw new TConfigurationException('jsonservice_class_required', $id);
128
-			}
129
-			else
125
+			} else
130 126
 			{
131 127
 				$properties = $serviceConfig->getAttributes();
132 128
 				if(($class = $properties->remove('class')) !== null)
@@ -136,12 +132,10 @@  discard block
 block discarded – undo
136 132
 						$this->createJsonResponse($service, $properties, $serviceConfig);
137 133
 					else
138 134
 						throw new TConfigurationException('jsonservice_response_type_invalid', $id);
139
-				}
140
-				else
135
+				} else
141 136
 					throw new TConfigurationException('jsonservice_class_required', $id);
142 137
 			}
143
-		}
144
-		else
138
+		} else
145 139
 			throw new THttpException(404, 'jsonservice_provider_unknown', $id);
146 140
 	}
147 141
 
Please login to merge, or discard this patch.
framework/Web/TAssetManager.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -173,8 +173,7 @@  discard block
 block discarded – undo
173 173
 			if(!is_file($dst . DIRECTORY_SEPARATOR . $fileName) || $checkTimestamp || $this->getApplication()->getMode() !== TApplicationMode::Performance)
174 174
 				$this->copyFile($fullpath, $dst);
175 175
 			return $this->_published[$path] = $this->_baseUrl . '/' . $dir . '/' . $fileName;
176
-		}
177
-		else
176
+		} else
178 177
 		{
179 178
 			$dir = $this->hash($fullpath);
180 179
 			if(!is_dir($this->_basePath . DIRECTORY_SEPARATOR . $dir) || $checkTimestamp || $this->getApplication()->getMode() !== TApplicationMode::Performance)
@@ -297,8 +296,7 @@  discard block
 block discarded – undo
297 296
 						@copy($src . DIRECTORY_SEPARATOR . $file, $dst . DIRECTORY_SEPARATOR . $file);
298 297
 						@chmod($dst . DIRECTORY_SEPARATOR . $file, PRADO_CHMOD);
299 298
 					}
300
-				}
301
-				else
299
+				} else
302 300
 					$this->copyDirectory($src . DIRECTORY_SEPARATOR . $file, $dst . DIRECTORY_SEPARATOR . $file);
303 301
 			}
304 302
 			closedir($folder);
Please login to merge, or discard this patch.
framework/Web/UI/TTheme.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -117,8 +117,7 @@  discard block
 block discarded – undo
117 117
 					closedir($dir);
118 118
 					if($cacheValid)
119 119
 						$this->_skins = $skins;
120
-				}
121
-				else
120
+				} else
122 121
 				{
123 122
 					$cacheValid = true;
124 123
 					$this->_cssFiles = $cssFiles;
@@ -295,20 +294,16 @@  discard block
 block discarded – undo
295 294
 							{
296 295
 								$setter = 'set' . $name;
297 296
 								$control->$setter($value);
298
-							}
299
-							else
297
+							} else
300 298
 								throw new TConfigurationException('theme_property_readonly', $type, $name);
301
-						}
302
-						else
299
+						} else
303 300
 							throw new TConfigurationException('theme_property_undefined', $type, $name);
304
-					}
305
-					else	// complex property
301
+					} else	// complex property
306 302
 						$control->setSubProperty($name, $value);
307 303
 				}
308 304
 			}
309 305
 			return true;
310
-		}
311
-		else
306
+		} else
312 307
 			return false;
313 308
 	}
314 309
 
Please login to merge, or discard this patch.
framework/Web/UI/TTemplateControl.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
 			if(!isset(self::$_template[$class]))
73 73
 				self::$_template[$class] = $this->loadTemplate();
74 74
 			return self::$_template[$class];
75
-		}
76
-		else
75
+		} else
77 76
 			return $this->_localTemplate;
78 77
 	}
79 78
 
@@ -208,8 +207,7 @@  discard block
 block discarded – undo
208 207
 			$controls = $placeholder->getParent()->getControls();
209 208
 			$loc = $controls->remove($placeholder);
210 209
 			$controls->insertAt($loc, $content);
211
-		}
212
-		else
210
+		} else
213 211
 			throw new TConfigurationException('templatecontrol_placeholder_inexistent', $id);
214 212
 	}
215 213
 
@@ -235,8 +233,7 @@  discard block
 block discarded – undo
235 233
 			$master->ensureChildControls();
236 234
 			foreach($this->_contents as $id => $content)
237 235
 				$master->injectContent($id, $content);
238
-		}
239
-		elseif(!empty($this->_contents))
236
+		} elseif(!empty($this->_contents))
240 237
 			throw new TConfigurationException('templatecontrol_mastercontrol_required', get_class($this));
241 238
 		parent::initRecursive($namingContainer);
242 239
 	}
@@ -264,8 +261,7 @@  discard block
 block discarded – undo
264 261
 												$control->Checked = (boolean) $arObj->{$key};
265 262
 										elseif ($control instanceof TDatePicker)
266 263
 												$control->Date = $arObj->{$key};
267
-								}
268
-								else
264
+								} else
269 265
 								{
270 266
 										foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
271 267
 										{
@@ -287,8 +283,7 @@  discard block
 block discarded – undo
287 283
 										}
288 284
 										break;
289 285
 								}
290
-						}
291
-						catch (Exception $ex)
286
+						} catch (Exception $ex)
292 287
 						{
293 288
 								if ($throwExceptions)
294 289
 										throw $ex;
@@ -318,8 +313,7 @@  discard block
 block discarded – undo
318 313
 										$arObj->{$key} = $control->Checked;
319 314
 								elseif ($control instanceof TDatePicker)
320 315
 										$arObj->{$key} = $control->Date;
321
-						}
322
-						catch (Exception $ex)
316
+						} catch (Exception $ex)
323 317
 						{
324 318
 								if ($throwExceptions)
325 319
 										throw $ex;
Please login to merge, or discard this patch.
framework/Web/UI/TClientScriptManager.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -275,8 +275,7 @@  discard block
 block discarded – undo
275 275
 		if(strpos($base, $assets->getBaseUrl()) === false)
276 276
 		{
277 277
 			return [$assets->getPublishedPath($base), $assets->publishFilePath($base)];
278
-		}
279
-		else
278
+		} else
280 279
 		{
281 280
 			return [$assets->getBasePath() . str_replace($assets->getBaseUrl(), '', $base), $base];
282 281
 		}
@@ -903,8 +902,7 @@  discard block
 block discarded – undo
903 902
 			{
904 903
 				foreach($value as $v)
905 904
 					$str .= '<input type="text" style="display:none" autocomplete="off" name="' . $name . '[]" id="' . $id . '" value="' . THttpUtility::htmlEncode($value) . "\" />\n";
906
-			}
907
-			else
905
+			} else
908 906
 			{
909 907
 				$str .= '<input type="text" style="display:none" autocomplete="off" name="' . $name . '" id="' . $id . '" value="' . THttpUtility::htmlEncode($value) . "\" />\n";
910 908
 			}
Please login to merge, or discard this patch.