@@ -137,8 +137,9 @@ |
||
| 137 | 137 | $fkObject = $this->getContext()->getPropertyValue(); |
| 138 | 138 | $source = $this->getSourceRecord(); |
| 139 | 139 | $fkeys = $this->findForeignKeys($fkObject, $source); |
| 140 | - foreach($fkeys as $fKey => $srcKey) |
|
| 141 | - $fkObject->setColumnValue($fKey, $source->getColumnValue($srcKey)); |
|
| 140 | + foreach($fkeys as $fKey => $srcKey) { |
|
| 141 | + $fkObject->setColumnValue($fKey, $source->getColumnValue($srcKey)); |
|
| 142 | + } |
|
| 142 | 143 | return $fkObject->save(); |
| 143 | 144 | } |
| 144 | 145 | } |
@@ -68,8 +68,7 @@ |
||
| 68 | 68 | $manager->configureXml($file); |
| 69 | 69 | $this->cacheSqlMapManager($manager); |
| 70 | 70 | } |
| 71 | - } |
|
| 72 | - elseif($this->getConnectionID() !== '') { |
|
| 71 | + } elseif($this->getConnectionID() !== '') { |
|
| 73 | 72 | $manager->setDbConnection($this->getDbConnection()); |
| 74 | 73 | } |
| 75 | 74 | return $manager; |
@@ -177,8 +177,7 @@ |
||
| 177 | 177 | try |
| 178 | 178 | { |
| 179 | 179 | return TPropertyAccess::get($object, $property->getProperty()); |
| 180 | - } |
|
| 181 | - catch (TInvalidPropertyException $e) |
|
| 180 | + } catch (TInvalidPropertyException $e) |
|
| 182 | 181 | { |
| 183 | 182 | throw new TSqlMapException( |
| 184 | 183 | 'sqlmap_unable_to_get_property_for_parameter', |
@@ -164,8 +164,7 @@ |
||
| 164 | 164 | return $handler->createNewInstance(); |
| 165 | 165 | else |
| 166 | 166 | return $registry->createInstanceOf($this->getClass()); |
| 167 | - } |
|
| 168 | - catch (TSqlMapException $e) |
|
| 167 | + } catch (TSqlMapException $e) |
|
| 169 | 168 | { |
| 170 | 169 | throw new TSqlMapException( |
| 171 | 170 | 'sqlmap_unable_to_create_new_instance', |
@@ -190,7 +190,7 @@ |
||
| 190 | 190 | if(($disc = $this->getDiscriminator()) !== null) |
| 191 | 191 | { |
| 192 | 192 | $value = $disc->getMapping()->getPropertyValue($registry, $row); |
| 193 | - $subMap = $disc->getSubMap((string)$value); |
|
| 193 | + $subMap = $disc->getSubMap((string) $value); |
|
| 194 | 194 | |
| 195 | 195 | if($subMap === null) |
| 196 | 196 | $subMap = $this; |
@@ -265,8 +265,9 @@ |
||
| 265 | 265 | */ |
| 266 | 266 | public function flushCacheModels() |
| 267 | 267 | { |
| 268 | - foreach($this->_cacheModels as $cache) |
|
| 269 | - $cache->flush(); |
|
| 268 | + foreach($this->_cacheModels as $cache) { |
|
| 269 | + $cache->flush(); |
|
| 270 | + } |
|
| 270 | 271 | } |
| 271 | 272 | } |
| 272 | 273 | |
@@ -40,8 +40,9 @@ |
||
| 40 | 40 | |
| 41 | 41 | protected function createParametersForTextCommand() |
| 42 | 42 | { |
| 43 | - foreach($this->_statement->ParameterMap()->getProperties() as $prop) |
|
| 44 | - $this->_preparedStatement->getParameterNames()->add($prop->getProperty()); |
|
| 43 | + foreach($this->_statement->ParameterMap()->getProperties() as $prop) { |
|
| 44 | + $this->_preparedStatement->getParameterNames()->add($prop->getProperty()); |
|
| 45 | + } |
|
| 45 | 46 | } |
| 46 | 47 | } |
| 47 | 48 | |
@@ -112,8 +112,7 @@ |
||
| 112 | 112 | && strlen($datetime[1]) == 1) |
| 113 | 113 | { |
| 114 | 114 | $pattern = $datetime; |
| 115 | - } |
|
| 116 | - else //no subpattern, try the presets |
|
| 115 | + } else //no subpattern, try the presets |
|
| 117 | 116 | $pattern = $this->getPreset($string); |
| 118 | 117 | |
| 119 | 118 | //no presets found, use the string as the pattern |
@@ -73,10 +73,10 @@ discard block |
||
| 73 | 73 | * @var array |
| 74 | 74 | */ |
| 75 | 75 | private static $_patternPresets = [ |
| 76 | - 'fulldate' => 'P','full' => 'P', |
|
| 77 | - 'longdate' => 'D','long' => 'd', |
|
| 78 | - 'mediumdate' => 'p','medium' => 'p', |
|
| 79 | - 'shortdate' => 'd','short' => 'd', |
|
| 76 | + 'fulldate' => 'P', 'full' => 'P', |
|
| 77 | + 'longdate' => 'D', 'long' => 'd', |
|
| 78 | + 'mediumdate' => 'p', 'medium' => 'p', |
|
| 79 | + 'shortdate' => 'd', 'short' => 'd', |
|
| 80 | 80 | 'fulltime' => 'Q', 'longtime' => 'T', |
| 81 | 81 | 'mediumtime' => 'q', 'shorttime' => 't']; |
| 82 | 82 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | //and let the DateFormat handle it. |
| 123 | 123 | if($pattern === null) |
| 124 | 124 | $pattern = $string; |
| 125 | - if (!is_array($pattern) && strlen($pattern) == 0) |
|
| 125 | + if(!is_array($pattern) && strlen($pattern) == 0) |
|
| 126 | 126 | $pattern = null; |
| 127 | 127 | return $pattern; |
| 128 | 128 | } |
@@ -55,8 +55,9 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function flushContent() |
| 57 | 57 | { |
| 58 | - foreach($this->_writers as $writer) |
|
| 59 | - echo $writer->flush(); |
|
| 58 | + foreach($this->_writers as $writer) { |
|
| 59 | + echo $writer->flush(); |
|
| 60 | + } |
|
| 60 | 61 | parent::flushContent(); |
| 61 | 62 | } |
| 62 | 63 | |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | public function getPage() |
| 50 | 50 | { |
| 51 | - return $this->_control?$this->_control->getPage():null; |
|
| 51 | + return $this->_control ? $this->_control->getPage() : null; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |