Completed
Pull Request — 4.2 (#120)
by Marc
06:38
created
src/Mouf/Database/TDBM/QueryFactory/FindObjectsFromSqlQueryFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,17 +55,17 @@  discard block
 block discarded – undo
55 55
             ];
56 56
         }
57 57
 
58
-        $sql = 'SELECT DISTINCT '.implode(', ', array_map(function ($columnDesc) {
58
+        $sql = 'SELECT DISTINCT '.implode(', ', array_map(function($columnDesc) {
59 59
             return $this->tdbmService->getConnection()->quoteIdentifier($this->mainTable).'.'.$this->tdbmService->getConnection()->quoteIdentifier($columnDesc['column']);
60 60
         }, $columnDescList)).' FROM '.$this->from;
61 61
 
62
-        if (count($allFetchedTables) > 1 || $this->orderBy) {
62
+        if (count($allFetchedTables)>1 || $this->orderBy) {
63 63
             list($columnDescList, $columnsList, $orderString) = $this->getColumnsList($this->mainTable, [], $this->orderBy);
64 64
         }
65 65
 
66 66
         // Let's compute the COUNT.
67 67
         $pkColumnNames = $this->schema->getTable($this->mainTable)->getPrimaryKeyColumns();
68
-        $pkColumnNames = array_map(function ($pkColumn) {
68
+        $pkColumnNames = array_map(function($pkColumn) {
69 69
             return $this->tdbmService->getConnection()->quoteIdentifier($this->mainTable).'.'.$this->tdbmService->getConnection()->quoteIdentifier($pkColumn);
70 70
         }, $pkColumnNames);
71 71
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     private function getParentRelationshipForeignKeys($tableName)
128 128
     {
129
-        return $this->fromCache($this->cachePrefix.'_parentrelationshipfks_'.$tableName, function () use ($tableName) {
129
+        return $this->fromCache($this->cachePrefix.'_parentrelationshipfks_'.$tableName, function() use ($tableName) {
130 130
             return $this->getParentRelationshipForeignKeysWithoutCache($tableName);
131 131
         });
132 132
     }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      */
156 156
     private function getChildrenRelationshipForeignKeys(string $tableName) : array
157 157
     {
158
-        return $this->fromCache($this->cachePrefix.'_childrenrelationshipfks_'.$tableName, function () use ($tableName) {
158
+        return $this->fromCache($this->cachePrefix.'_childrenrelationshipfks_'.$tableName, function() use ($tableName) {
159 159
             return $this->getChildrenRelationshipForeignKeysWithoutCache($tableName);
160 160
         });
161 161
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         $children = $this->schemaAnalyzer->getChildrenRelationships($tableName);
171 171
 
172 172
         if (!empty($children)) {
173
-            $fksTables = array_map(function (ForeignKeyConstraint $fk) {
173
+            $fksTables = array_map(function(ForeignKeyConstraint $fk) {
174 174
                 return $this->getChildrenRelationshipForeignKeys($fk->getLocalTableName());
175 175
             }, $children);
176 176
 
Please login to merge, or discard this patch.