Completed
Push — remove_deprecates ( 1de955 )
by Fabio
07:55
created
framework/Web/THttpRequest.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -232,8 +232,7 @@  discard block
 block discarded – undo
232 232
 				$port=$_SERVER['SERVER_PORT'];
233 233
 				if(($port!=80 && !$secure) || ($port!=443 && $secure))
234 234
 					$url.=':'.$port;
235
-			}
236
-			else
235
+			} else
237 236
 				$url.=$_SERVER['HTTP_HOST'];
238 237
 			$url.=$this->getRequestUri();
239 238
 			$this->_url=new TUri($url);
@@ -341,8 +340,7 @@  discard block
 block discarded – undo
341 340
 				{
342 341
 					$this->_urlManager=new TUrlManager;
343 342
 					$this->_urlManager->init(null);
344
-				}
345
-				else
343
+				} else
346 344
 				{
347 345
 					$this->_urlManager=$this->getApplication()->getModule($this->_urlManagerID);
348 346
 					if($this->_urlManager===null)
@@ -462,8 +460,7 @@  discard block
 block discarded – undo
462 460
 
463 461
 		if($result === null && function_exists('apache_request_headers')) {
464 462
 			$result = apache_request_headers();
465
-		}
466
-		elseif($result === null) {
463
+		} elseif($result === null) {
467 464
 			$result = array();
468 465
 			foreach($_SERVER as $key=>$value) {
469 466
 				if(strncasecmp($key, 'HTTP_', 5) !== 0) continue;
@@ -566,8 +563,7 @@  discard block
 block discarded – undo
566 563
 		try
567 564
 		{
568 565
 			return get_browser();
569
-		}
570
-		catch(TPhpErrorException $e)
566
+		} catch(TPhpErrorException $e)
571 567
 		{
572 568
 			throw new TConfigurationException('httprequest_browscap_required');
573 569
 		}
@@ -670,8 +666,7 @@  discard block
 block discarded – undo
670 666
 					if(($value=$sm->validateData($value))!==false)
671 667
 						$this->_cookies->add(new THttpCookie($key,$value));
672 668
 				}
673
-			}
674
-			else
669
+			} else
675 670
 			{
676 671
 				foreach($_COOKIE as $key=>$value)
677 672
 					$this->_cookies->add(new THttpCookie($key,$value));
@@ -888,8 +883,7 @@  discard block
 block discarded – undo
888 883
 			$value=$this->_items[$key];
889 884
 			unset($this->_items[$key]);
890 885
 			return $value;
891
-		}
892
-		else
886
+		} else
893 887
 			return null;
894 888
 	}
895 889
 
Please login to merge, or discard this patch.
framework/Web/Services/TPageService.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -239,8 +239,7 @@  discard block
 block discarded – undo
239 239
 					$pageConfig->loadPageConfigurationFromXml($config,$application->getBasePath(),'');
240 240
 			}
241 241
 			$pageConfig->loadFromFiles($this->getBasePath());
242
-		}
243
-		else
242
+		} else
244 243
 		{
245 244
 			$configCached=true;
246 245
 			$currentTimestamp=array();
@@ -258,8 +257,7 @@  discard block
 block discarded – undo
258 257
 							$currentTimestamp[0]=$appConfigFile===null?0:@filemtime($appConfigFile);
259 258
 							if($currentTimestamp[0]>$timestamp || ($timestamp>0 && !$currentTimestamp[0]))
260 259
 								$configCached=false;
261
-						}
262
-						else
260
+						} else
263 261
 						{
264 262
 							$currentTimestamp[$fileName]=@filemtime($fileName);
265 263
 							if($currentTimestamp[$fileName]>$timestamp || ($timestamp>0 && !$currentTimestamp[$fileName]))
@@ -267,8 +265,7 @@  discard block
 block discarded – undo
267 265
 						}
268 266
 					}
269 267
 				}
270
-			}
271
-			else
268
+			} else
272 269
 			{
273 270
 				$configCached=false;
274 271
 				$paths=explode('.',$pagePath);
@@ -501,8 +498,7 @@  discard block
 block discarded – undo
501 498
 
502 499
 			if(!class_exists($className,false))
503 500
 				$className = $namespacedClassName;
504
-		}
505
-		else
501
+		} else
506 502
 		{
507 503
 			$className=$this->getBasePageClass();
508 504
 			Prado::using($className);
Please login to merge, or discard this patch.
framework/Web/Services/TJsonRpcProtocol.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,16 +78,13 @@
 block discarded – undo
78 78
 					));
79 79
 				}
80 80
 			}
81
-		}
82
-		catch(TRpcException $e)
81
+		} catch(TRpcException $e)
83 82
 		{
84 83
 			return $this->createErrorResponse($e);
85
-		}
86
-		catch(THttpException $e)
84
+		} catch(THttpException $e)
87 85
 		{
88 86
 			throw $e;
89
-		}
90
-		catch(\Exception $e)
87
+		} catch(\Exception $e)
91 88
 		{
92 89
 			return $this->createErrorResponse(new TRpcException('An internal error occured', '-32603'));
93 90
 		}
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
@@ -80,14 +80,12 @@  discard block
 block discarded – undo
80 80
 			$server->setClass($providerClass, $this);
81 81
 			if($this->_persistent)
82 82
 				$server->setPersistence(SOAP_PERSISTENCE_SESSION);
83
-		}
84
-		else
83
+		} else
85 84
 			$server=$this->createServer();
86 85
 		try
87 86
 		{
88 87
 			$server->handle();
89
-		}
90
-		catch (\Exception $e)
88
+		} catch (\Exception $e)
91 89
 		{
92 90
 			if($this->getApplication()->getMode()===TApplicationMode::Debug)
93 91
 				$this->fault($e->getMessage(), $e->__toString());
@@ -199,13 +197,11 @@  discard block
 block discarded – undo
199 197
 				$wsdl=WsdlGenerator::generate($providerClass, $this->getUri(), $this->getEncoding());
200 198
 				$cache->set(self::WSDL_CACHE_PREFIX.$providerClass,$wsdl);
201 199
 				return $wsdl;
202
-			}
203
-			else
200
+			} else
204 201
 			{
205 202
 				return WsdlGenerator::generate($providerClass, $this->getUri(), $this->getEncoding());
206 203
 			}
207
-		}
208
-		else
204
+		} else
209 205
 			return file_get_contents($this->_wsdlUri);
210 206
 	}
211 207
 
Please login to merge, or discard this patch.
framework/Web/Services/TXmlRpcProtocol.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,16 +72,13 @@
 block discarded – undo
72 72
 		try
73 73
 		{
74 74
 			return xmlrpc_server_call_method($this->_xmlrpcServer, $requestPayload, null);
75
-		}
76
-		catch(TRpcException $e)
75
+		} catch(TRpcException $e)
77 76
 		{
78 77
 			return $this->createErrorResponse($e);
79
-		}
80
-		catch(THttpException $e)
78
+		} catch(THttpException $e)
81 79
 		{
82 80
 			throw $e;
83
-		}
84
-		catch(\Exception $e)
81
+		} catch(\Exception $e)
85 82
 		{
86 83
 			return $this->createErrorResponse(new TRpcException('An internal error occured'));
87 84
 		}
Please login to merge, or discard this patch.
framework/Web/Services/TRpcServer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
 		try
70 70
 		{
71 71
 			return $this->handler->callMethod($this->getPayload());
72
-		}
73
-		catch(TRpcException $e)
72
+		} catch(TRpcException $e)
74 73
 		{
75 74
 			return $this->handler->createErrorResponse($e);
76 75
 		}
Please login to merge, or discard this patch.
framework/Web/Services/TFeedService.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
 				foreach($config as $id => $feed)
80 80
 					$this->_feeds[$id] = $feed;
81 81
 			}
82
-		}
83
-		else
82
+		} else
84 83
 		{
85 84
 			foreach($config->getElementsByTagName('feed') as $feed)
86 85
 			{
@@ -121,11 +120,9 @@  discard block
 block discarded – undo
121 120
 						$properties=isset($feedConfig['properties'])?$feedConfig['properties']:array();
122 121
 					else
123 122
 						throw new TConfigurationException('jsonservice_response_type_invalid',$id);
124
-				}
125
-				else
123
+				} else
126 124
 					throw new TConfigurationException('jsonservice_class_required',$id);
127
-			}
128
-			else
125
+			} else
129 126
 			{
130 127
 				$properties=$feedConfig->getAttributes();
131 128
 				if(($class=$properties->remove('class'))!==null)
@@ -133,8 +130,7 @@  discard block
 block discarded – undo
133 130
 					$feed=Prado::createComponent($class);
134 131
 					if(!($feed instanceof IFeedContentProvider))
135 132
 						throw new TConfigurationException('feedservice_feedtype_invalid',$id);
136
-				}
137
-				else
133
+				} else
138 134
 					throw new TConfigurationException('feedservice_class_required',$id);
139 135
 			}
140 136
 
@@ -147,8 +143,7 @@  discard block
 block discarded – undo
147 143
 		    //$this->getResponse()->setContentType('application/rss+xml');
148 144
 		    $this->getResponse()->setContentType($feed->getContentType());
149 145
 		    $this->getResponse()->write($content);
150
-		}
151
-		else
146
+		} else
152 147
 			throw new THttpException(404,'feedservice_feed_unknown',$id);
153 148
 	}
154 149
 }
155 150
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/TUrlMappingPattern.php 1 patch
Braces   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -363,10 +363,10 @@  discard block
 block discarded – undo
363 363
 			$params=explode('/',$matches['urlparams']);
364 364
 			if ($this->_separator==='/')
365 365
 			{
366
-				while($key=array_shift($params))
367
-					$matches[$key]=($value=array_shift($params)) ? $value : '';
368
-			}
369
-			else
366
+				while($key=array_shift($params)) {
367
+									$matches[$key]=($value=array_shift($params)) ? $value : '';
368
+				}
369
+			} else
370 370
 			{
371 371
 				array_pop($params);
372 372
 				foreach($params as $param)
@@ -558,12 +558,10 @@  discard block
 block discarded – undo
558 558
 						$name=rawurlencode($name.'[]');
559 559
 						foreach($value as $v)
560 560
 							$url2.=$amp.$name.'='.rawurlencode($v);
561
-					}
562
-					else
561
+					} else
563 562
 						$url2.=$amp.rawurlencode($name).'='.rawurlencode($value);
564 563
 				}
565
-			}
566
-			else
564
+			} else
567 565
 			{
568 566
 				foreach($extra as $name=>$value)
569 567
 				{
@@ -571,8 +569,7 @@  discard block
 block discarded – undo
571 569
 					{
572 570
 						foreach($value as $v)
573 571
 							$url2.=$amp.$name.'[]='.$v;
574
-					}
575
-					else
572
+					} else
576 573
 						$url2.=$amp.$name.'='.$value;
577 574
 				}
578 575
 			}
Please login to merge, or discard this patch.
framework/Web/TUrlMapping.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -136,15 +136,13 @@  discard block
 block discarded – undo
136 136
 			{
137 137
 				$config = include $this->_configFile;
138 138
 				$this->loadUrlMappings($dom);
139
-			}
140
-			else
139
+			} else
141 140
 			{
142 141
 				$dom=new TXmlDocument;
143 142
 				$dom->loadFromFile($this->_configFile);
144 143
 				$this->loadUrlMappings($dom);
145 144
 			}
146
-		}
147
-		else
145
+		} else
148 146
 			throw new TConfigurationException('urlmapping_configfile_inexistent',$this->_configFile);
149 147
 	}
150 148
 
@@ -251,8 +249,7 @@  discard block
 block discarded – undo
251 249
 					$this->buildUrlMapping($class,$properties,$url);
252 250
 				}
253 251
 			}
254
-		}
255
-		else
252
+		} else
256 253
 		{
257 254
 			foreach($config->getElementsByTagName('url') as $url)
258 255
 			{
@@ -366,8 +363,7 @@  discard block
 block discarded – undo
366 363
 					if($rule->supportCustomUrl($getItems))
367 364
 						return $rule->constructUrl($getItems,$encodeAmpersand,$encodeGetItems);
368 365
 				}
369
-			}
370
-			elseif(isset($this->_constructRules[$wildCardKey]))
366
+			} elseif(isset($this->_constructRules[$wildCardKey]))
371 367
 			{
372 368
 				foreach($this->_constructRules[$wildCardKey] as $rule)
373 369
 				{
Please login to merge, or discard this patch.