@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | $pkColumns = []; |
181 | 181 | |
182 | 182 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
183 | - if (! ($property instanceof FieldMetadata)) { |
|
183 | + if ( ! ($property instanceof FieldMetadata)) { |
|
184 | 184 | continue; |
185 | 185 | } |
186 | 186 | |
187 | - if (! $class->isInheritedProperty($fieldName)) { |
|
187 | + if ( ! $class->isInheritedProperty($fieldName)) { |
|
188 | 188 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
189 | 189 | |
190 | 190 | $this->gatherColumn($class, $property, $table); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | } |
221 | 221 | |
222 | - if (! empty($inheritedKeyColumns)) { |
|
222 | + if ( ! empty($inheritedKeyColumns)) { |
|
223 | 223 | // Add a FK constraint on the ID column |
224 | 224 | $rootClass = $this->em->getClassMetadata($class->getRootClassName()); |
225 | 225 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | } |
265 | 265 | } |
266 | 266 | |
267 | - if (! $table->hasIndex('primary')) { |
|
267 | + if ( ! $table->hasIndex('primary')) { |
|
268 | 268 | $table->setPrimaryKey($pkColumns); |
269 | 269 | } |
270 | 270 | |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | $processedClasses[$class->getClassName()] = true; |
325 | 325 | |
326 | 326 | foreach ($class->getPropertiesIterator() as $property) { |
327 | - if (! $property instanceof FieldMetadata |
|
327 | + if ( ! $property instanceof FieldMetadata |
|
328 | 328 | || ! $property->hasValueGenerator() |
329 | 329 | || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE |
330 | 330 | || $class->getClassName() !== $class->getRootClassName()) { |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | $generator = $property->getValueGenerator()->getGenerator(); |
335 | 335 | $quotedName = $generator->getSequenceName(); |
336 | 336 | |
337 | - if (! $schema->hasSequence($quotedName)) { |
|
337 | + if ( ! $schema->hasSequence($quotedName)) { |
|
338 | 338 | $schema->createSequence($quotedName, $generator->getAllocationSize()); |
339 | 339 | } |
340 | 340 | } |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | } |
348 | 348 | } |
349 | 349 | |
350 | - if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
350 | + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
351 | 351 | $schema->visit(new RemoveNamespacedAssets()); |
352 | 352 | } |
353 | 353 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | break; |
387 | 387 | } |
388 | 388 | |
389 | - if (! empty($discrColumn->getColumnDefinition())) { |
|
389 | + if ( ! empty($discrColumn->getColumnDefinition())) { |
|
390 | 390 | $options['columnDefinition'] = $discrColumn->getColumnDefinition(); |
391 | 391 | } |
392 | 392 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $pkColumns = []; |
405 | 405 | |
406 | 406 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
407 | - if (! ($property instanceof FieldMetadata)) { |
|
407 | + if ( ! ($property instanceof FieldMetadata)) { |
|
408 | 408 | continue; |
409 | 409 | } |
410 | 410 | |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) |
509 | 509 | { |
510 | 510 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
511 | - if (! ($property instanceof AssociationMetadata)) { |
|
511 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
512 | 512 | continue; |
513 | 513 | } |
514 | 514 | |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | continue; |
517 | 517 | } |
518 | 518 | |
519 | - if (! $property->isOwningSide()) { |
|
519 | + if ( ! $property->isOwningSide()) { |
|
520 | 520 | continue; |
521 | 521 | } |
522 | 522 | |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | $idColumns = $class->getIdentifierColumns($this->em); |
607 | 607 | $idColumnNameList = array_keys($idColumns); |
608 | 608 | |
609 | - if (! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
609 | + if ( ! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
610 | 610 | return null; |
611 | 611 | } |
612 | 612 | |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | foreach ($class->getIdentifierFieldNames() as $fieldName) { |
615 | 615 | $property = $class->getProperty($fieldName); |
616 | 616 | |
617 | - if (! ($property instanceof AssociationMetadata)) { |
|
617 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
618 | 618 | continue; |
619 | 619 | } |
620 | 620 | |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $joinColumn->getReferencedColumnName() |
671 | 671 | ); |
672 | 672 | |
673 | - if (! $definingClass) { |
|
673 | + if ( ! $definingClass) { |
|
674 | 674 | throw MissingColumnException::fromColumnSourceAndTarget( |
675 | 675 | $joinColumn->getReferencedColumnName(), |
676 | 676 | $mapping->getSourceEntity(), |
@@ -685,14 +685,14 @@ discard block |
||
685 | 685 | $localColumns[] = $quotedColumnName; |
686 | 686 | $foreignColumns[] = $quotedReferencedColumnName; |
687 | 687 | |
688 | - if (! $theJoinTable->hasColumn($quotedColumnName)) { |
|
688 | + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { |
|
689 | 689 | // Only add the column to the table if it does not exist already. |
690 | 690 | // It might exist already if the foreign key is mapped into a regular |
691 | 691 | // property as well. |
692 | 692 | $property = $definingClass->getProperty($referencedFieldName); |
693 | 693 | $columnDef = null; |
694 | 694 | |
695 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
695 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
696 | 696 | $columnDef = $joinColumn->getColumnDefinition(); |
697 | 697 | } elseif ($property->getColumnDefinition()) { |
698 | 698 | $columnDef = $property->getColumnDefinition(); |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
725 | 725 | } |
726 | 726 | |
727 | - if (! empty($joinColumn->getOnDelete())) { |
|
727 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
728 | 728 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
729 | 729 | } |
730 | 730 | } |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
736 | 736 | } |
737 | 737 | |
738 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
738 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
739 | 739 | |
740 | 740 | if ($this->platform->supportsForeignKeyConstraints()) { |
741 | 741 | if (isset($addedFks[$compositeName]) |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | } |
754 | 754 | |
755 | 755 | $blacklistedFks[$compositeName] = true; |
756 | - } elseif (!isset($blacklistedFks[$compositeName])) { |
|
756 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
757 | 757 | $addedFks[$compositeName] = [ |
758 | 758 | 'foreignTableName' => $foreignTableName, |
759 | 759 | 'foreignColumns' => $foreignColumns, |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | $fullSchema = $sm->createSchema(); |
854 | 854 | |
855 | 855 | foreach ($fullSchema->getTables() as $table) { |
856 | - if (! $schema->hasTable($table->getName())) { |
|
856 | + if ( ! $schema->hasTable($table->getName())) { |
|
857 | 857 | foreach ($table->getForeignKeys() as $foreignKey) { |
858 | 858 | /** @var $foreignKey ForeignKeyConstraint */ |
859 | 859 | if ($schema->hasTable($foreignKey->getForeignTableName())) { |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | if ($table->hasPrimaryKey()) { |
879 | 879 | $columns = $table->getPrimaryKey()->getColumns(); |
880 | 880 | if (count($columns) === 1) { |
881 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
881 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
882 | 882 | if ($fullSchema->hasSequence($checkSequence)) { |
883 | 883 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
884 | 884 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function testForeignKeyOnSTIWithMultipleMapping() : void |
20 | 20 | { |
21 | - if (!$this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
21 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
22 | 22 | $this->markTestSkipped('Platform does not support foreign keys.'); |
23 | 23 | } |
24 | 24 | $schema = $this->schemaTool->getSchemaFromMetadata( |