@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - if ($mode === 'list_parts_root' ||$mode === 'devices') { |
|
| 143 | + if ($mode === 'list_parts_root' || $mode === 'devices') { |
|
| 144 | 144 | $root_node = new TreeViewNode($this->translator->trans('tree.root_node.text'), null, $generic); |
| 145 | 145 | $root_node->setExpanded(true); |
| 146 | 146 | $generic = [$root_node]; |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $secure_class_name = str_replace('\\', '_', $class); |
| 180 | 180 | $key = 'treeview_'.$this->keyGenerator->generateKey().'_'.$secure_class_name; |
| 181 | 181 | |
| 182 | - return $this->cache->get($key, function (ItemInterface $item) use ($repo, $parent, $secure_class_name) { |
|
| 182 | + return $this->cache->get($key, function(ItemInterface $item) use ($repo, $parent, $secure_class_name) { |
|
| 183 | 183 | // Invalidate when groups, a element with the class or the user changes |
| 184 | 184 | $item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]); |
| 185 | 185 | |
@@ -148,13 +148,13 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |