Completed
Push — remove_deprecates ( 1de955...c03db3 )
by Fabio
16:32 queued 07:25
created
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.
framework/Web/UI/TPage.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -204,8 +204,7 @@  discard block
 block discarded – undo
204 204
 				$this->processCallbackRequest($writer);
205 205
 			else
206 206
 				$this->processPostBackRequest($writer);
207
-		}
208
-		else
207
+		} else
209 208
 			$this->processNormalRequest($writer);
210 209
 
211 210
 		$this->_writer = null;
@@ -494,8 +493,7 @@  discard block
 block discarded – undo
494 493
 			{
495 494
 				foreach($this->_validators as $validator)
496 495
 					$validator->validate();
497
-			}
498
-			else
496
+			} else
499 497
 			{
500 498
 				foreach($this->_validators as $validator)
501 499
 				{
@@ -523,8 +521,7 @@  discard block
 block discarded – undo
523 521
 						return false;
524 522
 			}
525 523
 			return true;
526
-		}
527
-		else
524
+		} else
528 525
 			throw new TInvalidOperationException('page_isvalid_unknown');
529 526
 	}
530 527
 
@@ -878,15 +875,13 @@  discard block
 block discarded – undo
878 875
 				{
879 876
 					if($control->loadPostData($key,$postData))
880 877
 						$this->_controlsPostDataChanged[]=$control;
881
-				}
882
-				else if($control instanceof IPostBackEventHandler &&
878
+				} else if($control instanceof IPostBackEventHandler &&
883 879
 					empty($this->_postData[self::FIELD_POSTBACK_TARGET]))
884 880
 				{
885 881
 					$this->_postData->add(self::FIELD_POSTBACK_TARGET,$key);  // not calling setPostBackEventTarget() because the control may be removed later
886 882
 				}
887 883
 				unset($this->_controlsRequiringPostData[$key]);
888
-			}
889
-			else if($beforeLoad)
884
+			} else if($beforeLoad)
890 885
 				$this->_restPostData->add($key,$value);
891 886
 		}
892 887
 
@@ -898,8 +893,7 @@  discard block
 block discarded – undo
898 893
 				{
899 894
 					if($control->loadPostData($key,$this->_postData))
900 895
 						$this->_controlsPostDataChanged[]=$control;
901
-				}
902
-				else
896
+				} else
903 897
 					throw new TInvalidDataValueException('page_postbackcontrol_invalid',$key);
904 898
 				unset($this->_controlsRequiringPostData[$key]);
905 899
 			}
@@ -978,8 +972,7 @@  discard block
 block discarded – undo
978 972
 			else
979 973
 				$focus=$this->_focus;
980 974
 			$this->getClientScript()->registerFocusControl($focus);
981
-		}
982
-		else if($this->_postData && ($lastFocus=$this->_postData->itemAt(self::FIELD_LASTFOCUS))!==null)
975
+		} else if($this->_postData && ($lastFocus=$this->_postData->itemAt(self::FIELD_LASTFOCUS))!==null)
983 976
 			$this->getClientScript()->registerFocusControl($lastFocus);
984 977
 		$this->_inFormRender=false;
985 978
 	}
Please login to merge, or discard this patch.
framework/Web/UI/TControlCollection.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
63 63
 		{
64 64
 			parent::insertAt($index,$item);
65 65
 			$this->_o->addedControl($item);
66
-		}
67
-		else if(is_string($item) || ($item instanceof IRenderable))
66
+		} else if(is_string($item) || ($item instanceof IRenderable))
68 67
 			parent::insertAt($index,$item);
69 68
 		else
70 69
 			throw new TInvalidDataTypeException('controlcollection_control_required');
Please login to merge, or discard this patch.