Failed Conditions
Pull Request — master (#7867)
by
unknown
09:27
created
lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     ) : Mapping\ComponentMetadata {
146 146
         $this->reverseEngineerMappingFromDatabase();
147 147
 
148
-        if (! isset($this->classToTableNames[$className])) {
149
-            throw new InvalidArgumentException('Unknown class ' . $className);
148
+        if ( ! isset($this->classToTableNames[$className])) {
149
+            throw new InvalidArgumentException('Unknown class '.$className);
150 150
         }
151 151
 
152 152
         $metadata = new Mapping\ClassMetadata($className, $parent);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                     }
176 176
                 }
177 177
 
178
-                if (! $otherFk) {
178
+                if ( ! $otherFk) {
179 179
                     // the definition of this many to many table does not contain
180 180
                     // enough foreign key information to continue reverse engineering.
181 181
                     continue;
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
                 $associationMapping['targetEntity'] = $this->getClassNameForTable($otherFk->getForeignTableName());
189 189
 
190 190
                 if (isset($metadata->fieldMappings[$associationMapping['fieldName']]) || isset($metadata->associationMappings[$associationMapping['fieldName']])) {
191
-                        $ii =2;
192
-                    while (isset($metadata->fieldMappings[$associationMapping['fieldName'] . (string) $ii]) || isset($metadata->associationMappings[$associationMapping['fieldName'] . (string) $ii])) {
191
+                        $ii = 2;
192
+                    while (isset($metadata->fieldMappings[$associationMapping['fieldName'].(string) $ii]) || isset($metadata->associationMappings[$associationMapping['fieldName'].(string) $ii])) {
193 193
                             $ii++;
194 194
                     }
195 195
                         $associationMapping['fieldName'] .= (string) $ii;
@@ -266,9 +266,9 @@  discard block
 block discarded – undo
266 266
                 $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns());
267 267
             }
268 268
 
269
-            if (! $table->hasPrimaryKey()) {
269
+            if ( ! $table->hasPrimaryKey()) {
270 270
                 throw new Mapping\MappingException(
271
-                    'Table ' . $table->getName() . ' has no primary key. Doctrine does not ' .
271
+                    'Table '.$table->getName().' has no primary key. Doctrine does not '.
272 272
                     "support reverse engineering from tables that don't have a primary key."
273 273
                 );
274 274
             }
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
             }
466 466
 
467 467
             // Here we need to check if $fkColumns are the same as $primaryKeys
468
-            if (! array_diff($fkColumns, $primaryKeys)) {
468
+            if ( ! array_diff($fkColumns, $primaryKeys)) {
469 469
                 $metadata->addProperty($associationMapping);
470 470
             } else {
471 471
                 $metadata->addProperty($associationMapping);
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
      */
511 511
     private function getClassNameForTable($tableName)
512 512
     {
513
-        return $this->namespace . (
513
+        return $this->namespace.(
514 514
             $this->classNamesForTables[$tableName]
515 515
                 ?? Inflector::classify(strtolower($tableName))
516 516
         );
Please login to merge, or discard this patch.