@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $classes = []; |
| 100 | 100 | |
| 101 | 101 | foreach ($this->em->getMetadataFactory()->getAllMetadata() as $metadata) { |
| 102 | - if (! $metadata->isMappedSuperclass && ! (isset($metadata->isEmbeddedClass) && $metadata->isEmbeddedClass)) { |
|
| 102 | + if ( ! $metadata->isMappedSuperclass && ! (isset($metadata->isEmbeddedClass) && $metadata->isEmbeddedClass)) { |
|
| 103 | 103 | $classes[] = $metadata; |
| 104 | 104 | } |
| 105 | 105 | } |
@@ -136,9 +136,9 @@ discard block |
||
| 136 | 136 | $singleQueryTruncateSupported = $platform instanceof PostgreSqlPlatform; |
| 137 | 137 | $tablesToTruncate = []; |
| 138 | 138 | |
| 139 | - foreach($orderedTables as $tbl) { |
|
| 139 | + foreach ($orderedTables as $tbl) { |
|
| 140 | 140 | // If we have a filter expression, check it and skip if necessary |
| 141 | - if (!$emptyFilterExpression && !preg_match($filterExpr, $tbl)) { |
|
| 141 | + if ( ! $emptyFilterExpression && ! preg_match($filterExpr, $tbl)) { |
|
| 142 | 142 | continue; |
| 143 | 143 | } |
| 144 | 144 | |
@@ -148,20 +148,20 @@ discard block |
||
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | // Support schema asset filters as presented in |
| 151 | - if (is_callable($schemaAssetsFilter) && !$schemaAssetsFilter($tbl)) { |
|
| 151 | + if (is_callable($schemaAssetsFilter) && ! $schemaAssetsFilter($tbl)) { |
|
| 152 | 152 | continue; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | if ($this->purgeMode === self::PURGE_MODE_DELETE) { |
| 156 | - $connection->executeUpdate("DELETE FROM " . $tbl); |
|
| 156 | + $connection->executeUpdate("DELETE FROM ".$tbl); |
|
| 157 | 157 | } elseif ($this->purgeMode === self::PURGE_MODE_TRUNCATE && $singleQueryTruncateSupported === true) { |
| 158 | 158 | $tablesToTruncate[] = $tbl; |
| 159 | 159 | } else { |
| 160 | 160 | $connection->executeUpdate($platform->getTruncateTableSQL($tbl, true)); |
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | - if (count($tablesToTruncate) >0) { |
|
| 164 | - $connection->executeUpdate("TRUNCATE " . implode(", ", $tablesToTruncate) . " CASCADE"); |
|
| 163 | + if (count($tablesToTruncate) > 0) { |
|
| 164 | + $connection->executeUpdate("TRUNCATE ".implode(", ", $tablesToTruncate)." CASCADE"); |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | */ |
| 252 | 252 | private function getTableName($class, $platform) |
| 253 | 253 | { |
| 254 | - if (isset($class->table['schema']) && !method_exists($class, 'getSchemaName')) { |
|
| 254 | + if (isset($class->table['schema']) && ! method_exists($class, 'getSchemaName')) { |
|
| 255 | 255 | return $class->table['schema'].'.'.$this->em->getConfiguration()->getQuoteStrategy()->getTableName($class, $platform); |
| 256 | 256 | } |
| 257 | 257 | |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | */ |
| 268 | 268 | private function getJoinTableName($assoc, $class, $platform) |
| 269 | 269 | { |
| 270 | - if (isset($assoc['joinTable']['schema']) && !method_exists($class, 'getSchemaName')) { |
|
| 270 | + if (isset($assoc['joinTable']['schema']) && ! method_exists($class, 'getSchemaName')) { |
|
| 271 | 271 | return $assoc['joinTable']['schema'].'.'.$this->em->getConfiguration()->getQuoteStrategy()->getJoinTableName($assoc, $class, $platform); |
| 272 | 272 | } |
| 273 | 273 | |