Passed
Push — master ( 15a314...775a22 )
by Jan
06:43
created
src/Doctrine/Purger/ResetAutoIncrementORMPurger.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
         ) ? $connection->getConfiguration()->getSchemaAssetsFilter() : null;
149 149
 
150 150
         //Disable foreign key checks
151
-        if($platform instanceof AbstractMySQLPlatform) {
151
+        if ($platform instanceof AbstractMySQLPlatform) {
152 152
             $connection->executeQuery('SET foreign_key_checks = 0;');
153 153
         }
154 154
 
155 155
         foreach ($orderedTables as $tbl) {
156 156
             // If we have a filter expression, check it and skip if necessary
157
-            if (! $emptyFilterExpression && ! preg_match($filterExpr, $tbl)) {
157
+            if (!$emptyFilterExpression && !preg_match($filterExpr, $tbl)) {
158 158
                 continue;
159 159
             }
160 160
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             }
165 165
 
166 166
             // Support schema asset filters as presented in
167
-            if (is_callable($schemaAssetsFilter) && ! $schemaAssetsFilter($tbl)) {
167
+            if (is_callable($schemaAssetsFilter) && !$schemaAssetsFilter($tbl)) {
168 168
                 continue;
169 169
             }
170 170
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         }
183 183
 
184 184
         //Reenable foreign key checks
185
-        if($platform instanceof AbstractMySQLPlatform) {
185
+        if ($platform instanceof AbstractMySQLPlatform) {
186 186
             $connection->executeQuery('SET foreign_key_checks = 1;');
187 187
         }
188 188
     }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     {
192 192
         $tableIdentifier = new Identifier($tableName);
193 193
 
194
-        return 'ALTER TABLE '. $tableIdentifier->getQuotedName($platform) .' AUTO_INCREMENT = 1;';
194
+        return 'ALTER TABLE '.$tableIdentifier->getQuotedName($platform).' AUTO_INCREMENT = 1;';
195 195
     }
196 196
 
197 197
     /**
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         $sorter = new TopologicalSorter();
205 205
 
206 206
         foreach ($classes as $class) {
207
-            if (! $sorter->hasNode($class->name)) {
207
+            if (!$sorter->hasNode($class->name)) {
208 208
                 $sorter->addNode($class->name, $class);
209 209
             }
210 210
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                 $parentClass     = $em->getClassMetadata($parentClass);
214 214
                 $parentClassName = $parentClass->getName();
215 215
 
216
-                if (! $sorter->hasNode($parentClassName)) {
216
+                if (!$sorter->hasNode($parentClassName)) {
217 217
                     $sorter->addNode($parentClassName, $parentClass);
218 218
                 }
219 219
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             }
222 222
 
223 223
             foreach ($class->associationMappings as $assoc) {
224
-                if (! $assoc['isOwningSide']) {
224
+                if (!$assoc['isOwningSide']) {
225 225
                     continue;
226 226
                 }
227 227
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
                 assert($targetClass instanceof ClassMetadata);
230 230
                 $targetClassName = $targetClass->getName();
231 231
 
232
-                if (! $sorter->hasNode($targetClassName)) {
232
+                if (!$sorter->hasNode($targetClassName)) {
233 233
                     $sorter->addNode($targetClassName, $targetClass);
234 234
                 }
235 235
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
                     $parentClass     = $em->getClassMetadata($parentClass);
242 242
                     $parentClassName = $parentClass->getName();
243 243
 
244
-                    if (! $sorter->hasNode($parentClassName)) {
244
+                    if (!$sorter->hasNode($parentClassName)) {
245 245
                         $sorter->addNode($parentClassName, $parentClass);
246 246
                     }
247 247
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
         foreach ($classes as $class) {
266 266
             foreach ($class->associationMappings as $assoc) {
267
-                if (! $assoc['isOwningSide'] || $assoc['type'] !== ClassMetadata::MANY_TO_MANY) {
267
+                if (!$assoc['isOwningSide'] || $assoc['type'] !== ClassMetadata::MANY_TO_MANY) {
268 268
                     continue;
269 269
                 }
270 270
 
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
 
278 278
     private function getTableName(ClassMetadata $class, AbstractPlatform $platform): string
279 279
     {
280
-        if (isset($class->table['schema']) && ! method_exists($class, 'getSchemaName')) {
281
-            return $class->table['schema'] . '.' .
280
+        if (isset($class->table['schema']) && !method_exists($class, 'getSchemaName')) {
281
+            return $class->table['schema'].'.'.
282 282
                 $this->em->getConfiguration()
283 283
                     ->getQuoteStrategy()
284 284
                     ->getTableName($class, $platform);
@@ -295,8 +295,8 @@  discard block
 block discarded – undo
295 295
         ClassMetadata $class,
296 296
         AbstractPlatform $platform
297 297
     ): string {
298
-        if (isset($assoc['joinTable']['schema']) && ! method_exists($class, 'getSchemaName')) {
299
-            return $assoc['joinTable']['schema'] . '.' .
298
+        if (isset($assoc['joinTable']['schema']) && !method_exists($class, 'getSchemaName')) {
299
+            return $assoc['joinTable']['schema'].'.'.
300 300
                 $this->em->getConfiguration()
301 301
                     ->getQuoteStrategy()
302 302
                     ->getJoinTableName($assoc, $class, $platform);
@@ -309,6 +309,6 @@  discard block
 block discarded – undo
309 309
     {
310 310
         $tableIdentifier = new Identifier($tableName);
311 311
 
312
-        return 'DELETE FROM ' . $tableIdentifier->getQuotedName($platform);
312
+        return 'DELETE FROM '.$tableIdentifier->getQuotedName($platform);
313 313
     }
314 314
 }
Please login to merge, or discard this patch.