@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * @throws TDBMException |
95 | 95 | * @throws TDBMInvalidOperationException |
96 | 96 | */ |
97 | - public function __construct(AbstractTDBMObject $object, $table_name, array $primaryKeys=array(), TDBMService $tdbmService=null, array $dbRow = array()) { |
|
97 | + public function __construct(AbstractTDBMObject $object, $table_name, array $primaryKeys = array(), TDBMService $tdbmService = null, array $dbRow = array()) { |
|
98 | 98 | $this->object = $object; |
99 | 99 | $this->dbTableName = $table_name; |
100 | 100 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * $status = TDBMObjectStateEnum::STATE_LOADED when the object is cached in memory. |
142 | 142 | * @param string $state |
143 | 143 | */ |
144 | - public function _setStatus($state){ |
|
144 | + public function _setStatus($state) { |
|
145 | 145 | $this->status = $state; |
146 | 146 | } |
147 | 147 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $sql = "SELECT * FROM ".$connection->quoteIdentifier($this->dbTableName)." WHERE ".$sql_where; |
164 | 164 | $result = $connection->executeQuery($sql, $parameters); |
165 | 165 | |
166 | - if ($result->rowCount()==0) |
|
166 | + if ($result->rowCount() == 0) |
|
167 | 167 | { |
168 | 168 | throw new TDBMException("Could not retrieve object from table \"$this->dbTableName\" with ID \"".$this->TDBMObject_id."\"."); |
169 | 169 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | * Implement the unique JsonSerializable method |
311 | 311 | * @return array |
312 | 312 | */ |
313 | - public function jsonSerialize(){ |
|
313 | + public function jsonSerialize() { |
|
314 | 314 | $this->_dbLoadIfNotLoaded(); |
315 | 315 | return $this->dbRow; |
316 | 316 | } |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | /** |
338 | 338 | * Override the native php clone function for TDBMObjects |
339 | 339 | */ |
340 | - public function __clone(){ |
|
340 | + public function __clone() { |
|
341 | 341 | $this->_dbLoadIfNotLoaded(); |
342 | 342 | //First lets set the status to new (to enter the save function) |
343 | 343 | $this->status = TDBMObjectStateEnum::STATE_NEW; |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | $pkValues = array_values($firstRefDbRow->_getPrimaryKeys()); |
370 | 370 | $localColumns = $fk->getLocalColumns(); |
371 | 371 | |
372 | - for ($i=0, $count=count($localColumns); $i<$count; $i++) { |
|
372 | + for ($i = 0, $count = count($localColumns); $i<$count; $i++) { |
|
373 | 373 | $dbRow[$localColumns[$i]] = $pkValues[$i]; |
374 | 374 | } |
375 | 375 | } |
@@ -77,7 +77,7 @@ |
||
77 | 77 | |
78 | 78 | |
79 | 79 | private function toIndex($offset) { |
80 | - if ($offset < 0 || filter_var($offset, FILTER_VALIDATE_INT) === false) { |
|
80 | + if ($offset<0 || filter_var($offset, FILTER_VALIDATE_INT) === false) { |
|
81 | 81 | throw new TDBMInvalidOffsetException('Trying to access result set using offset "'.$offset.'". An offset must be a positive integer.'); |
82 | 82 | } |
83 | 83 | if ($this->statement === null) { |
@@ -29,7 +29,7 @@ |
||
29 | 29 | <div class="control-group"> |
30 | 30 | <label class="control-label">Store dates / timestamps in UTC:</label> |
31 | 31 | <div class="controls"> |
32 | - <input type="checkbox" name="storeInUtc" value="1" <?php echo $this->storeInUtc?'checked="checked"':"" ?>></input> |
|
32 | + <input type="checkbox" name="storeInUtc" value="1" <?php echo $this->storeInUtc ? 'checked="checked"' : "" ?>></input> |
|
33 | 33 | <span class="help-block">Select this option if you want timestamps to be stored in UTC. |
34 | 34 | If your application supports several time zones, you should select this option to store all dates in |
35 | 35 | the same time zone.</span> |