Completed
Pull Request — 4.3 (#148)
by Dorian
15:53
created
src/Mouf/Database/TDBM/QueryFactory/FindObjectsFromSqlQueryFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.