Passed
Push — master ( b9880b...e1bb9e )
by Guilherme
09:04
created
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 use function strtoupper;
40 40
 use function unserialize;
41 41
 
42
-require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
42
+require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
43 43
 
44 44
 class ClassMetadataTest extends OrmTestCase
45 45
 {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     public function testMapAssociationInGlobalNamespace() : void
184 184
     {
185
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
185
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
186 186
 
187 187
         $cm = new ClassMetadata(DoctrineGlobalArticle::class, null, $this->metadataBuildingContext);
188 188
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_article'));
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
      */
279 279
     public function testSetDiscriminatorMapInGlobalNamespace() : void
280 280
     {
281
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
281
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
282 282
 
283 283
         $cm = new ClassMetadata('DoctrineGlobalUser', null, $this->metadataBuildingContext);
284 284
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_user'));
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
      */
295 295
     public function testSetSubClassesInGlobalNamespace() : void
296 296
     {
297
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
297
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
298 298
 
299 299
         $cm = new ClassMetadata('DoctrineGlobalUser', null, $this->metadataBuildingContext);
300 300
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_user'));
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
     public function testEmptyFieldNameThrowsException() : void
776 776
     {
777 777
         $this->expectException(MappingException::class);
778
-        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'.");
778
+        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'.");
779 779
 
780 780
         $cm = new ClassMetadata(CMS\CmsUser::class, null, $this->metadataBuildingContext);
781 781
         $cm->setTable(new Mapping\TableMetadata('cms_users'));
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
         $cm->addLifecycleCallback('postLoad', 'notfound');
826 826
 
827 827
         $this->expectException(MappingException::class);
828
-        $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no public method 'notfound' to be registered as lifecycle callback.");
828
+        $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no public method 'notfound' to be registered as lifecycle callback.");
829 829
 
830 830
         $cm->validateLifecycleCallbacks(new RuntimeReflectionService());
831 831
     }
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
         $cm->addProperty($association);
846 846
 
847 847
         $this->expectException(MappingException::class);
848
-        $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'.");
848
+        $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'.");
849 849
 
850 850
         $cm->validateAssociations();
851 851
     }
@@ -1089,6 +1089,6 @@  discard block
 block discarded – undo
1089 1089
      */
1090 1090
     public function propertyToColumnName(string $propertyName, ?string $className = null) : string
1091 1091
     {
1092
-        return strtolower($this->classToTableName($className)) . '_' . $propertyName;
1092
+        return strtolower($this->classToTableName($className)).'_'.$propertyName;
1093 1093
     }
1094 1094
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/SchemaTool.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
                     $pkColumns = [];
182 182
 
183 183
                     foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) {
184
-                        if (! ($property instanceof FieldMetadata)) {
184
+                        if ( ! ($property instanceof FieldMetadata)) {
185 185
                             continue;
186 186
                         }
187 187
 
188
-                        if (! $class->isInheritedProperty($fieldName)) {
188
+                        if ( ! $class->isInheritedProperty($fieldName)) {
189 189
                             $columnName = $this->platform->quoteIdentifier($property->getColumnName());
190 190
 
191 191
                             $this->gatherColumn($class, $property, $table);
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
                             }
221 221
                         }
222 222
 
223
-                        if (! empty($inheritedKeyColumns)) {
223
+                        if ( ! empty($inheritedKeyColumns)) {
224 224
                             // Add a FK constraint on the ID column
225 225
                             $rootClass = $this->em->getClassMetadata($class->getRootClassName());
226 226
 
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
                 }
266 266
             }
267 267
 
268
-            if (! $table->hasIndex('primary')) {
268
+            if ( ! $table->hasIndex('primary')) {
269 269
                 $table->setPrimaryKey($pkColumns);
270 270
             }
271 271
 
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
             $processedClasses[$class->getClassName()] = true;
326 326
 
327 327
             foreach ($class->getDeclaredPropertiesIterator() as $property) {
328
-                if (! $property instanceof FieldMetadata
328
+                if ( ! $property instanceof FieldMetadata
329 329
                     || ! $property->hasValueGenerator()
330 330
                     || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE
331 331
                     || $class->getClassName() !== $class->getRootClassName()) {
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 
335 335
                 $quotedName = $this->platform->quoteIdentifier($property->getValueGenerator()->getDefinition()['sequenceName']);
336 336
 
337
-                if (! $schema->hasSequence($quotedName)) {
337
+                if ( ! $schema->hasSequence($quotedName)) {
338 338
                     $schema->createSequence($quotedName, $property->getValueGenerator()->getDefinition()['allocationSize']);
339 339
                 }
340 340
             }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
404 404
         $pkColumns = [];
405 405
 
406 406
         foreach ($class->getDeclaredPropertiesIterator() 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
 block discarded – undo
508 508
     private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks)
509 509
     {
510 510
         foreach ($class->getDeclaredPropertiesIterator() 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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 (isset($addedFks[$compositeName])
741 741
             && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName']
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
             }
753 753
 
754 754
             $blacklistedFks[$compositeName] = true;
755
-        } elseif (! isset($blacklistedFks[$compositeName])) {
755
+        } elseif ( ! isset($blacklistedFks[$compositeName])) {
756 756
             $addedFks[$compositeName] = [
757 757
                 'foreignTableName' => $foreignTableName,
758 758
                 'foreignColumns'   => $foreignColumns,
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
         $fullSchema = $sm->createSchema();
852 852
 
853 853
         foreach ($fullSchema->getTables() as $table) {
854
-            if (! $schema->hasTable($table->getName())) {
854
+            if ( ! $schema->hasTable($table->getName())) {
855 855
                 foreach ($table->getForeignKeys() as $foreignKey) {
856 856
                     /** @var $foreignKey ForeignKeyConstraint */
857 857
                     if ($schema->hasTable($foreignKey->getForeignTableName())) {
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
                 if ($table->hasPrimaryKey()) {
877 877
                     $columns = $table->getPrimaryKey()->getColumns();
878 878
                     if (count($columns) === 1) {
879
-                        $checkSequence = $table->getName() . '_' . $columns[0] . '_seq';
879
+                        $checkSequence = $table->getName().'_'.$columns[0].'_seq';
880 880
                         if ($fullSchema->hasSequence($checkSequence)) {
881 881
                             $visitor->acceptSequence($fullSchema->getSequence($checkSequence));
882 882
                         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/AttachEntityListenersListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         /** @var Mapping\ClassMetadata $metadata */
46 46
         $metadata = $event->getClassMetadata();
47 47
 
48
-        if (! isset($this->entityListeners[$metadata->getClassName()])) {
48
+        if ( ! isset($this->entityListeners[$metadata->getClassName()])) {
49 49
             return;
50 50
         }
51 51
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/SqlWalker.php 1 patch
Spacing   +124 added lines, -124 removed lines patch added patch discarded remove patch
@@ -270,10 +270,10 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function getSQLTableAlias($tableName, $dqlAlias = '')
272 272
     {
273
-        $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : '';
273
+        $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : '';
274 274
 
275
-        if (! isset($this->tableAliasMap[$tableName])) {
276
-            $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++;
275
+        if ( ! isset($this->tableAliasMap[$tableName])) {
276
+            $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++;
277 277
         }
278 278
 
279 279
         return $this->tableAliasMap[$tableName];
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      */
292 292
     public function setSQLTableAlias($tableName, $alias, $dqlAlias = '')
293 293
     {
294
-        $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : '';
294
+        $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : '';
295 295
 
296 296
         $this->tableAliasMap[$tableName] = $alias;
297 297
 
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
      */
306 306
     public function getSQLColumnAlias()
307 307
     {
308
-        return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++);
308
+        return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++);
309 309
     }
310 310
 
311 311
     /**
@@ -332,14 +332,14 @@  discard block
 block discarded – undo
332 332
 
333 333
             // If this is a joined association we must use left joins to preserve the correct result.
334 334
             $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER ';
335
-            $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
335
+            $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON ';
336 336
 
337 337
             $sqlParts = [];
338 338
 
339 339
             foreach ($class->getIdentifierColumns($this->em) as $column) {
340 340
                 $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
341 341
 
342
-                $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
342
+                $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
343 343
             }
344 344
 
345 345
             $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias);
@@ -363,14 +363,14 @@  discard block
 block discarded – undo
363 363
             $tableName  = $subClass->table->getQuotedQualifiedName($this->platform);
364 364
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
365 365
 
366
-            $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
366
+            $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
367 367
 
368 368
             $sqlParts = [];
369 369
 
370 370
             foreach ($subClass->getIdentifierColumns($this->em) as $column) {
371 371
                 $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
372 372
 
373
-                $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
373
+                $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
374 374
             }
375 375
 
376 376
             $sql .= implode(' AND ', $sqlParts);
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
             $qComp       = $this->queryComponents[$dqlAlias];
392 392
             $association = $qComp['relation'];
393 393
 
394
-            if (! ($association instanceof ToManyAssociationMetadata)) {
394
+            if ( ! ($association instanceof ToManyAssociationMetadata)) {
395 395
                 continue;
396 396
             }
397 397
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
                 $property      = $qComp['metadata']->getProperty($fieldName);
400 400
                 $tableName     = $property->getTableName();
401 401
                 $columnName    = $this->platform->quoteIdentifier($property->getColumnName());
402
-                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName;
402
+                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName;
403 403
 
404 404
                 // OrderByClause should replace an ordered relation. see - DDC-2475
405 405
                 if (isset($this->orderedColumnsMap[$orderedColumn])) {
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                 }
408 408
 
409 409
                 $this->orderedColumnsMap[$orderedColumn] = $orientation;
410
-                $orderedColumns[]                        = $orderedColumn . ' ' . $orientation;
410
+                $orderedColumns[]                        = $orderedColumn.' '.$orientation;
411 411
             }
412 412
         }
413 413
 
@@ -447,19 +447,19 @@  discard block
 block discarded – undo
447 447
             $discrColumnType  = $discrColumn->getType();
448 448
             $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
449 449
             $sqlTableAlias    = $this->useSqlTableAliases
450
-                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
450
+                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
451 451
                 : '';
452 452
 
453 453
             $sqlParts[] = sprintf(
454 454
                 '%s IN (%s)',
455
-                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
455
+                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
456 456
                 implode(', ', $values)
457 457
             );
458 458
         }
459 459
 
460 460
         $sql = implode(' AND ', $sqlParts);
461 461
 
462
-        return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql;
462
+        return isset($sqlParts[1]) ? '('.$sql.')' : $sql;
463 463
     }
464 464
 
465 465
     /**
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
      */
473 473
     private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
474 474
     {
475
-        if (! $this->em->hasFilters()) {
475
+        if ( ! $this->em->hasFilters()) {
476 476
             return '';
477 477
         }
478 478
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
             $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias);
506 506
 
507 507
             if ($filterExpr !== '') {
508
-                $filterClauses[] = '(' . $filterExpr . ')';
508
+                $filterClauses[] = '('.$filterExpr.')';
509 509
             }
510 510
         }
511 511
 
@@ -536,11 +536,11 @@  discard block
 block discarded – undo
536 536
             $sql .= $this->walkOrderByClause($AST->orderByClause);
537 537
         }
538 538
 
539
-        if (! $AST->orderByClause) {
539
+        if ( ! $AST->orderByClause) {
540 540
             $orderBySql = $this->generateOrderedCollectionOrderByItems();
541 541
 
542 542
             if ($orderBySql) {
543
-                $sql .= ' ORDER BY ' . $orderBySql;
543
+                $sql .= ' ORDER BY '.$orderBySql;
544 544
             }
545 545
         }
546 546
 
@@ -553,11 +553,11 @@  discard block
 block discarded – undo
553 553
         }
554 554
 
555 555
         if ($lockMode === LockMode::PESSIMISTIC_READ) {
556
-            return $sql . ' ' . $this->platform->getReadLockSQL();
556
+            return $sql.' '.$this->platform->getReadLockSQL();
557 557
         }
558 558
 
559 559
         if ($lockMode === LockMode::PESSIMISTIC_WRITE) {
560
-            return $sql . ' ' . $this->platform->getWriteLockSQL();
560
+            return $sql.' '.$this->platform->getWriteLockSQL();
561 561
         }
562 562
 
563 563
         if ($lockMode !== LockMode::OPTIMISTIC) {
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
         }
566 566
 
567 567
         foreach ($this->selectedClasses as $selectedClass) {
568
-            if (! $selectedClass['class']->isVersioned()) {
568
+            if ( ! $selectedClass['class']->isVersioned()) {
569 569
                 throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName());
570 570
             }
571 571
         }
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
         foreach ($class->getIdentifierColumns($this->em) as $column) {
615 615
             $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
616 616
 
617
-            $sqlParts[] = $tableAlias . '.' . $quotedColumnName;
617
+            $sqlParts[] = $tableAlias.'.'.$quotedColumnName;
618 618
         }
619 619
 
620 620
         return implode(', ', $sqlParts);
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
     {
633 633
         $class = $this->queryComponents[$identificationVariable]['metadata'];
634 634
 
635
-        if (! $fieldName) {
635
+        if ( ! $fieldName) {
636 636
             return $this->getSQLTableAlias($class->getTableName(), $identificationVariable);
637 637
         }
638 638
 
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
                 $property  = $class->getProperty($fieldName);
662 662
 
663 663
                 if ($this->useSqlTableAliases) {
664
-                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.';
664
+                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.';
665 665
                 }
666 666
 
667 667
                 $sql .= $this->platform->quoteIdentifier($property->getColumnName());
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
                 $class       = $this->queryComponents[$dqlAlias]['metadata'];
676 676
                 $association = $class->getProperty($fieldName);
677 677
 
678
-                if (! $association->isOwningSide()) {
678
+                if ( ! $association->isOwningSide()) {
679 679
                     throw QueryException::associationPathInverseSideNotSupported($pathExpr);
680 680
                 }
681 681
 
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
                 $joinColumn = reset($joinColumns);
690 690
 
691 691
                 if ($this->useSqlTableAliases) {
692
-                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.';
692
+                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.';
693 693
                 }
694 694
 
695 695
                 $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName());
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
      */
708 708
     public function walkSelectClause($selectClause)
709 709
     {
710
-        $sql                  = 'SELECT ' . ($selectClause->isDistinct ? 'DISTINCT ' : '');
710
+        $sql                  = 'SELECT '.($selectClause->isDistinct ? 'DISTINCT ' : '');
711 711
         $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions));
712 712
 
713 713
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) {
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
 
751 751
                 $sqlSelectExpressions[] = sprintf(
752 752
                     '%s AS %s',
753
-                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform),
753
+                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform),
754 754
                     $sqlColumnAlias
755 755
                 );
756 756
 
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 
761 761
             // Add foreign key columns of class and also parent classes
762 762
             foreach ($class->getDeclaredPropertiesIterator() as $association) {
763
-                if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
763
+                if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
764 764
                     || ( ! $addMetaColumns && ! $association->isPrimaryKey())) {
765 765
                     continue;
766 766
                 }
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
                     $columnAlias          = $this->getSQLColumnAlias();
776 776
                     $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
777 777
 
778
-                    if (! $joinColumn->getType()) {
778
+                    if ( ! $joinColumn->getType()) {
779 779
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
780 780
                     }
781 781
 
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
             }
792 792
 
793 793
             // Add foreign key columns to SQL, if necessary
794
-            if (! $addMetaColumns) {
794
+            if ( ! $addMetaColumns) {
795 795
                 continue;
796 796
             }
797 797
 
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
                         continue;
806 806
                     }
807 807
 
808
-                    if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
808
+                    if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
809 809
                         continue;
810 810
                     }
811 811
 
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
                         $columnAlias          = $this->getSQLColumnAlias();
820 820
                         $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
821 821
 
822
-                        if (! $joinColumn->getType()) {
822
+                        if ( ! $joinColumn->getType()) {
823 823
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
824 824
                         }
825 825
 
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
             }
837 837
         }
838 838
 
839
-        return $sql . implode(', ', $sqlSelectExpressions);
839
+        return $sql.implode(', ', $sqlSelectExpressions);
840 840
     }
841 841
 
842 842
     /**
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
852 852
         }
853 853
 
854
-        return ' FROM ' . implode(', ', $sqlParts);
854
+        return ' FROM '.implode(', ', $sqlParts);
855 855
     }
856 856
 
857 857
     /**
@@ -926,7 +926,7 @@  discard block
 block discarded – undo
926 926
         $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
927 927
 
928 928
         $sql = $this->platform->appendLockHint(
929
-            $tableName . ' ' . $tableAlias,
929
+            $tableName.' '.$tableAlias,
930 930
             $this->query->getHint(Query::HINT_LOCK_MODE)
931 931
         );
932 932
 
@@ -936,11 +936,11 @@  discard block
 block discarded – undo
936 936
 
937 937
         $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias);
938 938
 
939
-        if (! $buildNestedJoins) {
940
-            return $sql . $classTableInheritanceJoins;
939
+        if ( ! $buildNestedJoins) {
940
+            return $sql.$classTableInheritanceJoins;
941 941
         }
942 942
 
943
-        return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')';
943
+        return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')';
944 944
     }
945 945
 
946 946
     /**
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
             : $association;
977 977
 
978 978
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true &&
979
-            (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
979
+            ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
980 980
             if ($association instanceof ToManyAssociationMetadata) {
981 981
                 throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation);
982 982
             }
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
             }
1031 1031
 
1032 1032
             $targetTableJoin = [
1033
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1033
+                'table' => $targetTableName.' '.$targetTableAlias,
1034 1034
                 'condition' => implode(' AND ', $conditions),
1035 1035
             ];
1036 1036
         } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) {
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
                 );
1058 1058
             }
1059 1059
 
1060
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1060
+            $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
1061 1061
 
1062 1062
             // Join target table
1063 1063
             $sql .= $joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
             }
1096 1096
 
1097 1097
             $targetTableJoin = [
1098
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1098
+                'table' => $targetTableName.' '.$targetTableAlias,
1099 1099
                 'condition' => implode(' AND ', $conditions),
1100 1100
             ];
1101 1101
         } else {
@@ -1103,23 +1103,23 @@  discard block
 block discarded – undo
1103 1103
         }
1104 1104
 
1105 1105
         // Handle WITH clause
1106
-        $withCondition = $condExpr === null ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1106
+        $withCondition = $condExpr === null ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1107 1107
 
1108 1108
         if ($targetClass->inheritanceType === InheritanceType::JOINED) {
1109 1109
             $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1110 1110
 
1111 1111
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1112 1112
             if ($withCondition) {
1113
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1113
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1114 1114
             } else {
1115
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1115
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1116 1116
             }
1117 1117
         } else {
1118
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1118
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1119 1119
         }
1120 1120
 
1121 1121
         if ($withCondition) {
1122
-            $sql .= ' AND ' . $withCondition;
1122
+            $sql .= ' AND '.$withCondition;
1123 1123
         }
1124 1124
 
1125 1125
         // Apply the indexes
@@ -1153,7 +1153,7 @@  discard block
 block discarded – undo
1153 1153
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1154 1154
         }
1155 1155
 
1156
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1156
+        return ' ORDER BY '.implode(', ', $orderByItems);
1157 1157
     }
1158 1158
 
1159 1159
     /**
@@ -1170,10 +1170,10 @@  discard block
 block discarded – undo
1170 1170
         $this->orderedColumnsMap[$sql] = $type;
1171 1171
 
1172 1172
         if ($expr instanceof AST\Subselect) {
1173
-            return '(' . $sql . ') ' . $type;
1173
+            return '('.$sql.') '.$type;
1174 1174
         }
1175 1175
 
1176
-        return $sql . ' ' . $type;
1176
+        return $sql.' '.$type;
1177 1177
     }
1178 1178
 
1179 1179
     /**
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
      */
1182 1182
     public function walkHavingClause($havingClause)
1183 1183
     {
1184
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1184
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1185 1185
     }
1186 1186
 
1187 1187
     /**
@@ -1204,7 +1204,7 @@  discard block
 block discarded – undo
1204 1204
                 $conditions = [];
1205 1205
 
1206 1206
                 if ($join->conditionalExpression) {
1207
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1207
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1208 1208
                 }
1209 1209
 
1210 1210
                 $isUnconditionalJoin = empty($conditions);
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
                 }
1230 1230
 
1231 1231
                 if ($conditions) {
1232
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1232
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1233 1233
                 }
1234 1234
 
1235 1235
                 break;
@@ -1259,7 +1259,7 @@  discard block
 block discarded – undo
1259 1259
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1260 1260
         }
1261 1261
 
1262
-        return $sql . implode(', ', $scalarExpressions) . ')';
1262
+        return $sql.implode(', ', $scalarExpressions).')';
1263 1263
     }
1264 1264
 
1265 1265
     /**
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
             ? $this->conn->quote($nullIfExpression->secondExpression)
1280 1280
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1281 1281
 
1282
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1282
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1283 1283
     }
1284 1284
 
1285 1285
     /**
@@ -1292,11 +1292,11 @@  discard block
 block discarded – undo
1292 1292
         $sql = 'CASE';
1293 1293
 
1294 1294
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1295
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1296
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1295
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1296
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1297 1297
         }
1298 1298
 
1299
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1299
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1300 1300
 
1301 1301
         return $sql;
1302 1302
     }
@@ -1310,14 +1310,14 @@  discard block
 block discarded – undo
1310 1310
      */
1311 1311
     public function walkSimpleCaseExpression($simpleCaseExpression)
1312 1312
     {
1313
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1313
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1314 1314
 
1315 1315
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1316
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1317
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1316
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1317
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1318 1318
         }
1319 1319
 
1320
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1320
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1321 1321
 
1322 1322
         return $sql;
1323 1323
     }
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
 
1359 1359
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1360 1360
 
1361
-                if (! $hidden) {
1361
+                if ( ! $hidden) {
1362 1362
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType());
1363 1363
                     $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias;
1364 1364
                 }
@@ -1379,11 +1379,11 @@  discard block
 block discarded – undo
1379 1379
                 $columnAlias = $this->getSQLColumnAlias();
1380 1380
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1381 1381
 
1382
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1382
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1383 1383
 
1384 1384
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1385 1385
 
1386
-                if (! $hidden) {
1386
+                if ( ! $hidden) {
1387 1387
                     // Conceptually we could resolve field type here by traverse through AST to retrieve field type,
1388 1388
                     // but this is not a feasible solution; assume 'string'.
1389 1389
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
@@ -1394,11 +1394,11 @@  discard block
 block discarded – undo
1394 1394
                 $columnAlias = $this->getSQLColumnAlias();
1395 1395
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1396 1396
 
1397
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1397
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1398 1398
 
1399 1399
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1400 1400
 
1401
-                if (! $hidden) {
1401
+                if ( ! $hidden) {
1402 1402
                     // We cannot resolve field type here; assume 'string'.
1403 1403
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
1404 1404
                 }
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
                 $class       = $queryComp['metadata'];
1423 1423
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: null;
1424 1424
 
1425
-                if (! isset($this->selectedClasses[$dqlAlias])) {
1425
+                if ( ! isset($this->selectedClasses[$dqlAlias])) {
1426 1426
                     $this->selectedClasses[$dqlAlias] = [
1427 1427
                         'class'       => $class,
1428 1428
                         'dqlAlias'    => $dqlAlias,
@@ -1434,7 +1434,7 @@  discard block
 block discarded – undo
1434 1434
 
1435 1435
                 // Select all fields from the queried class
1436 1436
                 foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) {
1437
-                    if (! ($property instanceof FieldMetadata)) {
1437
+                    if ( ! ($property instanceof FieldMetadata)) {
1438 1438
                         continue;
1439 1439
                     }
1440 1440
 
@@ -1469,7 +1469,7 @@  discard block
 block discarded – undo
1469 1469
                         $subClass = $this->em->getClassMetadata($subClassName);
1470 1470
 
1471 1471
                         foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) {
1472
-                            if (! ($property instanceof FieldMetadata)) {
1472
+                            if ( ! ($property instanceof FieldMetadata)) {
1473 1473
                                 continue;
1474 1474
                             }
1475 1475
 
@@ -1508,7 +1508,7 @@  discard block
 block discarded – undo
1508 1508
      */
1509 1509
     public function walkQuantifiedExpression($qExpr)
1510 1510
     {
1511
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1511
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1512 1512
     }
1513 1513
 
1514 1514
     /**
@@ -1548,7 +1548,7 @@  discard block
 block discarded – undo
1548 1548
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1549 1549
         }
1550 1550
 
1551
-        return ' FROM ' . implode(', ', $sqlParts);
1551
+        return ' FROM '.implode(', ', $sqlParts);
1552 1552
     }
1553 1553
 
1554 1554
     /**
@@ -1556,7 +1556,7 @@  discard block
 block discarded – undo
1556 1556
      */
1557 1557
     public function walkSimpleSelectClause($simpleSelectClause)
1558 1558
     {
1559
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1559
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1560 1560
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1561 1561
     }
1562 1562
 
@@ -1590,7 +1590,7 @@  discard block
 block discarded – undo
1590 1590
                     break;
1591 1591
 
1592 1592
                 case $e instanceof AST\Subselect:
1593
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1593
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1594 1594
                     break;
1595 1595
 
1596 1596
                 case $e instanceof AST\PathExpression:
@@ -1599,7 +1599,7 @@  discard block
 block discarded – undo
1599 1599
                     $class     = $qComp['metadata'];
1600 1600
                     $fieldType = $class->getProperty($e->field)->getType();
1601 1601
 
1602
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1602
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1603 1603
                     break;
1604 1604
 
1605 1605
                 case $e instanceof AST\Literal:
@@ -1613,11 +1613,11 @@  discard block
 block discarded – undo
1613 1613
                             break;
1614 1614
                     }
1615 1615
 
1616
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1616
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1617 1617
                     break;
1618 1618
 
1619 1619
                 default:
1620
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1620
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1621 1621
                     break;
1622 1622
             }
1623 1623
 
@@ -1650,10 +1650,10 @@  discard block
 block discarded – undo
1650 1650
             case $expr instanceof AST\Subselect:
1651 1651
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1652 1652
 
1653
-                $columnAlias                        = 'sclr' . $this->aliasCounter++;
1653
+                $columnAlias                        = 'sclr'.$this->aliasCounter++;
1654 1654
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1655 1655
 
1656
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1656
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1657 1657
                 break;
1658 1658
 
1659 1659
             case $expr instanceof AST\Functions\FunctionNode:
@@ -1670,7 +1670,7 @@  discard block
 block discarded – undo
1670 1670
                 $columnAlias                        = $this->getSQLColumnAlias();
1671 1671
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1672 1672
 
1673
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1673
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1674 1674
                 break;
1675 1675
 
1676 1676
             case $expr instanceof AST\ParenthesisExpression:
@@ -1690,8 +1690,8 @@  discard block
 block discarded – undo
1690 1690
      */
1691 1691
     public function walkAggregateExpression($aggExpression)
1692 1692
     {
1693
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1694
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1693
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1694
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1695 1695
     }
1696 1696
 
1697 1697
     /**
@@ -1705,7 +1705,7 @@  discard block
 block discarded – undo
1705 1705
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1706 1706
         }
1707 1707
 
1708
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1708
+        return ' GROUP BY '.implode(', ', $sqlParts);
1709 1709
     }
1710 1710
 
1711 1711
     /**
@@ -1714,7 +1714,7 @@  discard block
 block discarded – undo
1714 1714
     public function walkGroupByItem($groupByItem)
1715 1715
     {
1716 1716
         // StateFieldPathExpression
1717
-        if (! is_string($groupByItem)) {
1717
+        if ( ! is_string($groupByItem)) {
1718 1718
             return $this->walkPathExpression($groupByItem);
1719 1719
         }
1720 1720
 
@@ -1768,7 +1768,7 @@  discard block
 block discarded – undo
1768 1768
     {
1769 1769
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1770 1770
         $tableName = $class->getTableName();
1771
-        $sql       = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform);
1771
+        $sql       = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform);
1772 1772
 
1773 1773
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1774 1774
 
@@ -1784,12 +1784,12 @@  discard block
 block discarded – undo
1784 1784
     {
1785 1785
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1786 1786
         $tableName = $class->getTableName();
1787
-        $sql       = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform);
1787
+        $sql       = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform);
1788 1788
 
1789 1789
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1790 1790
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1791 1791
 
1792
-        return $sql . ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1792
+        return $sql.' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1793 1793
     }
1794 1794
 
1795 1795
     /**
@@ -1800,7 +1800,7 @@  discard block
 block discarded – undo
1800 1800
         $useTableAliasesBefore    = $this->useSqlTableAliases;
1801 1801
         $this->useSqlTableAliases = false;
1802 1802
 
1803
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1803
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1804 1804
         $newValue = $updateItem->newValue;
1805 1805
 
1806 1806
         switch (true) {
@@ -1844,7 +1844,7 @@  discard block
 block discarded – undo
1844 1844
 
1845 1845
             if ($filterClauses) {
1846 1846
                 if ($condSql) {
1847
-                    $condSql = '(' . $condSql . ') AND ';
1847
+                    $condSql = '('.$condSql.') AND ';
1848 1848
                 }
1849 1849
 
1850 1850
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1852,11 +1852,11 @@  discard block
 block discarded – undo
1852 1852
         }
1853 1853
 
1854 1854
         if ($condSql) {
1855
-            return ' WHERE ' . (! $discrSql ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1855
+            return ' WHERE '.( ! $discrSql ? $condSql : '('.$condSql.') AND '.$discrSql);
1856 1856
         }
1857 1857
 
1858 1858
         if ($discrSql) {
1859
-            return ' WHERE ' . $discrSql;
1859
+            return ' WHERE '.$discrSql;
1860 1860
         }
1861 1861
 
1862 1862
         return '';
@@ -1869,7 +1869,7 @@  discard block
 block discarded – undo
1869 1869
     {
1870 1870
         // Phase 2 AST optimization: Skip processing of ConditionalExpression
1871 1871
         // if only one ConditionalTerm is defined
1872
-        if (! ($condExpr instanceof AST\ConditionalExpression)) {
1872
+        if ( ! ($condExpr instanceof AST\ConditionalExpression)) {
1873 1873
             return $this->walkConditionalTerm($condExpr);
1874 1874
         }
1875 1875
 
@@ -1883,7 +1883,7 @@  discard block
 block discarded – undo
1883 1883
     {
1884 1884
         // Phase 2 AST optimization: Skip processing of ConditionalTerm
1885 1885
         // if only one ConditionalFactor is defined
1886
-        if (! ($condTerm instanceof AST\ConditionalTerm)) {
1886
+        if ( ! ($condTerm instanceof AST\ConditionalTerm)) {
1887 1887
             return $this->walkConditionalFactor($condTerm);
1888 1888
         }
1889 1889
 
@@ -1899,7 +1899,7 @@  discard block
 block discarded – undo
1899 1899
         // if only one ConditionalPrimary is defined
1900 1900
         return ! ($factor instanceof AST\ConditionalFactor)
1901 1901
             ? $this->walkConditionalPrimary($factor)
1902
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1902
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1903 1903
     }
1904 1904
 
1905 1905
     /**
@@ -1914,7 +1914,7 @@  discard block
 block discarded – undo
1914 1914
         if ($primary->isConditionalExpression()) {
1915 1915
             $condExpr = $primary->conditionalExpression;
1916 1916
 
1917
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1917
+            return '('.$this->walkConditionalExpression($condExpr).')';
1918 1918
         }
1919 1919
 
1920 1920
         return '';
@@ -1927,7 +1927,7 @@  discard block
 block discarded – undo
1927 1927
     {
1928 1928
         $sql = $existsExpr->not ? 'NOT ' : '';
1929 1929
 
1930
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1930
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1931 1931
 
1932 1932
         return $sql;
1933 1933
     }
@@ -1975,7 +1975,7 @@  discard block
 block discarded – undo
1975 1975
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1976 1976
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1977 1977
 
1978
-            $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE ';
1978
+            $sql .= $targetTableName.' '.$targetTableAlias.' WHERE ';
1979 1979
 
1980 1980
             $sqlParts = [];
1981 1981
 
@@ -1996,7 +1996,7 @@  discard block
 block discarded – undo
1996 1996
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1997 1997
                 }
1998 1998
 
1999
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
1999
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2000 2000
             }
2001 2001
 
2002 2002
             $sql .= implode(' AND ', $sqlParts);
@@ -2010,7 +2010,7 @@  discard block
 block discarded – undo
2010 2010
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
2011 2011
 
2012 2012
             // join to target table
2013
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON ';
2013
+            $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON ';
2014 2014
 
2015 2015
             // join conditions
2016 2016
             $joinSqlParts = [];
@@ -2059,13 +2059,13 @@  discard block
 block discarded – undo
2059 2059
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
2060 2060
                 }
2061 2061
 
2062
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
2062
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2063 2063
             }
2064 2064
 
2065 2065
             $sql .= implode(' AND ', $sqlParts);
2066 2066
         }
2067 2067
 
2068
-        return $sql . ')';
2068
+        return $sql.')';
2069 2069
     }
2070 2070
 
2071 2071
     /**
@@ -2076,7 +2076,7 @@  discard block
 block discarded – undo
2076 2076
         $sizeFunc                           = new AST\Functions\SizeFunction('size');
2077 2077
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
2078 2078
 
2079
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2079
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2080 2080
     }
2081 2081
 
2082 2082
     /**
@@ -2085,19 +2085,19 @@  discard block
 block discarded – undo
2085 2085
     public function walkNullComparisonExpression($nullCompExpr)
2086 2086
     {
2087 2087
         $expression = $nullCompExpr->expression;
2088
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2088
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2089 2089
 
2090 2090
         // Handle ResultVariable
2091 2091
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2092
-            return $this->walkResultVariable($expression) . $comparison;
2092
+            return $this->walkResultVariable($expression).$comparison;
2093 2093
         }
2094 2094
 
2095 2095
         // Handle InputParameter mapping inclusion to ParserResult
2096 2096
         if ($expression instanceof AST\InputParameter) {
2097
-            return $this->walkInputParameter($expression) . $comparison;
2097
+            return $this->walkInputParameter($expression).$comparison;
2098 2098
         }
2099 2099
 
2100
-        return $expression->dispatch($this) . $comparison;
2100
+        return $expression->dispatch($this).$comparison;
2101 2101
     }
2102 2102
 
2103 2103
     /**
@@ -2105,7 +2105,7 @@  discard block
 block discarded – undo
2105 2105
      */
2106 2106
     public function walkInExpression($inExpr)
2107 2107
     {
2108
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2108
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2109 2109
 
2110 2110
         $sql .= $inExpr->subselect
2111 2111
             ? $this->walkSubselect($inExpr->subselect)
@@ -2130,12 +2130,12 @@  discard block
 block discarded – undo
2130 2130
         $discrColumnType  = $discrColumn->getType();
2131 2131
         $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
2132 2132
         $sqlTableAlias    = $this->useSqlTableAliases
2133
-            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
2133
+            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
2134 2134
             : '';
2135 2135
 
2136 2136
         return sprintf(
2137 2137
             '%s %sIN %s',
2138
-            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
2138
+            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
2139 2139
             ($instanceOfExpr->not ? 'NOT ' : ''),
2140 2140
             $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr)
2141 2141
         );
@@ -2179,8 +2179,8 @@  discard block
 block discarded – undo
2179 2179
             $sql .= ' NOT';
2180 2180
         }
2181 2181
 
2182
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2183
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2182
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2183
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2184 2184
 
2185 2185
         return $sql;
2186 2186
     }
@@ -2195,7 +2195,7 @@  discard block
 block discarded – undo
2195 2195
             ? $this->walkResultVariable($stringExpr)
2196 2196
             : $stringExpr->dispatch($this);
2197 2197
 
2198
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2198
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2199 2199
 
2200 2200
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2201 2201
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2208,7 +2208,7 @@  discard block
 block discarded – undo
2208 2208
         }
2209 2209
 
2210 2210
         if ($likeExpr->escapeChar) {
2211
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2211
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2212 2212
         }
2213 2213
 
2214 2214
         return $sql;
@@ -2235,7 +2235,7 @@  discard block
 block discarded – undo
2235 2235
             ? $leftExpr->dispatch($this)
2236 2236
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2237 2237
 
2238
-        $sql .= ' ' . $compExpr->operator . ' ';
2238
+        $sql .= ' '.$compExpr->operator.' ';
2239 2239
 
2240 2240
         $sql .= $rightExpr instanceof AST\Node
2241 2241
             ? $rightExpr->dispatch($this)
@@ -2271,7 +2271,7 @@  discard block
 block discarded – undo
2271 2271
     {
2272 2272
         return $arithmeticExpr->isSimpleArithmeticExpression()
2273 2273
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2274
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2274
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2275 2275
     }
2276 2276
 
2277 2277
     /**
@@ -2279,7 +2279,7 @@  discard block
 block discarded – undo
2279 2279
      */
2280 2280
     public function walkSimpleArithmeticExpression($simpleArithmeticExpr)
2281 2281
     {
2282
-        if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2282
+        if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2283 2283
             return $this->walkArithmeticTerm($simpleArithmeticExpr);
2284 2284
         }
2285 2285
 
@@ -2299,7 +2299,7 @@  discard block
 block discarded – undo
2299 2299
 
2300 2300
         // Phase 2 AST optimization: Skip processing of ArithmeticTerm
2301 2301
         // if only one ArithmeticFactor is defined
2302
-        if (! ($term instanceof AST\ArithmeticTerm)) {
2302
+        if ( ! ($term instanceof AST\ArithmeticTerm)) {
2303 2303
             return $this->walkArithmeticFactor($term);
2304 2304
         }
2305 2305
 
@@ -2319,13 +2319,13 @@  discard block
 block discarded – undo
2319 2319
 
2320 2320
         // Phase 2 AST optimization: Skip processing of ArithmeticFactor
2321 2321
         // if only one ArithmeticPrimary is defined
2322
-        if (! ($factor instanceof AST\ArithmeticFactor)) {
2322
+        if ( ! ($factor instanceof AST\ArithmeticFactor)) {
2323 2323
             return $this->walkArithmeticPrimary($factor);
2324 2324
         }
2325 2325
 
2326 2326
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2327 2327
 
2328
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2328
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2329 2329
     }
2330 2330
 
2331 2331
     /**
@@ -2338,7 +2338,7 @@  discard block
 block discarded – undo
2338 2338
     public function walkArithmeticPrimary($primary)
2339 2339
     {
2340 2340
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2341
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2341
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2342 2342
         }
2343 2343
 
2344 2344
         if ($primary instanceof AST\Node) {
@@ -2396,7 +2396,7 @@  discard block
 block discarded – undo
2396 2396
             $entityClassName = $entityClass->getClassName();
2397 2397
 
2398 2398
             if ($entityClassName !== $rootClass->getClassName()) {
2399
-                if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2399
+                if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2400 2400
                     throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName());
2401 2401
                 }
2402 2402
             }
@@ -2408,6 +2408,6 @@  discard block
 block discarded – undo
2408 2408
             $sqlParameterList[] = $this->conn->quote($discriminator);
2409 2409
         }
2410 2410
 
2411
-        return '(' . implode(', ', $sqlParameterList) . ')';
2411
+        return '('.implode(', ', $sqlParameterList).')';
2412 2412
     }
2413 2413
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Builder/CacheMetadataBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
         $entityClassName = $this->entityClassMetadata->getRootClassName();
65 65
         $baseRegion      = strtolower(str_replace('\\', '_', $entityClassName));
66
-        $defaultRegion   = $baseRegion . ($this->fieldName ? '__' . $this->fieldName : '');
66
+        $defaultRegion   = $baseRegion.($this->fieldName ? '__'.$this->fieldName : '');
67 67
 
68 68
         $usage  = constant(sprintf('%s::%s', Mapping\CacheUsage::class, strtoupper($this->cacheAnnotation->usage)));
69 69
         $region = $this->cacheAnnotation->region ?: $defaultRegion;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             return $this->classNames;
214 214
         }
215 215
 
216
-        if (! $this->paths) {
216
+        if ( ! $this->paths) {
217 217
             throw Mapping\MappingException::pathRequired();
218 218
         }
219 219
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $includedFiles = [];
222 222
 
223 223
         foreach ($this->paths as $path) {
224
-            if (! is_dir($path)) {
224
+            if ( ! is_dir($path)) {
225 225
                 throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
226 226
             }
227 227
 
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
                     new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS),
231 231
                     RecursiveIteratorIterator::LEAVES_ONLY
232 232
                 ),
233
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
233
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
234 234
                 RecursiveRegexIterator::GET_MATCH
235 235
             );
236 236
 
237 237
             foreach ($iterator as $file) {
238 238
                 $sourceFile = $file[0];
239 239
 
240
-                if (! preg_match('(^phar:)i', $sourceFile)) {
240
+                if ( ! preg_match('(^phar:)i', $sourceFile)) {
241 241
                     $sourceFile = realpath($sourceFile);
242 242
                 }
243 243
 
@@ -563,15 +563,15 @@  discard block
 block discarded – undo
563 563
         $fieldMetadata->setVersioned($isVersioned);
564 564
         $fieldMetadata->setColumnName($columnName);
565 565
 
566
-        if (! $metadata->isMappedSuperclass) {
566
+        if ( ! $metadata->isMappedSuperclass) {
567 567
             $fieldMetadata->setTableName($metadata->getTableName());
568 568
         }
569 569
 
570
-        if (! empty($columnAnnot->columnDefinition)) {
570
+        if ( ! empty($columnAnnot->columnDefinition)) {
571 571
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
572 572
         }
573 573
 
574
-        if (! empty($columnAnnot->length)) {
574
+        if ( ! empty($columnAnnot->length)) {
575 575
             $fieldMetadata->setLength($columnAnnot->length);
576 576
         }
577 577
 
@@ -632,13 +632,13 @@  discard block
 block discarded – undo
632 632
                             'arguments' => $customGeneratorAnnot->arguments,
633 633
                         ];
634 634
 
635
-                        if (! isset($idGeneratorDefinition['class'])) {
635
+                        if ( ! isset($idGeneratorDefinition['class'])) {
636 636
                             throw new Mapping\MappingException(
637 637
                                 sprintf('Cannot instantiate custom generator, no class has been defined')
638 638
                             );
639 639
                         }
640 640
 
641
-                        if (! class_exists($idGeneratorDefinition['class'])) {
641
+                        if ( ! class_exists($idGeneratorDefinition['class'])) {
642 642
                             throw new Mapping\MappingException(
643 643
                                 sprintf('Cannot instantiate custom generator : %s', var_export($idGeneratorDefinition, true))
644 644
                             );
@@ -680,12 +680,12 @@  discard block
 block discarded – undo
680 680
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
681 681
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
682 682
 
683
-        if (! empty($oneToOneAnnot->mappedBy)) {
683
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
684 684
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
685 685
             $assocMetadata->setOwningSide(false);
686 686
         }
687 687
 
688
-        if (! empty($oneToOneAnnot->inversedBy)) {
688
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
689 689
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
690 690
         }
691 691
 
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
752 752
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
753 753
 
754
-        if (! empty($manyToOneAnnot->inversedBy)) {
754
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
755 755
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
756 756
         }
757 757
 
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
         $assocMetadata->setOwningSide(false);
823 823
         $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
824 824
 
825
-        if (! empty($oneToManyAnnot->indexBy)) {
825
+        if ( ! empty($oneToManyAnnot->indexBy)) {
826 826
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
827 827
         }
828 828
 
@@ -875,16 +875,16 @@  discard block
 block discarded – undo
875 875
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
876 876
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
877 877
 
878
-        if (! empty($manyToManyAnnot->mappedBy)) {
878
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
879 879
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
880 880
             $assocMetadata->setOwningSide(false);
881 881
         }
882 882
 
883
-        if (! empty($manyToManyAnnot->inversedBy)) {
883
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
884 884
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
885 885
         }
886 886
 
887
-        if (! empty($manyToManyAnnot->indexBy)) {
887
+        if ( ! empty($manyToManyAnnot->indexBy)) {
888 888
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
889 889
         }
890 890
 
@@ -936,15 +936,15 @@  discard block
 block discarded – undo
936 936
         $fieldMetadata->setType(Type::getType($columnAnnot->type));
937 937
         $fieldMetadata->setVersioned($isVersioned);
938 938
 
939
-        if (! empty($columnAnnot->name)) {
939
+        if ( ! empty($columnAnnot->name)) {
940 940
             $fieldMetadata->setColumnName($columnAnnot->name);
941 941
         }
942 942
 
943
-        if (! empty($columnAnnot->columnDefinition)) {
943
+        if ( ! empty($columnAnnot->columnDefinition)) {
944 944
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
945 945
         }
946 946
 
947
-        if (! empty($columnAnnot->length)) {
947
+        if ( ! empty($columnAnnot->length)) {
948 948
             $fieldMetadata->setLength($columnAnnot->length);
949 949
         }
950 950
 
@@ -967,11 +967,11 @@  discard block
 block discarded – undo
967 967
         Annotation\Table $tableAnnot,
968 968
         Mapping\TableMetadata $tableMetadata
969 969
     ) : Mapping\TableMetadata {
970
-        if (! empty($tableAnnot->name)) {
970
+        if ( ! empty($tableAnnot->name)) {
971 971
             $tableMetadata->setName($tableAnnot->name);
972 972
         }
973 973
 
974
-        if (! empty($tableAnnot->schema)) {
974
+        if ( ! empty($tableAnnot->schema)) {
975 975
             $tableMetadata->setSchema($tableAnnot->schema);
976 976
         }
977 977
 
@@ -1009,11 +1009,11 @@  discard block
 block discarded – undo
1009 1009
     ) : Mapping\JoinTableMetadata {
1010 1010
         $joinTable = new Mapping\JoinTableMetadata();
1011 1011
 
1012
-        if (! empty($joinTableAnnot->name)) {
1012
+        if ( ! empty($joinTableAnnot->name)) {
1013 1013
             $joinTable->setName($joinTableAnnot->name);
1014 1014
         }
1015 1015
 
1016
-        if (! empty($joinTableAnnot->schema)) {
1016
+        if ( ! empty($joinTableAnnot->schema)) {
1017 1017
             $joinTable->setSchema($joinTableAnnot->schema);
1018 1018
         }
1019 1019
 
@@ -1041,22 +1041,22 @@  discard block
 block discarded – undo
1041 1041
         $joinColumn = new Mapping\JoinColumnMetadata();
1042 1042
 
1043 1043
         // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers
1044
-        if (! empty($joinColumnAnnot->name)) {
1044
+        if ( ! empty($joinColumnAnnot->name)) {
1045 1045
             $joinColumn->setColumnName($joinColumnAnnot->name);
1046 1046
         }
1047 1047
 
1048
-        if (! empty($joinColumnAnnot->referencedColumnName)) {
1048
+        if ( ! empty($joinColumnAnnot->referencedColumnName)) {
1049 1049
             $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName);
1050 1050
         }
1051 1051
 
1052 1052
         $joinColumn->setNullable($joinColumnAnnot->nullable);
1053 1053
         $joinColumn->setUnique($joinColumnAnnot->unique);
1054 1054
 
1055
-        if (! empty($joinColumnAnnot->fieldName)) {
1055
+        if ( ! empty($joinColumnAnnot->fieldName)) {
1056 1056
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
1057 1057
         }
1058 1058
 
1059
-        if (! empty($joinColumnAnnot->columnDefinition)) {
1059
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
1060 1060
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
1061 1061
         }
1062 1062
 
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
         if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) {
1082 1082
             // Handle the case where a middle mapped super class inherits from a single table inheritance tree.
1083 1083
             do {
1084
-                if (! $parent->isMappedSuperclass) {
1084
+                if ( ! $parent->isMappedSuperclass) {
1085 1085
                     $metadata->setTable($parent->table);
1086 1086
 
1087 1087
                     break;
@@ -1137,11 +1137,11 @@  discard block
 block discarded – undo
1137 1137
             $discriminatorColumn->setType(Type::getType($typeName));
1138 1138
             $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name);
1139 1139
 
1140
-            if (! empty($discriminatorColumnAnnotation->columnDefinition)) {
1140
+            if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) {
1141 1141
                 $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition);
1142 1142
             }
1143 1143
 
1144
-            if (! empty($discriminatorColumnAnnotation->length)) {
1144
+            if ( ! empty($discriminatorColumnAnnotation->length)) {
1145 1145
                 $discriminatorColumn->setLength($discriminatorColumnAnnotation->length);
1146 1146
             }
1147 1147
         }
@@ -1217,7 +1217,7 @@  discard block
 block discarded – undo
1217 1217
             ];
1218 1218
 
1219 1219
             foreach ($entityListenersAnnot->value as $listenerClassName) {
1220
-                if (! class_exists($listenerClassName)) {
1220
+                if ( ! class_exists($listenerClassName)) {
1221 1221
                     throw Mapping\MappingException::entityListenerClassNotFound(
1222 1222
                         $listenerClassName,
1223 1223
                         $metadata->getClassName()
@@ -1259,7 +1259,7 @@  discard block
 block discarded – undo
1259 1259
                 $fieldName = $associationOverride->name;
1260 1260
                 $property  = $metadata->getProperty($fieldName);
1261 1261
 
1262
-                if (! $property) {
1262
+                if ( ! $property) {
1263 1263
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
1264 1264
                 }
1265 1265
 
@@ -1293,7 +1293,7 @@  discard block
 block discarded – undo
1293 1293
                 // Check for fetch
1294 1294
                 if ($associationOverride->fetch) {
1295 1295
                     $override->setFetchMode(
1296
-                        constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch)
1296
+                        constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch)
1297 1297
                     );
1298 1298
                 }
1299 1299
 
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
     {
1361 1361
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1362 1362
 
1363
-        if (! defined($fetchModeConstant)) {
1363
+        if ( ! defined($fetchModeConstant)) {
1364 1364
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1365 1365
         }
1366 1366
 
@@ -1375,7 +1375,7 @@  discard block
 block discarded – undo
1375 1375
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1376 1376
 
1377 1377
         foreach ($classAnnotations as $key => $annot) {
1378
-            if (! is_numeric($key)) {
1378
+            if ( ! is_numeric($key)) {
1379 1379
                 continue;
1380 1380
             }
1381 1381
 
@@ -1393,7 +1393,7 @@  discard block
 block discarded – undo
1393 1393
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1394 1394
 
1395 1395
         foreach ($propertyAnnotations as $key => $annot) {
1396
-            if (! is_numeric($key)) {
1396
+            if ( ! is_numeric($key)) {
1397 1397
                 continue;
1398 1398
             }
1399 1399
 
@@ -1411,7 +1411,7 @@  discard block
 block discarded – undo
1411 1411
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1412 1412
 
1413 1413
         foreach ($methodAnnotations as $key => $annot) {
1414
-            if (! is_numeric($key)) {
1414
+            if ( ! is_numeric($key)) {
1415 1415
                 continue;
1416 1416
             }
1417 1417
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php 1 patch
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         if ($xmlRoot->getName() === 'entity') {
61 61
             if (isset($xmlRoot['repository-class'])) {
62
-                $metadata->setCustomRepositoryClassName((string)$xmlRoot['repository-class']);
62
+                $metadata->setCustomRepositoryClassName((string) $xmlRoot['repository-class']);
63 63
             }
64 64
 
65 65
             if (isset($xmlRoot['read-only']) && $this->evaluateBoolean($xmlRoot['read-only'])) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             }
68 68
         } elseif ($xmlRoot->getName() === 'mapped-superclass') {
69 69
             if (isset($xmlRoot['repository-class'])) {
70
-                $metadata->setCustomRepositoryClassName((string)$xmlRoot['repository-class']);
70
+                $metadata->setCustomRepositoryClassName((string) $xmlRoot['repository-class']);
71 71
             }
72 72
 
73 73
             $metadata->isMappedSuperclass = true;
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
 
91 91
             // Evaluate <entity...> attributes
92 92
             if (isset($xmlRoot['table'])) {
93
-                $tableMetadata->setName((string)$xmlRoot['table']);
93
+                $tableMetadata->setName((string) $xmlRoot['table']);
94 94
             }
95 95
 
96 96
             if (isset($xmlRoot['schema'])) {
97
-                $tableMetadata->setSchema((string)$xmlRoot['schema']);
97
+                $tableMetadata->setSchema((string) $xmlRoot['schema']);
98 98
             }
99 99
 
100 100
             if (isset($xmlRoot->options)) {
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
             // Evaluate <indexes...>
109 109
             if (isset($xmlRoot->indexes)) {
110 110
                 foreach ($xmlRoot->indexes->index as $indexXml) {
111
-                    $indexName = isset($indexXml['name']) ? (string)$indexXml['name'] : null;
112
-                    $columns = explode(',', (string)$indexXml['columns']);
111
+                    $indexName = isset($indexXml['name']) ? (string) $indexXml['name'] : null;
112
+                    $columns = explode(',', (string) $indexXml['columns']);
113 113
                     $isUnique = isset($indexXml['unique']) && $indexXml['unique'];
114 114
                     $options = isset($indexXml->options) ? $this->parseOptions($indexXml->options->children()) : [];
115
-                    $flags = isset($indexXml['flags']) ? explode(',', (string)$indexXml['flags']) : [];
115
+                    $flags = isset($indexXml['flags']) ? explode(',', (string) $indexXml['flags']) : [];
116 116
 
117 117
                     $tableMetadata->addIndex([
118 118
                         'name' => $indexName,
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
 
129 129
             if (isset($xmlRoot->{'unique-constraints'})) {
130 130
                 foreach ($xmlRoot->{'unique-constraints'}->{'unique-constraint'} as $uniqueXml) {
131
-                    $indexName = isset($uniqueXml['name']) ? (string)$uniqueXml['name'] : null;
132
-                    $columns = explode(',', (string)$uniqueXml['columns']);
131
+                    $indexName = isset($uniqueXml['name']) ? (string) $uniqueXml['name'] : null;
132
+                    $columns = explode(',', (string) $uniqueXml['columns']);
133 133
                     $options = isset($uniqueXml->options) ? $this->parseOptions($uniqueXml->options->children()) : [];
134
-                    $flags = isset($uniqueXml['flags']) ? explode(',', (string)$uniqueXml['flags']) : [];
134
+                    $flags = isset($uniqueXml['flags']) ? explode(',', (string) $uniqueXml['flags']) : [];
135 135
 
136 136
                     $tableMetadata->addUniqueConstraint([
137 137
                         'name' => $indexName,
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         }
158 158
 
159 159
         if (isset($xmlRoot['inheritance-type'])) {
160
-            $inheritanceType = strtoupper((string)$xmlRoot['inheritance-type']);
160
+            $inheritanceType = strtoupper((string) $xmlRoot['inheritance-type']);
161 161
 
162 162
             $metadata->setInheritanceType(
163 163
                 constant(sprintf('%s::%s', Mapping\InheritanceType::class, $inheritanceType))
@@ -174,17 +174,17 @@  discard block
 block discarded – undo
174 174
                 // Evaluate <discriminator-column...>
175 175
                 if (isset($xmlRoot->{'discriminator-column'})) {
176 176
                     $discriminatorColumnMapping = $xmlRoot->{'discriminator-column'};
177
-                    $typeName = (string)($discriminatorColumnMapping['type'] ?? 'string');
177
+                    $typeName = (string) ($discriminatorColumnMapping['type'] ?? 'string');
178 178
 
179 179
                     $discriminatorColumn->setType(Type::getType($typeName));
180
-                    $discriminatorColumn->setColumnName((string)$discriminatorColumnMapping['name']);
180
+                    $discriminatorColumn->setColumnName((string) $discriminatorColumnMapping['name']);
181 181
 
182 182
                     if (isset($discriminatorColumnMapping['column-definition'])) {
183
-                        $discriminatorColumn->setColumnDefinition((string)$discriminatorColumnMapping['column-definition']);
183
+                        $discriminatorColumn->setColumnDefinition((string) $discriminatorColumnMapping['column-definition']);
184 184
                     }
185 185
 
186 186
                     if (isset($discriminatorColumnMapping['length'])) {
187
-                        $discriminatorColumn->setLength((int)$discriminatorColumnMapping['length']);
187
+                        $discriminatorColumn->setLength((int) $discriminatorColumnMapping['length']);
188 188
                     }
189 189
                 }
190 190
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                     $map = [];
196 196
 
197 197
                     foreach ($xmlRoot->{'discriminator-map'}->{'discriminator-mapping'} as $discrMapElement) {
198
-                        $map[(string)$discrMapElement['value']] = (string)$discrMapElement['class'];
198
+                        $map[(string) $discrMapElement['value']] = (string) $discrMapElement['class'];
199 199
                     }
200 200
 
201 201
                     $metadata->setDiscriminatorMap($map);
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
         // Evaluate <change-tracking-policy...>
207 207
         if (isset($xmlRoot['change-tracking-policy'])) {
208
-            $changeTrackingPolicy = strtoupper((string)$xmlRoot['change-tracking-policy']);
208
+            $changeTrackingPolicy = strtoupper((string) $xmlRoot['change-tracking-policy']);
209 209
 
210 210
             $metadata->setChangeTrackingPolicy(
211 211
                 constant(sprintf('%s::%s', Mapping\ChangeTrackingPolicy::class, $changeTrackingPolicy))
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         // Evaluate <field ...> mappings
216 216
         if (isset($xmlRoot->field)) {
217 217
             foreach ($xmlRoot->field as $fieldElement) {
218
-                $fieldName = (string)$fieldElement['name'];
218
+                $fieldName = (string) $fieldElement['name'];
219 219
                 $fieldMetadata = $this->convertFieldElementToFieldMetadata($fieldElement, $fieldName, $metadata, $metadataBuildingContext);
220 220
 
221 221
                 $metadata->addProperty($fieldMetadata);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         if (isset($xmlRoot->embedded)) {
226 226
             foreach ($xmlRoot->embedded as $embeddedMapping) {
227 227
                 $columnPrefix = isset($embeddedMapping['column-prefix'])
228
-                    ? (string)$embeddedMapping['column-prefix']
228
+                    ? (string) $embeddedMapping['column-prefix']
229 229
                     : null;
230 230
 
231 231
                 $useColumnPrefix = isset($embeddedMapping['use-column-prefix'])
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
                     : true;
234 234
 
235 235
                 $mapping = [
236
-                    'fieldName' => (string)$embeddedMapping['name'],
237
-                    'class' => (string)$embeddedMapping['class'],
236
+                    'fieldName' => (string) $embeddedMapping['name'],
237
+                    'class' => (string) $embeddedMapping['class'],
238 238
                     'columnPrefix' => $useColumnPrefix ? $columnPrefix : false,
239 239
                 ];
240 240
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         $associationIds = [];
247 247
 
248 248
         foreach ($xmlRoot->id as $idElement) {
249
-            $fieldName = (string)$idElement['name'];
249
+            $fieldName = (string) $idElement['name'];
250 250
 
251 251
             if (isset($idElement['association-key']) && $this->evaluateBoolean($idElement['association-key'])) {
252 252
                 $associationIds[$fieldName] = true;
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             }
265 265
 
266 266
             if (isset($idElement->generator)) {
267
-                $strategy = (string)($idElement->generator['strategy'] ?? 'AUTO');
267
+                $strategy = (string) ($idElement->generator['strategy'] ?? 'AUTO');
268 268
 
269 269
                 $idGeneratorType = constant(sprintf('%s::%s', Mapping\GeneratorType::class, strtoupper($strategy)));
270 270
 
@@ -275,24 +275,24 @@  discard block
 block discarded – undo
275 275
                     if (isset($idElement->{'sequence-generator'})) {
276 276
                         $seqGenerator = $idElement->{'sequence-generator'};
277 277
                         $idGeneratorDefinition = [
278
-                            'sequenceName' => (string)$seqGenerator['sequence-name'],
279
-                            'allocationSize' => (string)$seqGenerator['allocation-size'],
278
+                            'sequenceName' => (string) $seqGenerator['sequence-name'],
279
+                            'allocationSize' => (string) $seqGenerator['allocation-size'],
280 280
                         ];
281 281
                     } elseif (isset($idElement->{'custom-id-generator'})) {
282 282
                         $customGenerator = $idElement->{'custom-id-generator'};
283 283
 
284 284
                         $idGeneratorDefinition = [
285
-                            'class' => (string)$customGenerator['class'],
285
+                            'class' => (string) $customGenerator['class'],
286 286
                             'arguments' => [],
287 287
                         ];
288 288
 
289
-                        if (!isset($idGeneratorDefinition['class'])) {
289
+                        if ( ! isset($idGeneratorDefinition['class'])) {
290 290
                             throw new Mapping\MappingException(
291 291
                                 sprintf('Cannot instantiate custom generator, no class has been defined')
292 292
                             );
293 293
                         }
294 294
 
295
-                        if (!class_exists($idGeneratorDefinition['class'])) {
295
+                        if ( ! class_exists($idGeneratorDefinition['class'])) {
296 296
                             throw new Mapping\MappingException(
297 297
                                 sprintf('Cannot instantiate custom generator : %s', var_export($idGeneratorDefinition, true))
298 298
                             );
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
         // Evaluate <one-to-one ...> mappings
314 314
         if (isset($xmlRoot->{'one-to-one'})) {
315 315
             foreach ($xmlRoot->{'one-to-one'} as $oneToOneElement) {
316
-                $association = new Mapping\OneToOneAssociationMetadata((string)$oneToOneElement['field']);
317
-                $targetEntity = (string)$oneToOneElement['target-entity'];
316
+                $association = new Mapping\OneToOneAssociationMetadata((string) $oneToOneElement['field']);
317
+                $targetEntity = (string) $oneToOneElement['target-entity'];
318 318
 
319 319
                 $association->setTargetEntity($targetEntity);
320 320
 
@@ -324,16 +324,16 @@  discard block
 block discarded – undo
324 324
 
325 325
                 if (isset($oneToOneElement['fetch'])) {
326 326
                     $association->setFetchMode(
327
-                        constant(sprintf('%s::%s', Mapping\FetchMode::class, (string)$oneToOneElement['fetch']))
327
+                        constant(sprintf('%s::%s', Mapping\FetchMode::class, (string) $oneToOneElement['fetch']))
328 328
                     );
329 329
                 }
330 330
 
331 331
                 if (isset($oneToOneElement['mapped-by'])) {
332
-                    $association->setMappedBy((string)$oneToOneElement['mapped-by']);
332
+                    $association->setMappedBy((string) $oneToOneElement['mapped-by']);
333 333
                     $association->setOwningSide(false);
334 334
                 } else {
335 335
                     if (isset($oneToOneElement['inversed-by'])) {
336
-                        $association->setInversedBy((string)$oneToOneElement['inversed-by']);
336
+                        $association->setInversedBy((string) $oneToOneElement['inversed-by']);
337 337
                     }
338 338
 
339 339
                     $joinColumns = [];
@@ -376,12 +376,12 @@  discard block
 block discarded – undo
376 376
         // Evaluate <one-to-many ...> mappings
377 377
         if (isset($xmlRoot->{'one-to-many'})) {
378 378
             foreach ($xmlRoot->{'one-to-many'} as $oneToManyElement) {
379
-                $association = new Mapping\OneToManyAssociationMetadata((string)$oneToManyElement['field']);
380
-                $targetEntity = (string)$oneToManyElement['target-entity'];
379
+                $association = new Mapping\OneToManyAssociationMetadata((string) $oneToManyElement['field']);
380
+                $targetEntity = (string) $oneToManyElement['target-entity'];
381 381
 
382 382
                 $association->setTargetEntity($targetEntity);
383 383
                 $association->setOwningSide(false);
384
-                $association->setMappedBy((string)$oneToManyElement['mapped-by']);
384
+                $association->setMappedBy((string) $oneToManyElement['mapped-by']);
385 385
 
386 386
                 if (isset($associationIds[$association->getName()])) {
387 387
                     throw Mapping\MappingException::illegalToManyIdentifierAssociation($className, $association->getName());
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 
390 390
                 if (isset($oneToManyElement['fetch'])) {
391 391
                     $association->setFetchMode(
392
-                        constant(sprintf('%s::%s', Mapping\FetchMode::class, (string)$oneToManyElement['fetch']))
392
+                        constant(sprintf('%s::%s', Mapping\FetchMode::class, (string) $oneToManyElement['fetch']))
393 393
                     );
394 394
                 }
395 395
 
@@ -405,8 +405,8 @@  discard block
 block discarded – undo
405 405
                     $orderBy = [];
406 406
 
407 407
                     foreach ($oneToManyElement->{'order-by'}->{'order-by-field'} as $orderByField) {
408
-                        $orderBy[(string)$orderByField['name']] = isset($orderByField['direction'])
409
-                            ? (string)$orderByField['direction']
408
+                        $orderBy[(string) $orderByField['name']] = isset($orderByField['direction'])
409
+                            ? (string) $orderByField['direction']
410 410
                             : Criteria::ASC;
411 411
                     }
412 412
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
                 }
415 415
 
416 416
                 if (isset($oneToManyElement['index-by'])) {
417
-                    $association->setIndexedBy((string)$oneToManyElement['index-by']);
417
+                    $association->setIndexedBy((string) $oneToManyElement['index-by']);
418 418
                 } elseif (isset($oneToManyElement->{'index-by'})) {
419 419
                     throw new InvalidArgumentException('<index-by /> is not a valid tag');
420 420
                 }
@@ -438,8 +438,8 @@  discard block
 block discarded – undo
438 438
         // Evaluate <many-to-one ...> mappings
439 439
         if (isset($xmlRoot->{'many-to-one'})) {
440 440
             foreach ($xmlRoot->{'many-to-one'} as $manyToOneElement) {
441
-                $association = new Mapping\ManyToOneAssociationMetadata((string)$manyToOneElement['field']);
442
-                $targetEntity = (string)$manyToOneElement['target-entity'];
441
+                $association = new Mapping\ManyToOneAssociationMetadata((string) $manyToOneElement['field']);
442
+                $targetEntity = (string) $manyToOneElement['target-entity'];
443 443
 
444 444
                 $association->setTargetEntity($targetEntity);
445 445
 
@@ -449,12 +449,12 @@  discard block
 block discarded – undo
449 449
 
450 450
                 if (isset($manyToOneElement['fetch'])) {
451 451
                     $association->setFetchMode(
452
-                        constant('Doctrine\ORM\Mapping\FetchMode::' . (string)$manyToOneElement['fetch'])
452
+                        constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $manyToOneElement['fetch'])
453 453
                     );
454 454
                 }
455 455
 
456 456
                 if (isset($manyToOneElement['inversed-by'])) {
457
-                    $association->setInversedBy((string)$manyToOneElement['inversed-by']);
457
+                    $association->setInversedBy((string) $manyToOneElement['inversed-by']);
458 458
                 }
459 459
 
460 460
                 $joinColumns = [];
@@ -492,8 +492,8 @@  discard block
 block discarded – undo
492 492
         // Evaluate <many-to-many ...> mappings
493 493
         if (isset($xmlRoot->{'many-to-many'})) {
494 494
             foreach ($xmlRoot->{'many-to-many'} as $manyToManyElement) {
495
-                $association = new Mapping\ManyToManyAssociationMetadata((string)$manyToManyElement['field']);
496
-                $targetEntity = (string)$manyToManyElement['target-entity'];
495
+                $association = new Mapping\ManyToManyAssociationMetadata((string) $manyToManyElement['field']);
496
+                $targetEntity = (string) $manyToManyElement['target-entity'];
497 497
 
498 498
                 $association->setTargetEntity($targetEntity);
499 499
 
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 
504 504
                 if (isset($manyToManyElement['fetch'])) {
505 505
                     $association->setFetchMode(
506
-                        constant(sprintf('%s::%s', Mapping\FetchMode::class, (string)$manyToManyElement['fetch']))
506
+                        constant(sprintf('%s::%s', Mapping\FetchMode::class, (string) $manyToManyElement['fetch']))
507 507
                     );
508 508
                 }
509 509
 
@@ -512,22 +512,22 @@  discard block
 block discarded – undo
512 512
                 }
513 513
 
514 514
                 if (isset($manyToManyElement['mapped-by'])) {
515
-                    $association->setMappedBy((string)$manyToManyElement['mapped-by']);
515
+                    $association->setMappedBy((string) $manyToManyElement['mapped-by']);
516 516
                     $association->setOwningSide(false);
517 517
                 } elseif (isset($manyToManyElement->{'join-table'})) {
518 518
                     if (isset($manyToManyElement['inversed-by'])) {
519
-                        $association->setInversedBy((string)$manyToManyElement['inversed-by']);
519
+                        $association->setInversedBy((string) $manyToManyElement['inversed-by']);
520 520
                     }
521 521
 
522 522
                     $joinTableElement = $manyToManyElement->{'join-table'};
523 523
                     $joinTable = new Mapping\JoinTableMetadata();
524 524
 
525 525
                     if (isset($joinTableElement['name'])) {
526
-                        $joinTable->setName((string)$joinTableElement['name']);
526
+                        $joinTable->setName((string) $joinTableElement['name']);
527 527
                     }
528 528
 
529 529
                     if (isset($joinTableElement['schema'])) {
530
-                        $joinTable->setSchema((string)$joinTableElement['schema']);
530
+                        $joinTable->setSchema((string) $joinTableElement['schema']);
531 531
                     }
532 532
 
533 533
                     if (isset($joinTableElement->{'join-columns'})) {
@@ -557,8 +557,8 @@  discard block
 block discarded – undo
557 557
                     $orderBy = [];
558 558
 
559 559
                     foreach ($manyToManyElement->{'order-by'}->{'order-by-field'} as $orderByField) {
560
-                        $orderBy[(string)$orderByField['name']] = isset($orderByField['direction'])
561
-                            ? (string)$orderByField['direction']
560
+                        $orderBy[(string) $orderByField['name']] = isset($orderByField['direction'])
561
+                            ? (string) $orderByField['direction']
562 562
                             : Criteria::ASC;
563 563
                     }
564 564
 
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
                 }
567 567
 
568 568
                 if (isset($manyToManyElement['index-by'])) {
569
-                    $association->setIndexedBy((string)$manyToManyElement['index-by']);
569
+                    $association->setIndexedBy((string) $manyToManyElement['index-by']);
570 570
                 } elseif (isset($manyToManyElement->{'index-by'})) {
571 571
                     throw new InvalidArgumentException('<index-by /> is not a valid tag');
572 572
                 }
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
         // Evaluate association-overrides
591 591
         if (isset($xmlRoot->{'attribute-overrides'})) {
592 592
             foreach ($xmlRoot->{'attribute-overrides'}->{'attribute-override'} as $overrideElement) {
593
-                $fieldName = (string)$overrideElement['name'];
593
+                $fieldName = (string) $overrideElement['name'];
594 594
 
595 595
                 foreach ($overrideElement->field as $fieldElement) {
596 596
                     $fieldMetadata = $this->convertFieldElementToFieldMetadata($fieldElement, $fieldName, $metadata, $metadataBuildingContext);
@@ -603,10 +603,10 @@  discard block
 block discarded – undo
603 603
         // Evaluate association-overrides
604 604
         if (isset($xmlRoot->{'association-overrides'})) {
605 605
             foreach ($xmlRoot->{'association-overrides'}->{'association-override'} as $overrideElement) {
606
-                $fieldName = (string)$overrideElement['name'];
606
+                $fieldName = (string) $overrideElement['name'];
607 607
                 $property = $metadata->getProperty($fieldName);
608 608
 
609
-                if (!$property) {
609
+                if ( ! $property) {
610 610
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
611 611
                 }
612 612
 
@@ -630,11 +630,11 @@  discard block
 block discarded – undo
630 630
                     $joinTable = new Mapping\JoinTableMetadata();
631 631
 
632 632
                     if (isset($joinTableElement['name'])) {
633
-                        $joinTable->setName((string)$joinTableElement['name']);
633
+                        $joinTable->setName((string) $joinTableElement['name']);
634 634
                     }
635 635
 
636 636
                     if (isset($joinTableElement['schema'])) {
637
-                        $joinTable->setSchema((string)$joinTableElement['schema']);
637
+                        $joinTable->setSchema((string) $joinTableElement['schema']);
638 638
                     }
639 639
 
640 640
                     if (isset($joinTableElement->{'join-columns'})) {
@@ -658,13 +658,13 @@  discard block
 block discarded – undo
658 658
 
659 659
                 // Check for inversed-by
660 660
                 if (isset($overrideElement->{'inversed-by'})) {
661
-                    $override->setInversedBy((string)$overrideElement->{'inversed-by'}['name']);
661
+                    $override->setInversedBy((string) $overrideElement->{'inversed-by'}['name']);
662 662
                 }
663 663
 
664 664
                 // Check for fetch
665 665
                 if (isset($overrideElement['fetch'])) {
666 666
                     $override->setFetchMode(
667
-                        constant('Doctrine\ORM\Mapping\FetchMode::' . (string)$overrideElement['fetch'])
667
+                        constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $overrideElement['fetch'])
668 668
                     );
669 669
                 }
670 670
 
@@ -675,8 +675,8 @@  discard block
 block discarded – undo
675 675
         // Evaluate <lifecycle-callbacks...>
676 676
         if (isset($xmlRoot->{'lifecycle-callbacks'})) {
677 677
             foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) {
678
-                $eventName = constant(Events::class . '::' . (string)$lifecycleCallback['type']);
679
-                $methodName = (string)$lifecycleCallback['method'];
678
+                $eventName = constant(Events::class.'::'.(string) $lifecycleCallback['type']);
679
+                $methodName = (string) $lifecycleCallback['method'];
680 680
 
681 681
                 $metadata->addLifecycleCallback($eventName, $methodName);
682 682
             }
@@ -685,9 +685,9 @@  discard block
 block discarded – undo
685 685
         // Evaluate entity listener
686 686
         if (isset($xmlRoot->{'entity-listeners'})) {
687 687
             foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) {
688
-                $listenerClassName = (string)$listenerElement['class'];
688
+                $listenerClassName = (string) $listenerElement['class'];
689 689
 
690
-                if (!class_exists($listenerClassName)) {
690
+                if ( ! class_exists($listenerClassName)) {
691 691
                     throw Mapping\MappingException::entityListenerClassNotFound(
692 692
                         $listenerClassName,
693 693
                         $metadata->getClassName()
@@ -695,8 +695,8 @@  discard block
 block discarded – undo
695 695
                 }
696 696
 
697 697
                 foreach ($listenerElement as $callbackElement) {
698
-                    $eventName = (string)$callbackElement['type'];
699
-                    $methodName = (string)$callbackElement['method'];
698
+                    $eventName = (string) $callbackElement['type'];
699
+                    $methodName = (string) $callbackElement['method'];
700 700
 
701 701
                     $metadata->addEntityListener($eventName, $listenerClassName, $methodName);
702 702
                 }
@@ -722,13 +722,13 @@  discard block
 block discarded – undo
722 722
             if ($option->count()) {
723 723
                 $value = $this->parseOptions($option->children());
724 724
             } else {
725
-                $value = (string)$option;
725
+                $value = (string) $option;
726 726
             }
727 727
 
728 728
             $attributes = $option->attributes();
729 729
 
730 730
             if (isset($attributes->name)) {
731
-                $nameAttribute = (string)$attributes->name;
731
+                $nameAttribute = (string) $attributes->name;
732 732
                 $array[$nameAttribute] = in_array($nameAttribute, ['unsigned', 'fixed'], true)
733 733
                     ? $this->evaluateBoolean($value)
734 734
                     : $value;
@@ -755,9 +755,9 @@  discard block
 block discarded – undo
755 755
         $className = $metadata->getClassName();
756 756
         $isVersioned = isset($fieldElement['version']) && $fieldElement['version'];
757 757
         $fieldMetadata = new Mapping\FieldMetadata($fieldName);
758
-        $fieldType = isset($fieldElement['type']) ? (string)$fieldElement['type'] : 'string';
758
+        $fieldType = isset($fieldElement['type']) ? (string) $fieldElement['type'] : 'string';
759 759
         $columnName = isset($fieldElement['column'])
760
-            ? (string)$fieldElement['column']
760
+            ? (string) $fieldElement['column']
761 761
             : $metadataBuildingContext->getNamingStrategy()->propertyToColumnName($fieldName, $className);
762 762
 
763 763
         $fieldMetadata->setType(Type::getType($fieldType));
@@ -765,15 +765,15 @@  discard block
 block discarded – undo
765 765
         $fieldMetadata->setColumnName($columnName);
766 766
 
767 767
         if (isset($fieldElement['length'])) {
768
-            $fieldMetadata->setLength((int)$fieldElement['length']);
768
+            $fieldMetadata->setLength((int) $fieldElement['length']);
769 769
         }
770 770
 
771 771
         if (isset($fieldElement['precision'])) {
772
-            $fieldMetadata->setPrecision((int)$fieldElement['precision']);
772
+            $fieldMetadata->setPrecision((int) $fieldElement['precision']);
773 773
         }
774 774
 
775 775
         if (isset($fieldElement['scale'])) {
776
-            $fieldMetadata->setScale((int)$fieldElement['scale']);
776
+            $fieldMetadata->setScale((int) $fieldElement['scale']);
777 777
         }
778 778
 
779 779
         if (isset($fieldElement['unique'])) {
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
         }
786 786
 
787 787
         if (isset($fieldElement['column-definition'])) {
788
-            $fieldMetadata->setColumnDefinition((string)$fieldElement['column-definition']);
788
+            $fieldMetadata->setColumnDefinition((string) $fieldElement['column-definition']);
789 789
         }
790 790
 
791 791
         if (isset($fieldElement->options)) {
@@ -812,15 +812,15 @@  discard block
 block discarded – undo
812 812
     {
813 813
         $joinColumnMetadata = new Mapping\JoinColumnMetadata();
814 814
 
815
-        $joinColumnMetadata->setColumnName((string)$joinColumnElement['name']);
816
-        $joinColumnMetadata->setReferencedColumnName((string)$joinColumnElement['referenced-column-name']);
815
+        $joinColumnMetadata->setColumnName((string) $joinColumnElement['name']);
816
+        $joinColumnMetadata->setReferencedColumnName((string) $joinColumnElement['referenced-column-name']);
817 817
 
818 818
         if (isset($joinColumnElement['column-definition'])) {
819
-            $joinColumnMetadata->setColumnDefinition((string)$joinColumnElement['column-definition']);
819
+            $joinColumnMetadata->setColumnDefinition((string) $joinColumnElement['column-definition']);
820 820
         }
821 821
 
822 822
         if (isset($joinColumnElement['field-name'])) {
823
-            $joinColumnMetadata->setAliasedName((string)$joinColumnElement['field-name']);
823
+            $joinColumnMetadata->setAliasedName((string) $joinColumnElement['field-name']);
824 824
         }
825 825
 
826 826
         if (isset($joinColumnElement['nullable'])) {
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
         }
833 833
 
834 834
         if (isset($joinColumnElement['on-delete'])) {
835
-            $joinColumnMetadata->setOnDelete(strtoupper((string)$joinColumnElement['on-delete']));
835
+            $joinColumnMetadata->setOnDelete(strtoupper((string) $joinColumnElement['on-delete']));
836 836
         }
837 837
 
838 838
         return $joinColumnMetadata;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/NewAnnotationDriver.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
         $classNames = array_filter(
145 145
             $this->locator->getAllClassNames(null),
146
-            function ($className) {
146
+            function($className) {
147 147
                 return ! $this->isTransient($className);
148 148
             }
149 149
         );
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
             ];
276 276
 
277 277
             foreach ($entityListenersAnnot->value as $listenerClassName) {
278
-                if (! class_exists($listenerClassName)) {
278
+                if ( ! class_exists($listenerClassName)) {
279 279
                     throw Mapping\MappingException::entityListenerClassNotFound(
280 280
                         $listenerClassName,
281 281
                         $classMetadata->getClassName()
@@ -341,15 +341,15 @@  discard block
 block discarded – undo
341 341
 
342 342
                     $discriminatorColumn->setColumnName($discriminatorColumnAnnot->name);
343 343
 
344
-                    if (! empty($discriminatorColumnAnnot->columnDefinition)) {
344
+                    if ( ! empty($discriminatorColumnAnnot->columnDefinition)) {
345 345
                         $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnot->columnDefinition);
346 346
                     }
347 347
 
348
-                    if (! empty($discriminatorColumnAnnot->type)) {
348
+                    if ( ! empty($discriminatorColumnAnnot->type)) {
349 349
                         $discriminatorColumn->setType(Type::getType($discriminatorColumnAnnot->type));
350 350
                     }
351 351
 
352
-                    if (! empty($discriminatorColumnAnnot->length)) {
352
+                    if ( ! empty($discriminatorColumnAnnot->length)) {
353 353
                         $discriminatorColumn->setLength($discriminatorColumnAnnot->length);
354 354
                     }
355 355
                 }
@@ -405,11 +405,11 @@  discard block
 block discarded – undo
405 405
     {
406 406
         $table = new Mapping\TableMetadata();
407 407
 
408
-        if (! empty($tableAnnot->name)) {
408
+        if ( ! empty($tableAnnot->name)) {
409 409
             $table->setName($tableAnnot->name);
410 410
         }
411 411
 
412
-        if (! empty($tableAnnot->schema)) {
412
+        if ( ! empty($tableAnnot->schema)) {
413 413
             $table->setSchema($tableAnnot->schema);
414 414
         }
415 415
 
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
     ) {
454 454
         $usage         = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
455 455
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
456
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
456
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
457 457
 
458 458
         return new Mapping\CacheMetadata($usage, $cacheAnnot->region ?: $defaultRegion);
459 459
     }
@@ -562,11 +562,11 @@  discard block
 block discarded – undo
562 562
             $fieldMetadata->setPrimaryKey(true);
563 563
         }
564 564
 
565
-        if (! empty($columnAnnot->columnDefinition)) {
565
+        if ( ! empty($columnAnnot->columnDefinition)) {
566 566
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
567 567
         }
568 568
 
569
-        if (! empty($columnAnnot->length)) {
569
+        if ( ! empty($columnAnnot->length)) {
570 570
             $fieldMetadata->setLength($columnAnnot->length);
571 571
         }
572 572
 
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
                     break;
588 588
 
589 589
                 default:
590
-                    if (! isset($customOptions['default'])) {
590
+                    if ( ! isset($customOptions['default'])) {
591 591
                         throw Mapping\MappingException::unsupportedOptimisticLockingType($fieldMetadata->getType());
592 592
                     }
593 593
             }
@@ -625,11 +625,11 @@  discard block
 block discarded – undo
625 625
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
626 626
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
627 627
 
628
-        if (! empty($oneToOneAnnot->mappedBy)) {
628
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
629 629
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
630 630
         }
631 631
 
632
-        if (! empty($oneToOneAnnot->inversedBy)) {
632
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
633 633
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
634 634
         }
635 635
 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
706 706
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
707 707
 
708
-        if (! empty($manyToOneAnnot->inversedBy)) {
708
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
709 709
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
710 710
         }
711 711
 
@@ -782,11 +782,11 @@  discard block
 block discarded – undo
782 782
         $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval);
783 783
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch));
784 784
 
785
-        if (! empty($oneToManyAnnot->mappedBy)) {
785
+        if ( ! empty($oneToManyAnnot->mappedBy)) {
786 786
             $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
787 787
         }
788 788
 
789
-        if (! empty($oneToManyAnnot->indexBy)) {
789
+        if ( ! empty($oneToManyAnnot->indexBy)) {
790 790
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
791 791
         }
792 792
 
@@ -840,15 +840,15 @@  discard block
 block discarded – undo
840 840
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
841 841
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
842 842
 
843
-        if (! empty($manyToManyAnnot->mappedBy)) {
843
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
844 844
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
845 845
         }
846 846
 
847
-        if (! empty($manyToManyAnnot->inversedBy)) {
847
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
848 848
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
849 849
         }
850 850
 
851
-        if (! empty($manyToManyAnnot->indexBy)) {
851
+        if ( ! empty($manyToManyAnnot->indexBy)) {
852 852
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
853 853
         }
854 854
 
@@ -899,11 +899,11 @@  discard block
 block discarded – undo
899 899
     ) {
900 900
         $joinTable = new Mapping\JoinTableMetadata();
901 901
 
902
-        if (! empty($joinTableAnnot->name)) {
902
+        if ( ! empty($joinTableAnnot->name)) {
903 903
             $joinTable->setName($joinTableAnnot->name);
904 904
         }
905 905
 
906
-        if (! empty($joinTableAnnot->schema)) {
906
+        if ( ! empty($joinTableAnnot->schema)) {
907 907
             $joinTable->setSchema($joinTableAnnot->schema);
908 908
         }
909 909
 
@@ -954,11 +954,11 @@  discard block
 block discarded – undo
954 954
         $joinColumn->setNullable($joinColumnAnnot->nullable);
955 955
         $joinColumn->setUnique($joinColumnAnnot->unique);
956 956
 
957
-        if (! empty($joinColumnAnnot->fieldName)) {
957
+        if ( ! empty($joinColumnAnnot->fieldName)) {
958 958
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
959 959
         }
960 960
 
961
-        if (! empty($joinColumnAnnot->columnDefinition)) {
961
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
962 962
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
963 963
         }
964 964
 
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
     {
1015 1015
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1016 1016
 
1017
-        if (! defined($fetchModeConstant)) {
1017
+        if ( ! defined($fetchModeConstant)) {
1018 1018
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1019 1019
         }
1020 1020
 
@@ -1056,7 +1056,7 @@  discard block
 block discarded – undo
1056 1056
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1057 1057
 
1058 1058
         foreach ($classAnnotations as $key => $annot) {
1059
-            if (! is_numeric($key)) {
1059
+            if ( ! is_numeric($key)) {
1060 1060
                 continue;
1061 1061
             }
1062 1062
 
@@ -1074,7 +1074,7 @@  discard block
 block discarded – undo
1074 1074
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1075 1075
 
1076 1076
         foreach ($propertyAnnotations as $key => $annot) {
1077
-            if (! is_numeric($key)) {
1077
+            if ( ! is_numeric($key)) {
1078 1078
                 continue;
1079 1079
             }
1080 1080
 
@@ -1092,7 +1092,7 @@  discard block
 block discarded – undo
1092 1092
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1093 1093
 
1094 1094
         foreach ($methodAnnotations as $key => $annot) {
1095
-            if (! is_numeric($key)) {
1095
+            if ( ! is_numeric($key)) {
1096 1096
                 continue;
1097 1097
             }
1098 1098
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/MappingException.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public static function pathRequired()
25 25
     {
26
-        return new self('Specifying the paths to your entities is required ' .
26
+        return new self('Specifying the paths to your entities is required '.
27 27
             'in the AnnotationDriver to retrieve all class names.');
28 28
     }
29 29
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public static function missingQueryMapping($entity, $queryName)
215 215
     {
216
-        return new self('Query named "' . $queryName . '" in "' . $entity . ' requires a result class or result set mapping.');
216
+        return new self('Query named "'.$queryName.'" in "'.$entity.' requires a result class or result set mapping.');
217 217
     }
218 218
 
219 219
     /**
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public static function missingResultSetMappingEntity($entity, $resultName)
226 226
     {
227
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a entity class name.');
227
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a entity class name.');
228 228
     }
229 229
 
230 230
     /**
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      */
236 236
     public static function missingResultSetMappingFieldName($entity, $resultName)
237 237
     {
238
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a field name.');
238
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a field name.');
239 239
     }
240 240
 
241 241
     /**
@@ -282,8 +282,8 @@  discard block
 block discarded – undo
282 282
     {
283 283
         $message = sprintf("The mapping of field '%s' is invalid: The option '%s' is required.", $field, $expectedOption);
284 284
 
285
-        if (! empty($hint)) {
286
-            $message .= ' (Hint: ' . $hint . ')';
285
+        if ( ! empty($hint)) {
286
+            $message .= ' (Hint: '.$hint.')';
287 287
         }
288 288
 
289 289
         return new self($message);
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
      */
313 313
     public static function reflectionFailure($entity, ReflectionException $previousException)
314 314
     {
315
-        return new self('An error occurred in ' . $entity, 0, $previousException);
315
+        return new self('An error occurred in '.$entity, 0, $previousException);
316 316
     }
317 317
 
318 318
     /**
@@ -323,8 +323,8 @@  discard block
 block discarded – undo
323 323
      */
324 324
     public static function joinColumnMustPointToMappedField($className, $joinColumn)
325 325
     {
326
-        return new self('The column ' . $joinColumn . ' must be mapped to a field in class '
327
-            . $className . ' since it is referenced by a join column of another class.');
326
+        return new self('The column '.$joinColumn.' must be mapped to a field in class '
327
+            . $className.' since it is referenced by a join column of another class.');
328 328
     }
329 329
 
330 330
     /**
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public static function propertyTypeIsRequired($className, $propertyName)
360 360
     {
361
-        return new self("The attribute 'type' is required for the column description of property " . $className . '::$' . $propertyName . '.');
361
+        return new self("The attribute 'type' is required for the column description of property ".$className.'::$'.$propertyName.'.');
362 362
     }
363 363
 
364 364
     /**
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
      */
369 369
     public static function tableIdGeneratorNotImplemented($className)
370 370
     {
371
-        return new self('TableIdGenerator is not yet implemented for use with class ' . $className);
371
+        return new self('TableIdGenerator is not yet implemented for use with class '.$className);
372 372
     }
373 373
 
374 374
     /**
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
      */
395 395
     public static function duplicateQueryMapping($entity, $queryName)
396 396
     {
397
-        return new self('Query named "' . $queryName . '" in "' . $entity . '" was already declared, but it must be declared only once');
397
+        return new self('Query named "'.$queryName.'" in "'.$entity.'" was already declared, but it must be declared only once');
398 398
     }
399 399
 
400 400
     /**
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
      */
406 406
     public static function duplicateResultSetMapping($entity, $resultName)
407 407
     {
408
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . '" was already declared, but it must be declared only once');
408
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.'" was already declared, but it must be declared only once');
409 409
     }
410 410
 
411 411
     /**
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      */
416 416
     public static function singleIdNotAllowedOnCompositePrimaryKey($entity)
417 417
     {
418
-        return new self('Single id is not allowed on composite primary key in entity ' . $entity);
418
+        return new self('Single id is not allowed on composite primary key in entity '.$entity);
419 419
     }
420 420
 
421 421
     /**
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
      */
426 426
     public static function noIdDefined($entity)
427 427
     {
428
-        return new self('No ID defined for entity ' . $entity);
428
+        return new self('No ID defined for entity '.$entity);
429 429
     }
430 430
 
431 431
     /**
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
      */
436 436
     public static function unsupportedOptimisticLockingType($unsupportedType)
437 437
     {
438
-        return new self('Locking type "' . $unsupportedType->getName() . '" is not supported by Doctrine.');
438
+        return new self('Locking type "'.$unsupportedType->getName().'" is not supported by Doctrine.');
439 439
     }
440 440
 
441 441
     /**
@@ -445,13 +445,13 @@  discard block
 block discarded – undo
445 445
      */
446 446
     public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
447 447
     {
448
-        if (! empty($path)) {
449
-            $path = '[' . $path . ']';
448
+        if ( ! empty($path)) {
449
+            $path = '['.$path.']';
450 450
         }
451 451
 
452 452
         return new self(
453
-            'File mapping drivers must have a valid directory path, ' .
454
-            'however the given path ' . $path . ' seems to be incorrect!'
453
+            'File mapping drivers must have a valid directory path, '.
454
+            'however the given path '.$path.' seems to be incorrect!'
455 455
         );
456 456
     }
457 457
 
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
     public static function invalidClassInDiscriminatorMap($className, $owningClass)
468 468
     {
469 469
         return new self(sprintf(
470
-            "Entity class '%s' used in the discriminator map of class '%s' " .
470
+            "Entity class '%s' used in the discriminator map of class '%s' ".
471 471
             'does not exist.',
472 472
             $className,
473 473
             $owningClass
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
     public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, Property $property)
534 534
     {
535 535
         return new self(sprintf(
536
-            'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' .
536
+            'It is not possible to set id field "%s" to type "%s" in entity class "%s". '.
537 537
             'The type "%s" requires conversion SQL which is not allowed for identifiers.',
538 538
             $property->getName(),
539 539
             $property->getTypeName(),
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
      */
570 570
     public static function duplicateColumnName($className, $columnName)
571 571
     {
572
-        return new self("Duplicate definition of column '" . $columnName . "' on entity '" . $className . "' in a field or discriminator column mapping.");
572
+        return new self("Duplicate definition of column '".$columnName."' on entity '".$className."' in a field or discriminator column mapping.");
573 573
     }
574 574
 
575 575
     /**
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
      */
581 581
     public static function illegalToManyAssociationOnMappedSuperclass($className, $field)
582 582
     {
583
-        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '" . $className . '#' . $field . "'.");
583
+        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className.'#'.$field."'.");
584 584
     }
585 585
 
586 586
     /**
@@ -592,8 +592,8 @@  discard block
 block discarded – undo
592 592
      */
593 593
     public static function cannotMapCompositePrimaryKeyEntitiesAsForeignId($className, $targetEntity, $targetField)
594 594
     {
595
-        return new self("It is not possible to map entity '" . $className . "' with a composite primary key " .
596
-            "as part of the primary key of another entity '" . $targetEntity . '#' . $targetField . "'.");
595
+        return new self("It is not possible to map entity '".$className."' with a composite primary key ".
596
+            "as part of the primary key of another entity '".$targetEntity.'#'.$targetField."'.");
597 597
     }
598 598
 
599 599
     /**
@@ -647,8 +647,8 @@  discard block
 block discarded – undo
647 647
      */
648 648
     public static function illegalOrphanRemoval($className, $field)
649 649
     {
650
-        return new self('Orphan removal is only allowed on one-to-one and one-to-many ' .
651
-            'associations, but ' . $className . '#' . $field . ' is not.');
650
+        return new self('Orphan removal is only allowed on one-to-one and one-to-many '.
651
+            'associations, but '.$className.'#'.$field.' is not.');
652 652
     }
653 653
 
654 654
     /**
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
      */
681 681
     public static function noInheritanceOnMappedSuperClass($className)
682 682
     {
683
-        return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'.");
683
+        return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'.");
684 684
     }
685 685
 
686 686
     /**
@@ -692,8 +692,8 @@  discard block
 block discarded – undo
692 692
     public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName)
693 693
     {
694 694
         return new self(
695
-            "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
696
-            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '" . $className . "' an abstract class " .
695
+            "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ".
696
+            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ".
697 697
             'to avoid this exception from occurring.'
698 698
         );
699 699
     }
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
      */
707 707
     public static function lifecycleCallbackMethodNotFound($className, $methodName)
708 708
     {
709
-        return new self("Entity '" . $className . "' has no public method '" . $methodName . "' to be registered as lifecycle callback.");
709
+        return new self("Entity '".$className."' has no public method '".$methodName."' to be registered as lifecycle callback.");
710 710
     }
711 711
 
712 712
     /**
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
      */
741 741
     public static function invalidFetchMode($className, $annotation)
742 742
     {
743
-        return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
743
+        return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'");
744 744
     }
745 745
 
746 746
     /**
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
      */
751 751
     public static function compositeKeyAssignedIdGeneratorRequired($className)
752 752
     {
753
-        return new self("Entity '" . $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
753
+        return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
754 754
     }
755 755
 
756 756
     /**
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
      */
763 763
     public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName)
764 764
     {
765
-        return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity . '#' . $associationName . "'.");
765
+        return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity.'#'.$associationName."'.");
766 766
     }
767 767
 
768 768
     /**
@@ -774,8 +774,8 @@  discard block
 block discarded – undo
774 774
      */
775 775
     public static function invalidCascadeOption(array $cascades, $className, $propertyName)
776 776
     {
777
-        $cascades = implode(', ', array_map(static function ($e) {
778
-            return "'" . $e . "'";
777
+        $cascades = implode(', ', array_map(static function($e) {
778
+            return "'".$e."'";
779 779
         }, $cascades));
780 780
 
781 781
         return new self(sprintf(
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
     {
809 809
         return new self(
810 810
             sprintf(
811
-                'Infinite nesting detected for embedded property %s::%s. ' .
811
+                'Infinite nesting detected for embedded property %s::%s. '.
812 812
                 'You cannot embed an embeddable from the same type inside an embeddable.',
813 813
                 $className,
814 814
                 $propertyName
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
     {
824 824
         return new self(
825 825
             sprintf(
826
-                'Class %s not found in namespaces %s.' .
826
+                'Class %s not found in namespaces %s.'.
827 827
                 $className,
828 828
                 implode(', ', $namespaces)
829 829
             )
Please login to merge, or discard this patch.