Completed
Push — prado-3.3 ( f4da81...5dd4b5 )
by Fabio
09:03
created
framework/Web/Services/TRpcService.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -237,8 +237,7 @@  discard block
 block discarded – undo
237 237
 		try
238 238
 		{
239 239
 			return $this->handler->callMethod($this->getPayload());
240
-		}
241
-		catch(TRpcException $e)
240
+		} catch(TRpcException $e)
242 241
 		{
243 242
 			return $this->handler->createErrorResponse($e);
244 243
 		}
@@ -498,16 +497,13 @@  discard block
 block discarded – undo
498 497
 					));
499 498
 				}
500 499
 			}
501
-		}
502
-		catch(TRpcException $e)
500
+		} catch(TRpcException $e)
503 501
 		{
504 502
 			return $this->createErrorResponse($e);
505
-		}
506
-		catch(THttpException $e)
503
+		} catch(THttpException $e)
507 504
 		{
508 505
 			throw $e;
509
-		}
510
-		catch(Exception $e)
506
+		} catch(Exception $e)
511 507
 		{
512 508
 			return $this->createErrorResponse(new TRpcException('An internal error occured', '-32603'));
513 509
 		}
@@ -662,16 +658,13 @@  discard block
 block discarded – undo
662 658
 		try
663 659
 		{
664 660
 			return xmlrpc_server_call_method($this->_xmlrpcServer, $requestPayload, null);
665
-		}
666
-		catch(TRpcException $e)
661
+		} catch(TRpcException $e)
667 662
 		{
668 663
 			return $this->createErrorResponse($e);
669
-		}
670
-		catch(THttpException $e)
664
+		} catch(THttpException $e)
671 665
 		{
672 666
 			throw $e;
673
-		}
674
-		catch(Exception $e)
667
+		} catch(Exception $e)
675 668
 		{
676 669
 			return $this->createErrorResponse(new TRpcException('An internal error occured'));
677 670
 		}
Please login to merge, or discard this patch.
framework/Web/Services/TPageService.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -232,8 +232,7 @@  discard block
 block discarded – undo
232 232
 					$pageConfig->loadPageConfigurationFromXml($config,$application->getBasePath(),'');
233 233
 			}
234 234
 			$pageConfig->loadFromFiles($this->getBasePath());
235
-		}
236
-		else
235
+		} else
237 236
 		{
238 237
 			$configCached=true;
239 238
 			$currentTimestamp=array();
@@ -251,8 +250,7 @@  discard block
 block discarded – undo
251 250
 							$currentTimestamp[0]=$appConfigFile===null?0:@filemtime($appConfigFile);
252 251
 							if($currentTimestamp[0]>$timestamp || ($timestamp>0 && !$currentTimestamp[0]))
253 252
 								$configCached=false;
254
-						}
255
-						else
253
+						} else
256 254
 						{
257 255
 							$currentTimestamp[$fileName]=@filemtime($fileName);
258 256
 							if($currentTimestamp[$fileName]>$timestamp || ($timestamp>0 && !$currentTimestamp[$fileName]))
@@ -260,8 +258,7 @@  discard block
 block discarded – undo
260 258
 						}
261 259
 					}
262 260
 				}
263
-			}
264
-			else
261
+			} else
265 262
 			{
266 263
 				$configCached=false;
267 264
 				$paths=explode('.',$pagePath);
@@ -489,8 +486,7 @@  discard block
 block discarded – undo
489 486
 			$className=basename($path);
490 487
 			if(!class_exists($className,false))
491 488
 				include_once($path.Prado::CLASS_FILE_EXT);
492
-		}
493
-		else
489
+		} else
494 490
 		{
495 491
 			$className=$this->getBasePageClass();
496 492
 			Prado::using($className);
@@ -659,8 +655,7 @@  discard block
 block discarded – undo
659 655
 		{
660 656
 			$fcontent = include $fname;
661 657
 			$this->loadFromPhp($fcontent,dirname($fname),$configPagePath);
662
-		}
663
-		else
658
+		} else
664 659
 		{
665 660
 			$dom=new TXmlDocument;
666 661
 			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
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
 				foreach($config['json'] as $id => $json)
80 80
 					$this->_services[$id] = $json;
81 81
 			}
82
-		}
83
-		else
82
+		} else
84 83
 		{
85 84
 			foreach($config->getElementsByTagName('json') as $json)
86 85
 			{
@@ -111,14 +110,11 @@  discard block
 block discarded – undo
111 110
 					{
112 111
 						$properties = isset($serviceConfig['properties'])?$serviceConfig['properties']:array();
113 112
 						$this->createJsonResponse($service,$properties,$serviceConfig);
114
-					}
115
-					else
113
+					} else
116 114
 						throw new TConfigurationException('jsonservice_response_type_invalid',$id);
117
-				}
118
-				else
115
+				} else
119 116
 					throw new TConfigurationException('jsonservice_class_required',$id);
120
-			}
121
-			else
117
+			} else
122 118
 			{
123 119
 				$properties=$serviceConfig->getAttributes();
124 120
 				if(($class=$properties->remove('class'))!==null)
@@ -128,12 +124,10 @@  discard block
 block discarded – undo
128 124
 						$this->createJsonResponse($service,$properties,$serviceConfig);
129 125
 					else
130 126
 						throw new TConfigurationException('jsonservice_response_type_invalid',$id);
131
-				}
132
-				else
127
+				} else
133 128
 					throw new TConfigurationException('jsonservice_class_required',$id);
134 129
 			}
135
-		}
136
-		else
130
+		} else
137 131
 			throw new THttpException(404,'jsonservice_provider_unknown',$id);
138 132
 	}
139 133
 
Please login to merge, or discard this patch.
framework/Web/Services/TSoapService.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -118,8 +118,7 @@  discard block
 block discarded – undo
118 118
 				$dom=new TXmlDocument;
119 119
 				$dom->loadFromFile($this->_configFile);
120 120
 				$this->loadConfig($dom);
121
-			}
122
-			else
121
+			} else
123 122
 				throw new TConfigurationException('soapservice_configfile_invalid',$this->_configFile);
124 123
 		}
125 124
 		$this->loadConfig($config);
@@ -141,8 +140,7 @@  discard block
 block discarded – undo
141 140
 		{
142 141
 			$serverID=substr($serverID,0,$pos);
143 142
 			$this->_wsdlRequest=true;
144
-		}
145
-		else
143
+		} else
146 144
 			$this->_wsdlRequest=false;
147 145
 		$this->_serverID=$serverID;
148 146
 		if(!isset($this->_servers[$serverID]))
@@ -168,8 +166,7 @@  discard block
 block discarded – undo
168 166
 					$this->_servers[$id]=$properties;
169 167
 				}
170 168
 			}
171
-		}
172
-		else
169
+		} else
173 170
 		{
174 171
 			foreach($config->getElementsByTagName('soap') as $serverXML)
175 172
 			{
@@ -276,8 +273,7 @@  discard block
 block discarded – undo
276 273
 			Prado::trace("Generating WSDL",'System.Web.Services.TSoapService');
277 274
 			$this->getResponse()->clear();
278 275
 			$this->getResponse()->write($server->getWsdl());
279
-		}
280
-		else
276
+		} else
281 277
 		{
282 278
 			// provide SOAP service
283 279
 			Prado::trace("Handling SOAP request",'System.Web.Services.TSoapService');
@@ -350,14 +346,12 @@  discard block
 block discarded – undo
350 346
 			$server->setClass($providerClass, $this);
351 347
 			if($this->_persistent)
352 348
 				$server->setPersistence(SOAP_PERSISTENCE_SESSION);
353
-		}
354
-		else
349
+		} else
355 350
 			$server=$this->createServer();
356 351
 		try
357 352
 		{
358 353
 			$server->handle();
359
-		}
360
-		catch (Exception $e)
354
+		} catch (Exception $e)
361 355
 		{
362 356
 			if($this->getApplication()->getMode()===TApplicationMode::Debug)
363 357
 				$this->fault($e->getMessage(), $e->__toString());
@@ -470,14 +464,12 @@  discard block
 block discarded – undo
470 464
 				$wsdl=WsdlGenerator::generate($providerClass, $this->getUri(), $this->getEncoding());
471 465
 				$cache->set(self::WSDL_CACHE_PREFIX.$providerClass,$wsdl);
472 466
 				return $wsdl;
473
-			}
474
-			else
467
+			} else
475 468
 			{
476 469
 				Prado::using('System.3rdParty.WsdlGen.WsdlGenerator');
477 470
 				return WsdlGenerator::generate($providerClass, $this->getUri(), $this->getEncoding());
478 471
 			}
479
-		}
480
-		else
472
+		} else
481 473
 			return file_get_contents($this->_wsdlUri);
482 474
 	}
483 475
 
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
@@ -74,8 +74,7 @@  discard block
 block discarded – undo
74 74
 				foreach($config as $id => $feed)
75 75
 					$this->_feeds[$id] = $feed;
76 76
 			}
77
-		}
78
-		else
77
+		} else
79 78
 		{
80 79
 			foreach($config->getElementsByTagName('feed') as $feed)
81 80
 			{
@@ -116,11 +115,9 @@  discard block
 block discarded – undo
116 115
 						$properties=isset($feedConfig['properties'])?$feedConfig['properties']:array();
117 116
 					else
118 117
 						throw new TConfigurationException('jsonservice_response_type_invalid',$id);
119
-				}
120
-				else
118
+				} else
121 119
 					throw new TConfigurationException('jsonservice_class_required',$id);
122
-			}
123
-			else
120
+			} else
124 121
 			{
125 122
 				$properties=$feedConfig->getAttributes();
126 123
 				if(($class=$properties->remove('class'))!==null)
@@ -128,8 +125,7 @@  discard block
 block discarded – undo
128 125
 					$feed=Prado::createComponent($class);
129 126
 					if(!($feed instanceof IFeedContentProvider))
130 127
 						throw new TConfigurationException('feedservice_feedtype_invalid',$id);
131
-				}
132
-				else
128
+				} else
133 129
 					throw new TConfigurationException('feedservice_class_required',$id);
134 130
 			}
135 131
 
@@ -142,8 +138,7 @@  discard block
 block discarded – undo
142 138
 		    //$this->getResponse()->setContentType('application/rss+xml');
143 139
 		    $this->getResponse()->setContentType($feed->getContentType());
144 140
 		    $this->getResponse()->write($content);
145
-		}
146
-		else
141
+		} else
147 142
 			throw new THttpException(404,'feedservice_feed_unknown',$id);
148 143
 	}
149 144
 }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveControlAdapter.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
 				$this->_activeControlType = 'TBaseActiveCallbackControl';
73 73
 			else
74 74
 				$this->_activeControlType = 'TBaseActiveControl';
75
-		}
76
-		else
75
+		} else
77 76
 			$this->_activeControlType = $type;
78 77
 	}
79 78
 
@@ -491,8 +490,7 @@  discard block
 block discarded – undo
491 490
 		{
492 491
 			return ($this->_new!==null) && $this->_new->hasCssClass()
493 492
 						? $this->_new->getCssClass() : null;
494
-		}
495
-		else
493
+		} else
496 494
 		{
497 495
 			return $this->_old->getCssClass() !== $this->_new->getCssClass() ?
498 496
 				$this->_new->getCssClass() : null;
@@ -548,8 +546,7 @@  discard block
 block discarded – undo
548 546
 		if($this->_old===null)
549 547
 		{
550 548
 			return ($this->_new!==null) ? $this->_new->toArray() : $this->_null;
551
-		}
552
-		else
549
+		} else
553 550
 		{
554 551
 			$new = $this->_new->toArray();
555 552
 			$old = $this->_old->toArray();
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActivePageAdapter.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -251,14 +251,12 @@  discard block
 block discarded – undo
251 251
 				$param = $this->getCallbackEventParameter();
252 252
 				$result = new TCallbackEventParameter($this->getResponse(), $param);
253 253
 				$callbackHandler->raiseCallbackEvent($result);
254
-			}
255
-			else
254
+			} else
256 255
 			{
257 256
 				throw new TInvalidCallbackException(
258 257
 					'callback_invalid_handler', $callbackHandler->getUniqueID());
259 258
 			}
260
-		 }
261
-		 else
259
+		 } else
262 260
 		 {
263 261
 		 	$target = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_TARGET);
264 262
 		 	throw new TInvalidCallbackException('callback_invalid_target', $target);
@@ -365,8 +363,7 @@  discard block
 block discarded – undo
365 363
 			$content = $response->createHtmlWriter();
366 364
 			$content->getWriter()->setBoundary(TActivePageAdapter::CALLBACK_ERROR_HEADER);
367 365
 			$content->write($trace);
368
-		}
369
-		else
366
+		} else
370 367
 		{
371 368
 			error_log("Error happened while processing an existing error:\n".$exception->__toString());
372 369
 			header('HTTP/1.0 500 Internal Server Error', true, 500);
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveTableCell.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,8 +95,7 @@
 block discarded – undo
95 95
 		if($this->getHasPreRendered()) {
96 96
 			$this->renderRepeater($writer);
97 97
 			if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(),$writer);
98
-		}
99
-		else {
98
+		} else {
100 99
 			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
101 100
 		}
102 101
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveTableRow.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -119,8 +119,7 @@  discard block
 block discarded – undo
119 119
 		{
120 120
 			$this->raiseCallbackEvent($param);
121 121
 			return true;
122
-		}
123
-		else return false;
122
+		} else return false;
124 123
 	}
125 124
 
126 125
 	/**
@@ -163,8 +162,7 @@  discard block
 block discarded – undo
163 162
 			parent::render($writer);
164 163
 			if ($this->getActiveControl()->canUpdateClientSide())
165 164
 				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
166
-		}
167
-		else
165
+		} else
168 166
 		{
169 167
 			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
170 168
 			// If we update a TActiveTableRow on callback, we shouldn't update all childs,
Please login to merge, or discard this patch.