@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | private function checkTableName($tableName = null) { |
188 | 188 | if ($tableName === null) { |
189 | - if (count($this->dbRows) > 1) { |
|
189 | + if (count($this->dbRows)>1) { |
|
190 | 190 | throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.'); |
191 | 191 | } elseif (count($this->dbRows) === 1) { |
192 | 192 | $tableName = array_keys($this->dbRows)[0]; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | protected function set($var, $value, $tableName = null) |
214 | 214 | { |
215 | 215 | if ($tableName === null) { |
216 | - if (count($this->dbRows) > 1) { |
|
216 | + if (count($this->dbRows)>1) { |
|
217 | 217 | throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.'); |
218 | 218 | } elseif (count($this->dbRows) === 1) { |
219 | 219 | $tableName = array_keys($this->dbRows)[0]; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | protected function setRef($foreignKeyName, AbstractTDBMObject $bean, $tableName = null) |
240 | 240 | { |
241 | 241 | if ($tableName === null) { |
242 | - if (count($this->dbRows) > 1) { |
|
242 | + if (count($this->dbRows)>1) { |
|
243 | 243 | throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.'); |
244 | 244 | } elseif (count($this->dbRows) === 1) { |
245 | 245 | $tableName = array_keys($this->dbRows)[0]; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | public function getVariableName() |
55 | 55 | { |
56 | - return '$' . $this->getLowerCamelCaseName(); |
|
56 | + return '$'.$this->getLowerCamelCaseName(); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | public function getLowerCamelCaseName() |
@@ -65,12 +65,12 @@ discard block |
||
65 | 65 | |
66 | 66 | public function getSetterName() |
67 | 67 | { |
68 | - return 'set' . $this->getUpperCamelCaseName(); |
|
68 | + return 'set'.$this->getUpperCamelCaseName(); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | public function getGetterName() |
72 | 72 | { |
73 | - return 'get' . $this->getUpperCamelCaseName(); |
|
73 | + return 'get'.$this->getUpperCamelCaseName(); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function getConstructorProperties() |
94 | 94 | { |
95 | - $constructorProperties = array_filter($this->beanPropertyDescriptors, function (AbstractBeanPropertyDescriptor $property) { |
|
95 | + $constructorProperties = array_filter($this->beanPropertyDescriptors, function(AbstractBeanPropertyDescriptor $property) { |
|
96 | 96 | return $property->isCompulsory(); |
97 | 97 | }); |
98 | 98 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function getExposedProperties() |
108 | 108 | { |
109 | - $exposedProperties = array_filter($this->beanPropertyDescriptors, function (AbstractBeanPropertyDescriptor $property) { |
|
109 | + $exposedProperties = array_filter($this->beanPropertyDescriptors, function(AbstractBeanPropertyDescriptor $property) { |
|
110 | 110 | return $property->getTable()->getName() == $this->table->getName(); |
111 | 111 | }); |
112 | 112 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $fksByMethodName = []; |
272 | 272 | |
273 | 273 | foreach ($fksByTable as $tableName => $fksForTable) { |
274 | - if (count($fksForTable) > 1) { |
|
274 | + if (count($fksForTable)>1) { |
|
275 | 275 | foreach ($fksForTable as $fk) { |
276 | 276 | $methodName = 'get'.TDBMDaoGenerator::toCamelCase($fk->getLocalTableName()).'By'; |
277 | 277 | |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | |
386 | 386 | $finalDescs = []; |
387 | 387 | foreach ($descs as $descArray) { |
388 | - if (count($descArray) > 1) { |
|
388 | + if (count($descArray)>1) { |
|
389 | 389 | foreach ($descArray as $desc) { |
390 | 390 | $desc['name'] = TDBMDaoGenerator::toCamelCase($desc['remoteFK']->getForeignTableName()).'By'.TDBMDaoGenerator::toCamelCase($desc['table']->getName()); |
391 | 391 | $finalDescs[] = $desc; |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | $methodName = 'findBy'.implode('And', $methodNameComponent); |
628 | 628 | $calledMethod = 'find'; |
629 | 629 | } |
630 | - $functionParametersString = implode(', ',$functionParameters); |
|
630 | + $functionParametersString = implode(', ', $functionParameters); |
|
631 | 631 | |
632 | 632 | $count = 0; |
633 | 633 |