@@ -233,8 +233,7 @@ discard block |
||
233 | 233 | $newid=substr($id,$pos+1); |
234 | 234 | if ($control!==null) |
235 | 235 | $control=$control->$newid; |
236 | - } |
|
237 | - else |
|
236 | + } else |
|
238 | 237 | { |
239 | 238 | // TCheckBoxList overrides findControl() with a fake implementation |
240 | 239 | // but accepts a second parameter to use the standard one |
@@ -296,8 +295,7 @@ discard block |
||
296 | 295 | { |
297 | 296 | $group=$this->getValidationGroup(); |
298 | 297 | return $this->getPage()->getValidators($group)->getCount()>0; |
299 | - } |
|
300 | - else |
|
298 | + } else |
|
301 | 299 | return false; |
302 | 300 | } |
303 | 301 |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if ($this->sourcepath === NULL) |
59 | 59 | { |
60 | 60 | $this->sourcepath = $sourcepath; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->sourcepath->append($sourcepath); |
65 | 64 | } |
@@ -70,8 +70,7 @@ |
||
70 | 70 | { |
71 | 71 | $domain=substr($value,$pos+1); |
72 | 72 | return $domain===''?false:checkdnsrr($domain,'MX'); |
73 | - } |
|
74 | - else |
|
73 | + } else |
|
75 | 74 | return false; |
76 | 75 | } |
77 | 76 | } |
@@ -154,8 +154,7 @@ discard block |
||
154 | 154 | $info['NumericPrecision'] = intval($pscale[1]); |
155 | 155 | if(count($pscale) > 2) |
156 | 156 | $info['NumericScale'] = intval($pscale[2]); |
157 | - } |
|
158 | - else |
|
157 | + } else |
|
159 | 158 | $info['ColumnSize'] = intval($pscale[1]); |
160 | 159 | } |
161 | 160 | } |
@@ -254,8 +253,7 @@ discard block |
||
254 | 253 | try |
255 | 254 | { |
256 | 255 | return count($result = $command->queryRow()) > 0 && $result['Table_type']==='VIEW'; |
257 | - } |
|
258 | - catch(TDbException $e) |
|
256 | + } catch(TDbException $e) |
|
259 | 257 | { |
260 | 258 | $table = $schemaName===null?$tableName:$schemaName.'.'.$tableName; |
261 | 259 | throw new TDbException('dbcommon_invalid_table_name',$table,$e->getMessage()); |
@@ -158,8 +158,7 @@ |
||
158 | 158 | $e->setAttribute('maxOccurs','unbounded'); |
159 | 159 | $sequence->appendChild($e); |
160 | 160 | $complexType->appendChild($sequence); |
161 | - } |
|
162 | - else |
|
161 | + } else |
|
163 | 162 | { |
164 | 163 | $all = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:all'); |
165 | 164 | foreach($elements as $elem) |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if ($this->sourcepath === NULL) |
59 | 59 | { |
60 | 60 | $this->sourcepath = $sourcepath; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->sourcepath->append($sourcepath); |
65 | 64 | } |
@@ -425,14 +425,12 @@ discard block |
||
425 | 425 | $this->_recordState = self::STATE_LOADED; |
426 | 426 | return true; |
427 | 427 | } |
428 | - } |
|
429 | - else if($this->_recordState===self::STATE_LOADED) |
|
428 | + } else if($this->_recordState===self::STATE_LOADED) |
|
430 | 429 | { |
431 | 430 | $this->onUpdate($param); |
432 | 431 | if($param->getIsValid() && $gateway->update($this)) |
433 | 432 | return true; |
434 | - } |
|
435 | - else |
|
433 | + } else |
|
436 | 434 | throw new TActiveRecordException('ar_save_invalid', get_class($this)); |
437 | 435 | |
438 | 436 | return false; |
@@ -455,8 +453,7 @@ discard block |
||
455 | 453 | $this->_recordState=self::STATE_DELETED; |
456 | 454 | return true; |
457 | 455 | } |
458 | - } |
|
459 | - else |
|
456 | + } else |
|
460 | 457 | throw new TActiveRecordException('ar_delete_invalid', get_class($this)); |
461 | 458 | |
462 | 459 | return false; |
@@ -723,8 +720,7 @@ discard block |
||
723 | 720 | { |
724 | 721 | $criteria = $this->getRecordCriteria(count($args)>0 ? $args[0] : null, array_slice($args,1)); |
725 | 722 | return $context->getRelationHandler($criteria); |
726 | - } |
|
727 | - else |
|
723 | + } else |
|
728 | 724 | return null; |
729 | 725 | } |
730 | 726 | |
@@ -743,8 +739,7 @@ discard block |
||
743 | 739 | { |
744 | 740 | list($property, $relation) = $definition; |
745 | 741 | return new TActiveRecordRelationContext($this,$property,$relation); |
746 | - } |
|
747 | - else |
|
742 | + } else |
|
748 | 743 | return null; |
749 | 744 | } |
750 | 745 | |
@@ -827,8 +822,7 @@ discard block |
||
827 | 822 | { |
828 | 823 | $property= $method[4]==='_' ? substr($method,5) : substr($method,4); |
829 | 824 | return $this->getRelationHandler($property, $args); |
830 | - } |
|
831 | - else if($findOne=strncasecmp($method,'findby',6)===0) |
|
825 | + } else if($findOne=strncasecmp($method,'findby',6)===0) |
|
832 | 826 | $condition = $method[6]==='_' ? substr($method,7) : substr($method,6); |
833 | 827 | else if(strncasecmp($method,'findallby',9)===0) |
834 | 828 | $condition = $method[9]==='_' ? substr($method,10) : substr($method,9); |
@@ -894,8 +888,7 @@ discard block |
||
894 | 888 | { |
895 | 889 | $useArgs = !is_array($parameters) && is_array($args); |
896 | 890 | return new TActiveRecordCriteria($criteria,$useArgs ? $args : $parameters); |
897 | - } |
|
898 | - else if($criteria instanceof TSqlCriteria) |
|
891 | + } else if($criteria instanceof TSqlCriteria) |
|
899 | 892 | return $criteria; |
900 | 893 | else |
901 | 894 | return new TActiveRecordCriteria(); |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if ($this->sourcepath === NULL) |
59 | 59 | { |
60 | 60 | $this->sourcepath = $sourcepath; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->sourcepath->append($sourcepath); |
65 | 64 | } |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | if($validArray || $results instanceof ArrayAccess || $results instanceof TActiveRecord) |
81 | 81 | { |
82 | 82 | $this->collectForeignObjects($results); |
83 | - while($obj = array_pop($stack)) |
|
84 | - $obj->collectForeignObjects($results); |
|
85 | - } |
|
86 | - else if($results instanceof TActiveRecordRelation) |
|
83 | + while($obj = array_pop($stack)) { |
|
84 | + $obj->collectForeignObjects($results); |
|
85 | + } |
|
86 | + } else if($results instanceof TActiveRecordRelation) |
|
87 | 87 | $stack[] = $this; //call it later |
88 | 88 | else if($results === null || !$validArray) |
89 | 89 | $stack = array(); |
@@ -233,8 +233,7 @@ discard block |
||
233 | 233 | { |
234 | 234 | for($i=0,$k=count($results);$i<$k;$i++) |
235 | 235 | $this->setObjectProperty($results[$i], $properties, $collections); |
236 | - } |
|
237 | - else |
|
236 | + } else |
|
238 | 237 | $this->setObjectProperty($results, $properties, $collections); |
239 | 238 | } |
240 | 239 |