@@ -46,14 +46,14 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | // Let's compute the COUNT. |
| 48 | 48 | $pkColumnNames = $this->schema->getTable($this->mainTable)->getPrimaryKeyColumns(); |
| 49 | - $pkColumnNames = array_map(function ($pkColumn) { |
|
| 49 | + $pkColumnNames = array_map(function($pkColumn) { |
|
| 50 | 50 | return $this->tdbmService->getConnection()->quoteIdentifier($this->mainTable).'.'.$this->tdbmService->getConnection()->quoteIdentifier($pkColumn); |
| 51 | 51 | }, $pkColumnNames); |
| 52 | 52 | |
| 53 | 53 | $countSql = 'SELECT COUNT(DISTINCT '.implode(', ', $pkColumnNames).') FROM '.$this->from; |
| 54 | 54 | |
| 55 | 55 | // Add joins on inherited tables if necessary |
| 56 | - if (count($allFetchedTables) > 1) { |
|
| 56 | + if (count($allFetchedTables)>1) { |
|
| 57 | 57 | $joinSql = ''; |
| 58 | 58 | $parentFks = $this->getParentRelationshipForeignKeys($this->mainTable); |
| 59 | 59 | foreach ($parentFks as $fk) { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | private function getParentRelationshipForeignKeys($tableName) |
| 107 | 107 | { |
| 108 | - return $this->fromCache($this->cachePrefix.'_parentrelationshipfks_'.$tableName, function () use ($tableName) { |
|
| 108 | + return $this->fromCache($this->cachePrefix.'_parentrelationshipfks_'.$tableName, function() use ($tableName) { |
|
| 109 | 109 | return $this->getParentRelationshipForeignKeysWithoutCache($tableName); |
| 110 | 110 | }); |
| 111 | 111 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | private function getChildrenRelationshipForeignKeys(string $tableName) : array |
| 136 | 136 | { |
| 137 | - return $this->fromCache($this->cachePrefix.'_childrenrelationshipfks_'.$tableName, function () use ($tableName) { |
|
| 137 | + return $this->fromCache($this->cachePrefix.'_childrenrelationshipfks_'.$tableName, function() use ($tableName) { |
|
| 138 | 138 | return $this->getChildrenRelationshipForeignKeysWithoutCache($tableName); |
| 139 | 139 | }); |
| 140 | 140 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $children = $this->schemaAnalyzer->getChildrenRelationships($tableName); |
| 150 | 150 | |
| 151 | 151 | if (!empty($children)) { |
| 152 | - $fksTables = array_map(function (ForeignKeyConstraint $fk) { |
|
| 152 | + $fksTables = array_map(function(ForeignKeyConstraint $fk) { |
|
| 153 | 153 | return $this->getChildrenRelationshipForeignKeys($fk->getLocalTableName()); |
| 154 | 154 | }, $children); |
| 155 | 155 | |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | throw new TDBMException('Missing tables '.implode(', ', $missingTables).' in SELECT statement'); |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | - for ($i = 0; $i < count($formattedSelect) - 1; $i++) { |
|
| 181 | + for ($i = 0; $i<count($formattedSelect)-1; $i++) { |
|
| 182 | 182 | $formattedSelect[$i]['delim'] = ','; |
| 183 | 183 | } |
| 184 | 184 | return [$formattedSelect, $columnDescritors]; |