@@ -163,8 +163,7 @@ discard block |
||
163 | 163 | if(!is_file($dst.DIRECTORY_SEPARATOR.$fileName) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance) |
164 | 164 | $this->copyFile($fullpath,$dst); |
165 | 165 | return $this->_published[$path]=$this->_baseUrl.'/'.$dir.'/'.$fileName; |
166 | - } |
|
167 | - else |
|
166 | + } else |
|
168 | 167 | { |
169 | 168 | $dir=$this->hash($fullpath); |
170 | 169 | if(!is_dir($this->_basePath.DIRECTORY_SEPARATOR.$dir) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance) |
@@ -287,8 +286,7 @@ discard block |
||
287 | 286 | @copy($src.DIRECTORY_SEPARATOR.$file,$dst.DIRECTORY_SEPARATOR.$file); |
288 | 287 | @chmod($dst.DIRECTORY_SEPARATOR.$file, PRADO_CHMOD); |
289 | 288 | } |
290 | - } |
|
291 | - else |
|
289 | + } else |
|
292 | 290 | $this->copyDirectory($src.DIRECTORY_SEPARATOR.$file,$dst.DIRECTORY_SEPARATOR.$file); |
293 | 291 | } |
294 | 292 | closedir($folder); |
@@ -81,8 +81,7 @@ |
||
81 | 81 | $this->_d[]=$item; |
82 | 82 | ++$this->_c; |
83 | 83 | } |
84 | - } |
|
85 | - else if($data!==null) |
|
84 | + } else if($data!==null) |
|
86 | 85 | throw new TInvalidDataTypeException('queue_data_not_iterable'); |
87 | 86 | } |
88 | 87 |
@@ -70,8 +70,7 @@ |
||
70 | 70 | |
71 | 71 | echo "\n\n** PDF file quickstart.pdf created **\n\n"; |
72 | 72 | |
73 | - } |
|
74 | - else |
|
73 | + } else |
|
75 | 74 | { |
76 | 75 | echo " Unable to find pdfLatex executable $pdflatexExec"; |
77 | 76 | } |
@@ -105,8 +105,7 @@ discard block |
||
105 | 105 | { |
106 | 106 | $valid |= $action->performAction($args); |
107 | 107 | break; |
108 | - } |
|
109 | - else |
|
108 | + } else |
|
110 | 109 | { |
111 | 110 | $valid = false; |
112 | 111 | } |
@@ -207,8 +206,7 @@ discard block |
||
207 | 206 | } |
208 | 207 | |
209 | 208 | return Prado::getApplication(); |
210 | - } |
|
211 | - else |
|
209 | + } else |
|
212 | 210 | { |
213 | 211 | PradoCommandLineInterpreter::printGreeting(); |
214 | 212 | echo '+'.str_repeat('-',77)."+\n"; |
@@ -514,8 +512,7 @@ discard block |
||
514 | 512 | $running_dir = substr(str_replace(realpath('./'),'',$test_dir),1); |
515 | 513 | echo 'Running unit tests in directory "'.$running_dir."\":\n"; |
516 | 514 | $test->run(new TextReporter()); |
517 | - } |
|
518 | - else |
|
515 | + } else |
|
519 | 516 | { |
520 | 517 | $running_dir = substr(str_replace(realpath('./'),'',$dir),1); |
521 | 518 | echo '** Unable to find test directory "'.$running_dir.'/unit" or "'.$running_dir.'/tests/unit".'."\n"; |
@@ -669,8 +666,7 @@ discard block |
||
669 | 666 | { |
670 | 667 | echo '** Unable to find table or view "'.$tablename.'" in "'.$manager->getDbConnection()->getConnectionString()."\".\n"; |
671 | 668 | return false; |
672 | - } |
|
673 | - else |
|
669 | + } else |
|
674 | 670 | { |
675 | 671 | $properties = array(); |
676 | 672 | foreach($tableInfo->getColumns() as $field=>$column) |
@@ -855,8 +851,7 @@ discard block |
||
855 | 851 | $args = array($input[0],$input[1], $input[2],$app_dir,'soap'); |
856 | 852 | $cmd = new PradoCommandLineActiveRecordGen; |
857 | 853 | $cmd->performAction($args); |
858 | - } |
|
859 | - else |
|
854 | + } else |
|
860 | 855 | { |
861 | 856 | echo "\n Usage: generate table_name Application.pages.RecordClassName\n"; |
862 | 857 | } |
@@ -309,13 +309,11 @@ discard block |
||
309 | 309 | { |
310 | 310 | ini_set('session.use_cookies','0'); |
311 | 311 | ini_set('session.use_only_cookies','0'); |
312 | - } |
|
313 | - else if($value===THttpSessionCookieMode::Allow) |
|
312 | + } else if($value===THttpSessionCookieMode::Allow) |
|
314 | 313 | { |
315 | 314 | ini_set('session.use_cookies','1'); |
316 | 315 | ini_set('session.use_only_cookies','0'); |
317 | - } |
|
318 | - else |
|
316 | + } else |
|
319 | 317 | { |
320 | 318 | ini_set('session.use_cookies','1'); |
321 | 319 | ini_set('session.use_only_cookies','1'); |
@@ -368,8 +366,7 @@ discard block |
||
368 | 366 | { |
369 | 367 | ini_set('session.gc_probability',$value); |
370 | 368 | ini_set('session.gc_divisor','100'); |
371 | - } |
|
372 | - else |
|
369 | + } else |
|
373 | 370 | throw new TInvalidDataValueException('httpsession_gcprobability_invalid',$value); |
374 | 371 | } |
375 | 372 | } |
@@ -557,8 +554,7 @@ discard block |
||
557 | 554 | $value=$_SESSION[$key]; |
558 | 555 | unset($_SESSION[$key]); |
559 | 556 | return $value; |
560 | - } |
|
561 | - else |
|
557 | + } else |
|
562 | 558 | return null; |
563 | 559 | } |
564 | 560 |
@@ -171,8 +171,7 @@ discard block |
||
171 | 171 | } |
172 | 172 | } |
173 | 173 | return '{'.$results.'}'; |
174 | - } |
|
175 | - else |
|
174 | + } else |
|
176 | 175 | { |
177 | 176 | foreach($value as $v) |
178 | 177 | { |
@@ -185,8 +184,7 @@ discard block |
||
185 | 184 | } |
186 | 185 | return '['.$results.']'; |
187 | 186 | } |
188 | - } |
|
189 | - else if(is_integer($value)) |
|
187 | + } else if(is_integer($value)) |
|
190 | 188 | return "$value"; |
191 | 189 | else if(is_float($value)) |
192 | 190 | { |
@@ -206,8 +204,7 @@ discard block |
||
206 | 204 | return str_replace($locale['decimal_point'], '.', "$value"); |
207 | 205 | break; |
208 | 206 | } |
209 | - } |
|
210 | - else if(is_object($value)) |
|
207 | + } else if(is_object($value)) |
|
211 | 208 | if ($value instanceof TJavaScriptLiteral) |
212 | 209 | return $value->toJavaScriptLiteral(); |
213 | 210 | else |
@@ -80,12 +80,10 @@ discard block |
||
80 | 80 | $name=urlencode($name.'[]'); |
81 | 81 | foreach($value as $v) |
82 | 82 | $url.=$amp.$name.'='.urlencode($v); |
83 | - } |
|
84 | - else |
|
83 | + } else |
|
85 | 84 | $url.=$amp.urlencode($name).'='.urlencode($value); |
86 | 85 | } |
87 | - } |
|
88 | - else |
|
86 | + } else |
|
89 | 87 | { |
90 | 88 | foreach($getItems as $name=>$value) |
91 | 89 | { |
@@ -93,8 +91,7 @@ discard block |
||
93 | 91 | { |
94 | 92 | foreach($value as $v) |
95 | 93 | $url.=$amp.$name.'[]='.$v; |
96 | - } |
|
97 | - else |
|
94 | + } else |
|
98 | 95 | $url.=$amp.$name.'='.$value; |
99 | 96 | } |
100 | 97 | } |
@@ -147,14 +144,12 @@ discard block |
||
147 | 144 | $getVariables[substr($name,0,$pos)][]=$value; |
148 | 145 | else |
149 | 146 | $getVariables[$name]=$value; |
150 | - } |
|
151 | - else |
|
147 | + } else |
|
152 | 148 | $getVariables[$path]=''; |
153 | 149 | } |
154 | 150 | } |
155 | 151 | return $getVariables; |
156 | - } |
|
157 | - else |
|
152 | + } else |
|
158 | 153 | return array(); |
159 | 154 | } |
160 | 155 | } |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | $status=TPropertyValue::ensureInteger($status); |
282 | 282 | if(isset(self::$HTTP_STATUS_CODES[$status])) { |
283 | 283 | $this->_reason=self::$HTTP_STATUS_CODES[$status]; |
284 | - }else{ |
|
284 | + } else{ |
|
285 | 285 | if($reason===null || $reason==='') { |
286 | 286 | throw new TInvalidDataValueException("response_status_reason_missing"); |
287 | 287 | } |
@@ -377,8 +377,7 @@ discard block |
||
377 | 377 | { |
378 | 378 | foreach($headers as $h) |
379 | 379 | header($h); |
380 | - } |
|
381 | - else |
|
380 | + } else |
|
382 | 381 | { |
383 | 382 | header('Pragma: public'); |
384 | 383 | header('Expires: 0'); |
@@ -488,13 +487,11 @@ discard block |
||
488 | 487 | { |
489 | 488 | $this->_bufferOutput = false; |
490 | 489 | ob_end_flush(); |
491 | - } |
|
492 | - else |
|
490 | + } else |
|
493 | 491 | ob_flush(); |
494 | 492 | flush(); |
495 | 493 | } |
496 | - } |
|
497 | - else |
|
494 | + } else |
|
498 | 495 | flush(); |
499 | 496 | } |
500 | 497 | |
@@ -645,8 +642,7 @@ discard block |
||
645 | 642 | $cookie->getSecure(), |
646 | 643 | $cookie->getHttpOnly() |
647 | 644 | ); |
648 | - } |
|
649 | - else { |
|
645 | + } else { |
|
650 | 646 | setcookie( |
651 | 647 | $cookie->getName(), |
652 | 648 | $cookie->getValue(), |
@@ -79,8 +79,7 @@ discard block |
||
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 |
||
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 |
||
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 |