@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | public function get($var, $tableName = null) |
179 | 179 | { |
180 | 180 | if ($tableName === null) { |
181 | - if (count($this->dbRows) > 1) { |
|
181 | + if (count($this->dbRows)>1) { |
|
182 | 182 | throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.'); |
183 | 183 | } elseif (count($this->dbRows) === 1) { |
184 | 184 | $tableName = array_keys($this->dbRows)[0]; |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | public function has($var, $tableName = null) |
207 | 207 | { |
208 | 208 | if ($tableName === null) { |
209 | - if (count($this->dbRows) > 1) { |
|
209 | + if (count($this->dbRows)>1) { |
|
210 | 210 | throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.'); |
211 | 211 | } elseif (count($this->dbRows) === 1) { |
212 | 212 | $tableName = array_keys($this->dbRows)[0]; |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | public function set($var, $value, $tableName = null) |
228 | 228 | { |
229 | 229 | if ($tableName === null) { |
230 | - if (count($this->dbRows) > 1) { |
|
230 | + if (count($this->dbRows)>1) { |
|
231 | 231 | throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.'); |
232 | 232 | } elseif (count($this->dbRows) === 1) { |
233 | 233 | $tableName = array_keys($this->dbRows)[0]; |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | public function setRef($foreignKeyName, AbstractTDBMObject $bean, $tableName = null) |
254 | 254 | { |
255 | 255 | if ($tableName === null) { |
256 | - if (count($this->dbRows) > 1) { |
|
256 | + if (count($this->dbRows)>1) { |
|
257 | 257 | throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.'); |
258 | 258 | } elseif (count($this->dbRows) === 1) { |
259 | 259 | $tableName = array_keys($this->dbRows)[0]; |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | public function getRef($foreignKeyName, $tableName = null) |
281 | 281 | { |
282 | 282 | if ($tableName === null) { |
283 | - if (count($this->dbRows) > 1) { |
|
283 | + if (count($this->dbRows)>1) { |
|
284 | 284 | throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.'); |
285 | 285 | } elseif (count($this->dbRows) === 1) { |
286 | 286 | $tableName = array_keys($this->dbRows)[0]; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $cnt = count($this); |
32 | 32 | if ($cnt == 1) { |
33 | 33 | return $this[0]->__get($var); |
34 | - } elseif ($cnt > 1) { |
|
34 | + } elseif ($cnt>1) { |
|
35 | 35 | throw new TDBMException('Array contains many objects! Use getarray_'.$var.' to retrieve an array of '.$var); |
36 | 36 | } else { |
37 | 37 | throw new TDBMException('Array contains no objects'); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $cnt = count($this); |
44 | 44 | if ($cnt == 1) { |
45 | 45 | return $this[0]->__set($var, $value); |
46 | - } elseif ($cnt > 1) { |
|
46 | + } elseif ($cnt>1) { |
|
47 | 47 | throw new TDBMException('Array contains many objects! Use setarray_'.$var.' to set the array of '.$var); |
48 | 48 | } else { |
49 | 49 | throw new TDBMException('Array contains no objects'); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function getCurrentPage() |
114 | 114 | { |
115 | - return floor($this->offset / $this->limit) + 1; |
|
115 | + return floor($this->offset/$this->limit)+1; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | */ |
252 | 252 | public function jsonSerialize() |
253 | 253 | { |
254 | - return array_map(function (AbstractTDBMObject $item) { |
|
254 | + return array_map(function(AbstractTDBMObject $item) { |
|
255 | 255 | return $item->jsonSerialize(); |
256 | 256 | }, $this->toArray()); |
257 | 257 | } |