@@ -56,10 +56,11 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function getCellSpacing() |
| 58 | 58 | { |
| 59 | - if($this->getHasStyle()) |
|
| 60 | - return $this->getStyle()->getCellSpacing(); |
|
| 61 | - else |
|
| 62 | - return -1; |
|
| 59 | + if($this->getHasStyle()) { |
|
| 60 | + return $this->getStyle()->getCellSpacing(); |
|
| 61 | + } else { |
|
| 62 | + return -1; |
|
| 63 | + } |
|
| 63 | 64 | } |
| 64 | 65 | |
| 65 | 66 | /** |
@@ -75,10 +76,11 @@ discard block |
||
| 75 | 76 | */ |
| 76 | 77 | public function getCellPadding() |
| 77 | 78 | { |
| 78 | - if($this->getHasStyle()) |
|
| 79 | - return $this->getStyle()->getCellPadding(); |
|
| 80 | - else |
|
| 81 | - return -1; |
|
| 79 | + if($this->getHasStyle()) { |
|
| 80 | + return $this->getStyle()->getCellPadding(); |
|
| 81 | + } else { |
|
| 82 | + return -1; |
|
| 83 | + } |
|
| 82 | 84 | } |
| 83 | 85 | |
| 84 | 86 | /** |
@@ -94,10 +96,11 @@ discard block |
||
| 94 | 96 | */ |
| 95 | 97 | public function getHorizontalAlign() |
| 96 | 98 | { |
| 97 | - if($this->getHasStyle()) |
|
| 98 | - return $this->getStyle()->getHorizontalAlign(); |
|
| 99 | - else |
|
| 100 | - return THorizontalAlign::NotSet; |
|
| 99 | + if($this->getHasStyle()) { |
|
| 100 | + return $this->getStyle()->getHorizontalAlign(); |
|
| 101 | + } else { |
|
| 102 | + return THorizontalAlign::NotSet; |
|
| 103 | + } |
|
| 101 | 104 | } |
| 102 | 105 | |
| 103 | 106 | /** |
@@ -113,10 +116,11 @@ discard block |
||
| 113 | 116 | */ |
| 114 | 117 | public function getGridLines() |
| 115 | 118 | { |
| 116 | - if($this->getHasStyle()) |
|
| 117 | - return $this->getStyle()->getGridLines(); |
|
| 118 | - else |
|
| 119 | - return TTableGridLines::None; |
|
| 119 | + if($this->getHasStyle()) { |
|
| 120 | + return $this->getStyle()->getGridLines(); |
|
| 121 | + } else { |
|
| 122 | + return TTableGridLines::None; |
|
| 123 | + } |
|
| 120 | 124 | } |
| 121 | 125 | |
| 122 | 126 | /** |
@@ -144,8 +144,9 @@ |
||
| 144 | 144 | */ |
| 145 | 145 | public function getSubMap($value) |
| 146 | 146 | { |
| 147 | - if(isset($this->_resultMaps[$value])) |
|
| 148 | - return $this->_resultMaps[$value]; |
|
| 147 | + if(isset($this->_resultMaps[$value])) { |
|
| 148 | + return $this->_resultMaps[$value]; |
|
| 149 | + } |
|
| 149 | 150 | } |
| 150 | 151 | |
| 151 | 152 | /** |
@@ -75,8 +75,9 @@ |
||
| 75 | 75 | |
| 76 | 76 | protected function getCache() |
| 77 | 77 | { |
| 78 | - if (!$this->_cache) |
|
| 79 | - $this->_cache = Prado::getApplication()->getCache(); |
|
| 78 | + if (!$this->_cache) { |
|
| 79 | + $this->_cache = Prado::getApplication()->getCache(); |
|
| 80 | + } |
|
| 80 | 81 | return $this->_cache; |
| 81 | 82 | } |
| 82 | 83 | |
@@ -108,8 +108,9 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | parent::init($xml); |
| 110 | 110 | $manager = $this -> getManager(); |
| 111 | - if($this->getEnableCache()) |
|
| 112 | - $manager->setCache($this->getApplication()->getCache()); |
|
| 111 | + if($this->getEnableCache()) { |
|
| 112 | + $manager->setCache($this->getApplication()->getCache()); |
|
| 113 | + } |
|
| 113 | 114 | $manager->setDbConnection($this->getDbConnection()); |
| 114 | 115 | $manager->setInvalidFinderResult($this->getInvalidFinderResult()); |
| 115 | 116 | $manager->setGatewayClass($this->getGatewayClass()); |
@@ -119,8 +120,9 @@ discard block |
||
| 119 | 120 | * @return TActiveRecordManager |
| 120 | 121 | */ |
| 121 | 122 | public function getManager() { |
| 122 | - if($this->_manager === null) |
|
| 123 | - $this->_manager = Prado::createComponent($this -> getManagerClass()); |
|
| 123 | + if($this->_manager === null) { |
|
| 124 | + $this->_manager = Prado::createComponent($this -> getManagerClass()); |
|
| 125 | + } |
|
| 124 | 126 | return TActiveRecordManager::getInstance($this->_manager); |
| 125 | 127 | } |
| 126 | 128 | |
@@ -39,8 +39,9 @@ |
||
| 39 | 39 | $dbtype = strtolower($this->getDbType()); |
| 40 | 40 | foreach(self::$types as $type => $dbtypes) |
| 41 | 41 | { |
| 42 | - if(in_array($dbtype, $dbtypes)) |
|
| 43 | - return $type; |
|
| 42 | + if(in_array($dbtype, $dbtypes)) { |
|
| 43 | + return $type; |
|
| 44 | + } |
|
| 44 | 45 | } |
| 45 | 46 | return 'string'; |
| 46 | 47 | } |
@@ -55,12 +55,14 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function setText($value) |
| 57 | 57 | { |
| 58 | - if(parent::getText() === $value) |
|
| 59 | - return; |
|
| 58 | + if(parent::getText() === $value) { |
|
| 59 | + return; |
|
| 60 | + } |
|
| 60 | 61 | |
| 61 | 62 | parent::setText($value); |
| 62 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 63 | - $this->getPage()->getCallbackClient()->update($this, $value); |
|
| 63 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 64 | + $this->getPage()->getCallbackClient()->update($this, $value); |
|
| 65 | + } |
|
| 64 | 66 | } |
| 65 | 67 | |
| 66 | 68 | /** |
@@ -71,8 +73,9 @@ discard block |
||
| 71 | 73 | */ |
| 72 | 74 | public function setForControl($value) |
| 73 | 75 | { |
| 74 | - if(parent::getForControl() === $value) |
|
| 75 | - return; |
|
| 76 | + if(parent::getForControl() === $value) { |
|
| 77 | + return; |
|
| 78 | + } |
|
| 76 | 79 | |
| 77 | 80 | parent::setForControl($value); |
| 78 | 81 | if($this->getActiveControl()->canUpdateClientSide()) |
@@ -89,8 +89,9 @@ |
||
| 89 | 89 | * @param string text content for the textbox |
| 90 | 90 | */ |
| 91 | 91 | public function setText($value){ |
| 92 | - if(parent::getText() === $value) |
|
| 93 | - return; |
|
| 92 | + if(parent::getText() === $value) { |
|
| 93 | + return; |
|
| 94 | + } |
|
| 94 | 95 | |
| 95 | 96 | parent::setText($value); |
| 96 | 97 | if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()){ |
@@ -145,8 +145,9 @@ |
||
| 145 | 145 | */ |
| 146 | 146 | public function setErrorMessage($value) |
| 147 | 147 | { |
| 148 | - if(parent::getErrorMessage() === $value) |
|
| 149 | - return; |
|
| 148 | + if(parent::getErrorMessage() === $value) { |
|
| 149 | + return; |
|
| 150 | + } |
|
| 150 | 151 | |
| 151 | 152 | |
| 152 | 153 | parent::setErrorMessage($value); |
@@ -44,11 +44,13 @@ |
||
| 44 | 44 | public function setInterval($value) |
| 45 | 45 | { |
| 46 | 46 | $interval = TPropertyValue::ensureFloat($value); |
| 47 | - if($interval <= 0) |
|
| 48 | - throw new TConfigurationException('callback_interval_be_positive', $this->getID()); |
|
| 47 | + if($interval <= 0) { |
|
| 48 | + throw new TConfigurationException('callback_interval_be_positive', $this->getID()); |
|
| 49 | + } |
|
| 49 | 50 | |
| 50 | - if($this->getInterval() === $value) |
|
| 51 | - return; |
|
| 51 | + if($this->getInterval() === $value) { |
|
| 52 | + return; |
|
| 53 | + } |
|
| 52 | 54 | |
| 53 | 55 | $this->setViewState('Interval', $interval, 1); |
| 54 | 56 | if ($this->getActiveControl()->canUpdateClientSide()){ |