Failed Conditions
Pull Request — master (#7867)
by
unknown
10:32
created
lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@
 block discarded – undo
187 187
                 $associationMapping['fieldName']    = $this->getFieldNameForColumn($manyTable->getName(), current($otherFk->getColumns()), true);
188 188
                 $associationMapping['targetEntity'] = $this->getClassNameForTable($otherFk->getForeignTableName());
189 189
 
190
-		if (isset($metadata->fieldMappings[$associationMapping['fieldName']])
190
+        if (isset($metadata->fieldMappings[$associationMapping['fieldName']])
191 191
                         || isset($metadata->associationMappings[$associationMapping['fieldName']])) {
192 192
                         $ii=2;
193 193
                         while ( isset($metadata->fieldMappings[$associationMapping['fieldName'].(string)$ii]) ||
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 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;
@@ -189,12 +189,12 @@  discard block
 block discarded – undo
189 189
 
190 190
 		if (isset($metadata->fieldMappings[$associationMapping['fieldName']])
191 191
                         || isset($metadata->associationMappings[$associationMapping['fieldName']])) {
192
-                        $ii=2;
193
-                        while ( isset($metadata->fieldMappings[$associationMapping['fieldName'].(string)$ii]) ||
194
-                                isset($metadata->associationMappings[$associationMapping['fieldName'].(string)$ii])) {
192
+                        $ii = 2;
193
+                        while (isset($metadata->fieldMappings[$associationMapping['fieldName'].(string) $ii]) ||
194
+                                isset($metadata->associationMappings[$associationMapping['fieldName'].(string) $ii])) {
195 195
                                 $ii++;
196 196
                         }
197
-                        $associationMapping['fieldName'] .= (string)$ii; 
197
+                        $associationMapping['fieldName'] .= (string) $ii; 
198 198
                 }
199 199
 
200 200
                 if (current($manyTable->getColumns())->getName() === $localColumn) {
@@ -268,9 +268,9 @@  discard block
 block discarded – undo
268 268
                 $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns());
269 269
             }
270 270
 
271
-            if (! $table->hasPrimaryKey()) {
271
+            if ( ! $table->hasPrimaryKey()) {
272 272
                 throw new Mapping\MappingException(
273
-                    'Table ' . $table->getName() . ' has no primary key. Doctrine does not ' .
273
+                    'Table '.$table->getName().' has no primary key. Doctrine does not '.
274 274
                     "support reverse engineering from tables that don't have a primary key."
275 275
                 );
276 276
             }
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
             }
468 468
 
469 469
             // Here we need to check if $fkColumns are the same as $primaryKeys
470
-            if (! array_diff($fkColumns, $primaryKeys)) {
470
+            if ( ! array_diff($fkColumns, $primaryKeys)) {
471 471
                 $metadata->addProperty($associationMapping);
472 472
             } else {
473 473
                 $metadata->addProperty($associationMapping);
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
      */
513 513
     private function getClassNameForTable($tableName)
514 514
     {
515
-        return $this->namespace . (
515
+        return $this->namespace.(
516 516
             $this->classNamesForTables[$tableName]
517 517
                 ?? Inflector::classify(strtolower($tableName))
518 518
         );
Please login to merge, or discard this patch.