Test Setup Failed
Push — develop ( 082d66...6f26e1 )
by Guilherme
63:04
created
lib/Doctrine/ORM/Mapping/Driver/DriverChain.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * <http://www.doctrine-project.org>.
18 18
  */
19 19
 
20
-declare(strict_types=1);
20
+declare(strict_types = 1);
21 21
 
22 22
 namespace Doctrine\ORM\Mapping\Driver;
23 23
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         foreach ($this->drivers AS $namespace => $driver) {
127 127
             $oid = spl_object_hash($driver);
128 128
 
129
-            if (!isset($driverClasses[$oid])) {
129
+            if ( ! isset($driverClasses[$oid])) {
130 130
                 $driverClasses[$oid] = $driver->getAllClassNames();
131 131
             }
132 132
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/FieldMetadata.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 
8 8
 use Doctrine\DBAL\Types\Type;
9 9
 use Doctrine\ORM\Reflection\ReflectionService;
10
-use Doctrine\ORM\Sequencing\Generator;
11 10
 
12 11
 /**
13 12
  * Class FieldMetadata
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ReflectionEmbeddedProperty.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -68,6 +68,7 @@
 block discarded – undo
68 68
 
69 69
     /**
70 70
      * {@inheritDoc}
71
+     * @param string $value
71 72
      */
72 73
     public function setValue($object, $value = null) : void
73 74
     {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 namespace Doctrine\ORM\Persisters\Collection;
6 6
 
7 7
 use Doctrine\Common\Collections\Criteria;
8
-use Doctrine\ORM\Mapping\AssociationMetadata;
9 8
 use Doctrine\ORM\Mapping\ClassMetadata;
10 9
 use Doctrine\ORM\Mapping\FieldMetadata;
11 10
 use Doctrine\ORM\Mapping\JoinColumnMetadata;
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Persisters\Collection;
6 6
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     {
35 35
         $association = $collection->getMapping();
36 36
 
37
-        if (! $association->isOwningSide()) {
37
+        if ( ! $association->isOwningSide()) {
38 38
             return; // ignore inverse side
39 39
         }
40 40
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             /** @var JoinColumnMetadata $joinColumn */
47 47
             $referencedColumnName = $joinColumn->getReferencedColumnName();
48 48
 
49
-            if (! $joinColumn->getType()) {
49
+            if ( ! $joinColumn->getType()) {
50 50
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
51 51
             }
52 52
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $association = $collection->getMapping();
68 68
 
69
-        if (! $association->isOwningSide()) {
69
+        if ( ! $association->isOwningSide()) {
70 70
             return; // ignore inverse side
71 71
         }
72 72
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
         $association = $collection->getMapping();
99 99
 
100
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
100
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
101 101
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
102 102
         }
103 103
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             : $association->getMappedBy()
108 108
         ;
109 109
 
110
-        $criteria  = [
110
+        $criteria = [
111 111
             $mappedKey                   => $collection->getOwner(),
112 112
             $association->getIndexedBy() => $index,
113 113
         ];
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
145 145
             $referencedColumnName = $joinColumn->getReferencedColumnName();
146 146
 
147
-            if (! $joinColumn->getType()) {
147
+            if ( ! $joinColumn->getType()) {
148 148
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em));
149 149
             }
150 150
 
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
         }*/
178 178
 
179 179
         $sql = 'SELECT COUNT(*)'
180
-            . ' FROM ' . $joinTableName . ' t'
180
+            . ' FROM '.$joinTableName.' t'
181 181
             . $joinTargetEntitySQL
182
-            . ' WHERE ' . implode(' AND ', $conditions);
182
+            . ' WHERE '.implode(' AND ', $conditions);
183 183
 
184 184
         return $this->conn->fetchColumn($sql, $params, 0, $types);
185 185
     }
@@ -201,13 +201,13 @@  discard block
 block discarded – undo
201 201
     {
202 202
         $association = $collection->getMapping();
203 203
 
204
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
204
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
205 205
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
206 206
         }
207 207
 
208 208
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true);
209 209
 
210
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
210
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
211 211
 
212 212
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
213 213
     }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true);
225 225
 
226
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
226
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
227 227
 
228 228
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
229 229
     }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 
240 240
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false);
241 241
 
242
-        $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
242
+        $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
243 243
 
244 244
         return (bool) $this->conn->executeUpdate($sql, $params, $types);
245 245
     }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         $onConditions  = $this->getOnConditionSQL($association);
258 258
         $whereClauses  = $params = $types = [];
259 259
 
260
-        if (! $association->isOwningSide()) {
260
+        if ( ! $association->isOwningSide()) {
261 261
             $association = $targetClass->getProperty($association->getMappedBy());
262 262
             $joinColumns = $association->getJoinTable()->getInverseJoinColumns();
263 263
         } else {
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
270 270
             $referencedColumnName = $joinColumn->getReferencedColumnName();
271 271
 
272
-            if (! $joinColumn->getType()) {
272
+            if ( ! $joinColumn->getType()) {
273 273
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $ownerMetadata, $this->em));
274 274
             }
275 275
 
@@ -297,11 +297,11 @@  discard block
 block discarded – undo
297 297
 
298 298
         $resultSetMapping->addRootEntityFromClassMetadata($targetClass->getClassName(), 'te');
299 299
 
300
-        $sql = 'SELECT ' . $resultSetMapping->generateSelectClause()
301
-            . ' FROM ' . $tableName . ' te'
302
-            . ' JOIN ' . $joinTableName . ' t ON'
300
+        $sql = 'SELECT '.$resultSetMapping->generateSelectClause()
301
+            . ' FROM '.$tableName.' te'
302
+            . ' JOIN '.$joinTableName.' t ON'
303 303
             . implode(' AND ', $onConditions)
304
-            . ' WHERE ' . implode(' AND ', $whereClauses);
304
+            . ' WHERE '.implode(' AND ', $whereClauses);
305 305
 
306 306
         $sql .= $this->getOrderingSql($criteria, $targetClass);
307 307
         $sql .= $this->getLimitSql($criteria);
@@ -338,8 +338,8 @@  discard block
 block discarded – undo
338 338
 
339 339
         // A join is needed if there is filtering on the target entity
340 340
         $tableName = $rootClass->table->getQuotedQualifiedName($this->platform);
341
-        $joinSql   = ' JOIN ' . $tableName . ' te'
342
-            . ' ON' . implode(' AND ', $this->getOnConditionSQL($association));
341
+        $joinSql   = ' JOIN '.$tableName.' te'
342
+            . ' ON'.implode(' AND ', $this->getOnConditionSQL($association));
343 343
 
344 344
         return [$joinSql, $filterSql];
345 345
     }
@@ -358,18 +358,18 @@  discard block
 block discarded – undo
358 358
 
359 359
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
360 360
             if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
361
-                $filterClauses[] = '(' . $filterExpr . ')';
361
+                $filterClauses[] = '('.$filterExpr.')';
362 362
             }
363 363
         }
364 364
 
365
-        if (! $filterClauses) {
365
+        if ( ! $filterClauses) {
366 366
             return '';
367 367
         }
368 368
 
369 369
         $filterSql = implode(' AND ', $filterClauses);
370 370
 
371 371
         return count($filterClauses) > 1
372
-            ? '(' . $filterSql . ')'
372
+            ? '('.$filterSql.')'
373 373
             : $filterSql
374 374
         ;
375 375
     }
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
             $quotedColumnName           = $this->platform->quoteIdentifier($joinColumn->getColumnName());
401 401
             $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName());
402 402
 
403
-            $conditions[] = ' t.' . $quotedColumnName . ' = ' . 'te.' . $quotedReferencedColumnName;
403
+            $conditions[] = ' t.'.$quotedColumnName.' = '.'te.'.$quotedReferencedColumnName;
404 404
         }
405 405
 
406 406
         return $conditions;
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
             $columns[] = $this->platform->quoteIdentifier($joinColumn->getColumnName());
423 423
         }
424 424
 
425
-        return 'DELETE FROM ' . $joinTableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
425
+        return 'DELETE FROM '.$joinTableName.' WHERE '.implode(' = ? AND ', $columns).' = ?';
426 426
     }
427 427
 
428 428
     /**
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
479 479
             $referencedColumnName = $joinColumn->getReferencedColumnName();
480 480
 
481
-            if (! $joinColumn->getType()) {
481
+            if ( ! $joinColumn->getType()) {
482 482
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
483 483
             }
484 484
 
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
492 492
             $referencedColumnName = $joinColumn->getReferencedColumnName();
493 493
 
494
-            if (! $joinColumn->getType()) {
494
+            if ( ! $joinColumn->getType()) {
495 495
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
496 496
             }
497 497
 
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
546 546
             $referencedColumnName = $joinColumn->getReferencedColumnName();
547 547
 
548
-            if (! $joinColumn->getType()) {
548
+            if ( ! $joinColumn->getType()) {
549 549
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
550 550
             }
551 551
 
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
559 559
             $referencedColumnName = $joinColumn->getReferencedColumnName();
560 560
 
561
-            if (! $joinColumn->getType()) {
561
+            if ( ! $joinColumn->getType()) {
562 562
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
563 563
             }
564 564
 
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
         $sourceClass       = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
646 646
         $targetClass       = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
647 647
 
648
-        if (! $owningAssociation->isOwningSide()) {
648
+        if ( ! $owningAssociation->isOwningSide()) {
649 649
             $owningAssociation  = $targetClass->getProperty($owningAssociation->getMappedBy());
650 650
             $joinTable          = $owningAssociation->getJoinTable();
651 651
             $joinColumns        = $joinTable->getJoinColumns();
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
         }
658 658
 
659 659
         $joinTableName   = $joinTable->getQuotedQualifiedName($this->platform);
660
-        $quotedJoinTable = $joinTableName . ' t';
660
+        $quotedJoinTable = $joinTableName.' t';
661 661
         $whereClauses    = [];
662 662
         $params          = [];
663 663
         $types           = [];
@@ -671,11 +671,11 @@  discard block
 block discarded – undo
671 671
                 $quotedColumnName           = $this->platform->quoteIdentifier($joinColumn->getColumnName());
672 672
                 $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName());
673 673
 
674
-                $joinConditions[] = ' t.' . $quotedColumnName . ' = ' . 'tr.' . $quotedReferencedColumnName;
674
+                $joinConditions[] = ' t.'.$quotedColumnName.' = '.'tr.'.$quotedReferencedColumnName;
675 675
             }
676 676
 
677 677
             $tableName        = $targetClass->table->getQuotedQualifiedName($this->platform);
678
-            $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions);
678
+            $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions);
679 679
             $indexByProperty  = $targetClass->getProperty($indexBy);
680 680
 
681 681
             switch (true) {
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
699 699
             $referencedColumnName = $joinColumn->getReferencedColumnName();
700 700
 
701
-            if (! $joinColumn->getType()) {
701
+            if ( ! $joinColumn->getType()) {
702 702
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em));
703 703
             }
704 704
 
@@ -707,13 +707,13 @@  discard block
 block discarded – undo
707 707
             $types[]        = $joinColumn->getType();
708 708
         }
709 709
 
710
-        if (! $joinNeeded) {
710
+        if ( ! $joinNeeded) {
711 711
             foreach ($joinColumns as $joinColumn) {
712 712
                 /** @var JoinColumnMetadata $joinColumn */
713 713
                 $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
714 714
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
715 715
 
716
-                if (! $joinColumn->getType()) {
716
+                if ( ! $joinColumn->getType()) {
717 717
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
718 718
                 }
719 719
 
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
             list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($association);
728 728
 
729 729
             if ($filterSql) {
730
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
730
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
731 731
                 $whereClauses[] = $filterSql;
732 732
             }
733 733
         }
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
         $association       = $collection->getMapping();
752 752
         $owningAssociation = $association;
753 753
 
754
-        if (! $association->isOwningSide()) {
754
+        if ( ! $association->isOwningSide()) {
755 755
             $sourceClass      = $this->em->getClassMetadata($association->getTargetEntity());
756 756
             $targetClass      = $this->em->getClassMetadata($association->getSourceEntity());
757 757
             $sourceIdentifier = $this->uow->getEntityIdentifier($element);
@@ -777,11 +777,11 @@  discard block
 block discarded – undo
777 777
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
778 778
             $referencedColumnName = $joinColumn->getReferencedColumnName();
779 779
 
780
-            if (! $joinColumn->getType()) {
780
+            if ( ! $joinColumn->getType()) {
781 781
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em));
782 782
             }
783 783
 
784
-            $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?';
784
+            $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?';
785 785
             $params[]       = $sourceIdentifier[$sourceClass->fieldNames[$referencedColumnName]];
786 786
             $types[]        = $joinColumn->getType();
787 787
         }
@@ -791,11 +791,11 @@  discard block
 block discarded – undo
791 791
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
792 792
             $referencedColumnName = $joinColumn->getReferencedColumnName();
793 793
 
794
-            if (! $joinColumn->getType()) {
794
+            if ( ! $joinColumn->getType()) {
795 795
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
796 796
             }
797 797
 
798
-            $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?';
798
+            $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?';
799 799
             $params[]       = $targetIdentifier[$targetClass->fieldNames[$referencedColumnName]];
800 800
             $types[]        = $joinColumn->getType();
801 801
         }
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
             list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($association);
807 807
 
808 808
             if ($filterSql) {
809
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
809
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
810 810
                 $whereClauses[] = $filterSql;
811 811
             }
812 812
         }
@@ -855,10 +855,10 @@  discard block
 block discarded – undo
855 855
                 $property   = $targetClass->getProperty($name);
856 856
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
857 857
 
858
-                $orderBy[] = $columnName . ' ' . $direction;
858
+                $orderBy[] = $columnName.' '.$direction;
859 859
             }
860 860
 
861
-            return ' ORDER BY ' . implode(', ', $orderBy);
861
+            return ' ORDER BY '.implode(', ', $orderBy);
862 862
         }
863 863
         return '';
864 864
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,6 @@
 block discarded – undo
8 8
 use Doctrine\DBAL\LockMode;
9 9
 use Doctrine\DBAL\Types\Type;
10 10
 use Doctrine\ORM\Mapping\AssociationMetadata;
11
-use Doctrine\ORM\Mapping\ClassMetadata;
12
-use Doctrine\ORM\Mapping\ColumnMetadata;
13 11
 use Doctrine\ORM\Mapping\FieldMetadata;
14 12
 use Doctrine\ORM\Mapping\GeneratorType;
15 13
 use Doctrine\ORM\Mapping\JoinColumnMetadata;
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Persisters\Entity;
6 6
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             }
114 114
 
115 115
             foreach ($data as $columnName => $value) {
116
-                if (!is_array($id) || !isset($id[$columnName])) {
116
+                if ( ! is_array($id) || ! isset($id[$columnName])) {
117 117
                     $type = $this->columns[$columnName]->getType();
118 118
 
119 119
                     $stmt->bindValue($paramIndex++, $value, $type);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
         if ($filterSql = $this->generateFilterConditionSQL($rootClass, $tableAlias)) {
238 238
             $conditionSql .= $conditionSql
239
-                ? ' AND ' . $filterSql
239
+                ? ' AND '.$filterSql
240 240
                 : $filterSql;
241 241
         }
242 242
 
@@ -244,26 +244,26 @@  discard block
 block discarded – undo
244 244
 
245 245
         switch ($lockMode) {
246 246
             case LockMode::PESSIMISTIC_READ:
247
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
247
+                $lockSql = ' '.$this->platform->getReadLockSQL();
248 248
                 break;
249 249
 
250 250
             case LockMode::PESSIMISTIC_WRITE:
251
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
251
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
252 252
                 break;
253 253
         }
254 254
 
255 255
         $tableName  = $this->class->table->getQuotedQualifiedName($this->platform);
256
-        $from       = ' FROM ' . $tableName . ' ' . $baseTableAlias;
257
-        $where      = $conditionSql !== '' ? ' WHERE ' . $conditionSql : '';
256
+        $from       = ' FROM '.$tableName.' '.$baseTableAlias;
257
+        $where      = $conditionSql !== '' ? ' WHERE '.$conditionSql : '';
258 258
         $lock       = $this->platform->appendLockHint($from, $lockMode);
259 259
         $columnList = $this->getSelectColumnsSQL();
260
-        $query      = 'SELECT '  . $columnList
260
+        $query      = 'SELECT '.$columnList
261 261
                     . $lock
262 262
                     . $joinSql
263 263
                     . $where
264 264
                     . $orderBySql;
265 265
 
266
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
266
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
267 267
     }
268 268
 
269 269
     /**
@@ -285,14 +285,14 @@  discard block
 block discarded – undo
285 285
 
286 286
         if ('' !== $filterSql) {
287 287
             $conditionSql = $conditionSql
288
-                ? $conditionSql . ' AND ' . $filterSql
288
+                ? $conditionSql.' AND '.$filterSql
289 289
                 : $filterSql;
290 290
         }
291 291
 
292 292
         $sql = 'SELECT COUNT(*) '
293
-            . 'FROM ' . $tableName . ' ' . $baseTableAlias
293
+            . 'FROM '.$tableName.' '.$baseTableAlias
294 294
             . $joinSql
295
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
295
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
296 296
 
297 297
         return $sql;
298 298
     }
@@ -313,18 +313,18 @@  discard block
 block discarded – undo
313 313
             $conditions   = [];
314 314
             $tableName    = $parentClass->table->getQuotedQualifiedName($this->platform);
315 315
             $tableAlias   = $this->getSQLTableAlias($parentClass->getTableName());
316
-            $joinSql     .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
316
+            $joinSql     .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
317 317
 
318 318
             foreach ($identifierColumns as $idColumn) {
319 319
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
320 320
 
321
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
321
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
322 322
             }
323 323
 
324 324
             $joinSql .= implode(' AND ', $conditions);
325 325
         }
326 326
 
327
-        return parent::getLockTablesSql($lockMode) . $joinSql;
327
+        return parent::getLockTablesSql($lockMode).$joinSql;
328 328
     }
329 329
 
330 330
     /**
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
                 continue;
352 352
             }
353 353
 
354
-            if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
354
+            if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
355 355
                 continue;
356 356
             }
357 357
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
                 /** @var JoinColumnMetadata $joinColumn */
362 362
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
363 363
 
364
-                if (! $joinColumn->getType()) {
364
+                if ( ! $joinColumn->getType()) {
365 365
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
366 366
                 }
367 367
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
381 381
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
382 382
 
383
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);
383
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform);
384 384
 
385 385
         // sub tables
386 386
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
                             /** @var JoinColumnMetadata $joinColumn */
405 405
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
406 406
 
407
-                            if (! $joinColumn->getType()) {
407
+                            if ( ! $joinColumn->getType()) {
408 408
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
409 409
                             }
410 410
 
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
                         $columnName           = $joinColumn->getColumnName();
455 455
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
456 456
 
457
-                        if (! $joinColumn->getType()) {
457
+                        if ( ! $joinColumn->getType()) {
458 458
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
459 459
                         }
460 460
 
@@ -511,12 +511,12 @@  discard block
 block discarded – undo
511 511
             $conditions   = [];
512 512
             $tableName    = $parentClass->table->getQuotedQualifiedName($this->platform);
513 513
             $tableAlias   = $this->getSQLTableAlias($parentClass->getTableName());
514
-            $joinSql     .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
514
+            $joinSql     .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
515 515
 
516 516
             foreach ($identifierColumns as $idColumn) {
517 517
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
518 518
 
519
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
519
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
520 520
             }
521 521
 
522 522
             $joinSql .= implode(' AND ', $conditions);
@@ -528,12 +528,12 @@  discard block
 block discarded – undo
528 528
             $subClass    = $this->em->getClassMetadata($subClassName);
529 529
             $tableName   = $subClass->table->getQuotedQualifiedName($this->platform);
530 530
             $tableAlias  = $this->getSQLTableAlias($subClass->getTableName());
531
-            $joinSql    .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
531
+            $joinSql    .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
532 532
 
533 533
             foreach ($identifierColumns as $idColumn) {
534 534
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
535 535
 
536
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
536
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
537 537
             }
538 538
 
539 539
             $joinSql .= implode(' AND ', $conditions);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php 4 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -109,6 +109,7 @@
 block discarded – undo
109 109
 
110 110
     /**
111 111
      * {@inheritdoc}
112
+     * @param string|null $tableName
112 113
      */
113 114
     protected function getSQLTableAlias($tableName, $assocName = '')
114 115
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Doctrine\Common\Collections\Criteria;
10 10
 use Doctrine\ORM\Mapping\FieldMetadata;
11 11
 use Doctrine\ORM\Mapping\JoinColumnMetadata;
12
-use Doctrine\ORM\Mapping\ToManyAssociationMetadata;
13 12
 use Doctrine\ORM\Mapping\ToOneAssociationMetadata;
14 13
 use Doctrine\ORM\Utility\PersisterHelper;
15 14
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 
38 38
         $columnList[] = parent::getSelectColumnsSQL();
39 39
 
40
-         // Append discriminator column
40
+            // Append discriminator column
41 41
         $discrColumn      = $this->class->discriminatorColumn;
42 42
         $discrTableAlias  = $this->getSQLTableAlias($discrColumn->getTableName());
43 43
         $discrColumnName  = $discrColumn->getColumnName();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Persisters\Entity;
6 6
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
49 49
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
50 50
 
51
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);
51
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform);
52 52
 
53 53
         // Append subclass columns
54 54
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                             /** @var JoinColumnMetadata $joinColumn */
73 73
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
74 74
 
75
-                            if (! $joinColumn->getType()) {
75
+                            if ( ! $joinColumn->getType()) {
76 76
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
77 77
                             }
78 78
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $conditionSql .= ' AND ';
127 127
         }
128 128
 
129
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
129
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
130 130
     }
131 131
 
132 132
     /**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             $conditionSql .= ' AND ';
141 141
         }
142 142
 
143
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
143
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
144 144
     }
145 145
 
146 146
     /**
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         return sprintf(
169 169
             '%s IN (%s)',
170
-            $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform),
170
+            $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform),
171 171
             implode(', ', $values)
172 172
         );
173 173
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -371,7 +371,7 @@
 block discarded – undo
371 371
 
372 372
     /**
373 373
      * @param \SimpleXMLElement $associationXml
374
-     * @param array             $joinColumns
374
+     * @param JoinColumnMetadata[]             $joinColumns
375 375
      * @param string            $joinColumnsName
376 376
      */
377 377
     private function exportJoinColumns(
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 use Doctrine\ORM\Mapping\ManyToManyAssociationMetadata;
29 29
 use Doctrine\ORM\Mapping\OneToManyAssociationMetadata;
30 30
 use Doctrine\ORM\Mapping\OneToOneAssociationMetadata;
31
-use Doctrine\ORM\Mapping\Property;
32 31
 use Doctrine\ORM\Mapping\ToManyAssociationMetadata;
33 32
 use Doctrine\ORM\Mapping\ToOneAssociationMetadata;
34 33
 use Doctrine\ORM\Mapping\VersionFieldMetadata;
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM;
6 6
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
         $oid  = spl_object_hash($entity);
451 451
         $data = [];
452 452
 
453
-        if (!isset($this->entityChangeSets[$oid])) {
453
+        if ( ! isset($this->entityChangeSets[$oid])) {
454 454
             return $data;
455 455
         }
456 456
 
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
                     || ! $class->getProperty($name) instanceof FieldMetadata
534 534
                     || ! $class->getProperty($name)->hasValueGenerator()
535 535
                     || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY
536
-                ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) {
536
+                ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) {
537 537
                 $actualData[$name] = $value;
538 538
             }
539 539
         }
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
                     if ($owner === null) { // cloned
588 588
                         $actualValue->setOwner($entity, $property);
589 589
                     } else if ($owner !== $entity) { // no clone, we have to fix
590
-                        if (! $actualValue->isInitialized()) {
590
+                        if ( ! $actualValue->isInitialized()) {
591 591
                             $actualValue->initialize(); // we have to do this otherwise the cols share state
592 592
                         }
593 593
 
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
                             // A PersistentCollection was de-referenced, so delete it.
628 628
                             $coid = spl_object_hash($orgValue);
629 629
 
630
-                            if (!isset($this->collectionDeletions[$coid])) {
630
+                            if ( ! isset($this->collectionDeletions[$coid])) {
631 631
                                 $this->collectionDeletions[$coid] = $orgValue;
632 632
                                 $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored
633 633
                             }
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
 
650 650
         // Look for changes in associations of the entity
651 651
         foreach ($class->getDeclaredPropertiesIterator() as $property) {
652
-            if (! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) {
652
+            if ( ! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) {
653 653
                 continue;
654 654
             }
655 655
 
@@ -753,13 +753,13 @@  discard block
 block discarded – undo
753 753
         $targetClass    = $this->em->getClassMetadata($targetEntity);
754 754
 
755 755
         foreach ($unwrappedValue as $key => $entry) {
756
-            if (! ($entry instanceof $targetEntity)) {
756
+            if ( ! ($entry instanceof $targetEntity)) {
757 757
                 throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry);
758 758
             }
759 759
 
760 760
             $state = $this->getEntityState($entry, self::STATE_NEW);
761 761
 
762
-            if (! ($entry instanceof $targetEntity)) {
762
+            if ( ! ($entry instanceof $targetEntity)) {
763 763
                 throw ORMException::unexpectedAssociationValue(
764 764
                     $association->getSourceEntity(),
765 765
                     $association->getName(),
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
         $persister = $this->getEntityPersister($class->getClassName());
819 819
         $generationPlan->executeImmediate($this->em, $entity);
820 820
 
821
-        if (! $generationPlan->containsDeferred()) {
821
+        if ( ! $generationPlan->containsDeferred()) {
822 822
             $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity));
823 823
             $this->entityIdentifiers[$oid] = $id;
824 824
         }
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
     {
852 852
         $oid = spl_object_hash($entity);
853 853
 
854
-        if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
854
+        if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
855 855
             throw ORMInvalidArgumentException::entityNotManaged($entity);
856 856
         }
857 857
 
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
                     break;
874 874
 
875 875
                 case ($property instanceof FieldMetadata):
876
-                    if (! $property->isPrimaryKey()
876
+                    if ( ! $property->isPrimaryKey()
877 877
                         || ! $property->getValueGenerator()
878 878
                         || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) {
879 879
                         $actualData[$name] = $property->getValue($entity);
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
             // Entity with this $oid after deletion treated as NEW, even if the $oid
1027 1027
             // is obtained by a new entity because the old one went out of scope.
1028 1028
             //$this->entityStates[$oid] = self::STATE_NEW;
1029
-            if (! $class->isIdentifierComposite()) {
1029
+            if ( ! $class->isIdentifierComposite()) {
1030 1030
                 $property = $class->getProperty($class->getSingleIdentifierFieldName());
1031 1031
 
1032 1032
                 if ($property instanceof FieldMetadata && $property->hasValueGenerator()) {
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
         // Calculate dependencies for new nodes
1080 1080
         while ($class = array_pop($newNodes)) {
1081 1081
             foreach ($class->getDeclaredPropertiesIterator() as $property) {
1082
-                if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1082
+                if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1083 1083
                     continue;
1084 1084
                 }
1085 1085
 
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
                 $weight = count(
1095 1095
                     array_filter(
1096 1096
                         $property->getJoinColumns(),
1097
-                        function (JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); }
1097
+                        function(JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); }
1098 1098
                     )
1099 1099
                 ) === 0;
1100 1100
 
@@ -1389,7 +1389,7 @@  discard block
 block discarded – undo
1389 1389
         $persister = $this->getEntityPersister($class->getClassName());
1390 1390
         $id        = $persister->getIdentifier($entity);
1391 1391
 
1392
-        if (! $id) {
1392
+        if ( ! $id) {
1393 1393
             return self::STATE_NEW;
1394 1394
         }
1395 1395
 
@@ -1624,7 +1624,7 @@  discard block
 block discarded – undo
1624 1624
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted");
1625 1625
 
1626 1626
             default:
1627
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1627
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1628 1628
         }
1629 1629
 
1630 1630
         $this->cascadePersist($entity, $visited);
@@ -1694,7 +1694,7 @@  discard block
 block discarded – undo
1694 1694
             case self::STATE_DETACHED:
1695 1695
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed");
1696 1696
             default:
1697
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1697
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1698 1698
         }
1699 1699
 
1700 1700
     }
@@ -1783,7 +1783,7 @@  discard block
 block discarded – undo
1783 1783
                 if ($managedCopy === null) {
1784 1784
                     // If the identifier is ASSIGNED, it is NEW, otherwise an error
1785 1785
                     // since the managed entity was not found.
1786
-                    if (! $class->isIdentifierComposite()
1786
+                    if ( ! $class->isIdentifierComposite()
1787 1787
                         && $class->getProperty($class->getSingleIdentifierFieldName()) instanceof FieldMetadata
1788 1788
                         && $class->getProperty($class->getSingleIdentifierFieldName())->hasValueGenerator()) {
1789 1789
                         throw EntityNotFoundException::fromClassNameAndIdentifier(
@@ -1834,7 +1834,7 @@  discard block
 block discarded – undo
1834 1834
      */
1835 1835
     private function ensureVersionMatch(ClassMetadata $class, $entity, $managedCopy)
1836 1836
     {
1837
-        if (! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) {
1837
+        if ( ! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) {
1838 1838
             return;
1839 1839
         }
1840 1840
 
@@ -1858,7 +1858,7 @@  discard block
 block discarded – undo
1858 1858
      */
1859 1859
     private function isLoaded($entity)
1860 1860
     {
1861
-        return !($entity instanceof Proxy) || $entity->__isInitialized();
1861
+        return ! ($entity instanceof Proxy) || $entity->__isInitialized();
1862 1862
     }
1863 1863
 
1864 1864
     /**
@@ -2020,7 +2020,7 @@  discard block
 block discarded – undo
2020 2020
         $class = $this->em->getClassMetadata(get_class($entity));
2021 2021
 
2022 2022
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
2023
-            if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) {
2023
+            if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) {
2024 2024
                 continue;
2025 2025
             }
2026 2026
 
@@ -2062,7 +2062,7 @@  discard block
 block discarded – undo
2062 2062
         $class = $this->em->getClassMetadata(get_class($entity));
2063 2063
 
2064 2064
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
2065
-            if (! ($association instanceof AssociationMetadata && in_array('detach', $association->getCascade()))) {
2065
+            if ( ! ($association instanceof AssociationMetadata && in_array('detach', $association->getCascade()))) {
2066 2066
                 continue;
2067 2067
             }
2068 2068
 
@@ -2105,7 +2105,7 @@  discard block
 block discarded – undo
2105 2105
         $class = $this->em->getClassMetadata(get_class($entity));
2106 2106
 
2107 2107
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
2108
-            if (! ($association instanceof AssociationMetadata && in_array('merge', $association->getCascade()))) {
2108
+            if ( ! ($association instanceof AssociationMetadata && in_array('merge', $association->getCascade()))) {
2109 2109
                 continue;
2110 2110
             }
2111 2111
 
@@ -2144,7 +2144,7 @@  discard block
 block discarded – undo
2144 2144
         $class = $this->em->getClassMetadata(get_class($entity));
2145 2145
 
2146 2146
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
2147
-            if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) {
2147
+            if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) {
2148 2148
                 continue;
2149 2149
             }
2150 2150
 
@@ -2160,7 +2160,7 @@  discard block
 block discarded – undo
2160 2160
 
2161 2161
                 case ($relatedEntities instanceof Collection):
2162 2162
                 case (is_array($relatedEntities)):
2163
-                    if (! ($association instanceof ToManyAssociationMetadata)) {
2163
+                    if ( ! ($association instanceof ToManyAssociationMetadata)) {
2164 2164
                         throw ORMInvalidArgumentException::invalidAssociation(
2165 2165
                             $this->em->getClassMetadata($targetEntity),
2166 2166
                             $association,
@@ -2175,7 +2175,7 @@  discard block
 block discarded – undo
2175 2175
                     break;
2176 2176
 
2177 2177
                 case ($relatedEntities !== null):
2178
-                    if (! $relatedEntities instanceof $targetEntity) {
2178
+                    if ( ! $relatedEntities instanceof $targetEntity) {
2179 2179
                         throw ORMInvalidArgumentException::invalidAssociation(
2180 2180
                             $this->em->getClassMetadata($targetEntity),
2181 2181
                             $association,
@@ -2206,7 +2206,7 @@  discard block
 block discarded – undo
2206 2206
         $class             = $this->em->getClassMetadata(get_class($entity));
2207 2207
 
2208 2208
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
2209
-            if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) {
2209
+            if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) {
2210 2210
                 continue;
2211 2211
             }
2212 2212
 
@@ -2289,7 +2289,7 @@  discard block
 block discarded – undo
2289 2289
             case LockMode::NONE === $lockMode:
2290 2290
             case LockMode::PESSIMISTIC_READ === $lockMode:
2291 2291
             case LockMode::PESSIMISTIC_WRITE === $lockMode:
2292
-                if (!$this->em->getConnection()->isTransactionActive()) {
2292
+                if ( ! $this->em->getConnection()->isTransactionActive()) {
2293 2293
                     throw TransactionRequiredException::transactionRequired();
2294 2294
                 }
2295 2295
 
@@ -2533,7 +2533,7 @@  discard block
 block discarded – undo
2533 2533
         }
2534 2534
 
2535 2535
         foreach ($class->getDeclaredPropertiesIterator() as $field => $association) {
2536
-            if (! ($association instanceof AssociationMetadata)) {
2536
+            if ( ! ($association instanceof AssociationMetadata)) {
2537 2537
                 continue;
2538 2538
             }
2539 2539
 
@@ -2582,7 +2582,7 @@  discard block
 block discarded – undo
2582 2582
                 continue;
2583 2583
             }
2584 2584
 
2585
-            if (! $association->isOwningSide()) {
2585
+            if ( ! $association->isOwningSide()) {
2586 2586
                 // use the given entity association
2587 2587
                 if (isset($data[$field]) && is_object($data[$field]) &&
2588 2588
                     isset($this->entityStates[spl_object_hash($data[$field])])) {
@@ -2632,7 +2632,7 @@  discard block
 block discarded – undo
2632 2632
                 $associatedId[$targetField] = $joinColumnValue;
2633 2633
             }
2634 2634
 
2635
-            if (! $associatedId) {
2635
+            if ( ! $associatedId) {
2636 2636
                 // Foreign key is NULL
2637 2637
                 $association->setValue($entity, null);
2638 2638
                 $this->originalEntityData[$oid][$field] = null;
@@ -2641,7 +2641,7 @@  discard block
 block discarded – undo
2641 2641
             }
2642 2642
 
2643 2643
             // @todo guilhermeblanco Can we remove the need of this somehow?
2644
-            if (!isset($hints['fetchMode'][$class->getClassName()][$field])) {
2644
+            if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2645 2645
                 $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode();
2646 2646
             }
2647 2647
 
@@ -2658,7 +2658,7 @@  discard block
 block discarded – undo
2658 2658
                     // If this is an uninitialized proxy, we are deferring eager loads,
2659 2659
                     // this association is marked as eager fetch, and its an uninitialized proxy (wtf!)
2660 2660
                     // then we can append this entity for eager loading!
2661
-                    if (!$targetClass->isIdentifierComposite() &&
2661
+                    if ( ! $targetClass->isIdentifierComposite() &&
2662 2662
                         $newValue instanceof Proxy &&
2663 2663
                         isset($hints[self::HINT_DEFEREAGERLOAD]) &&
2664 2664
                         $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER &&
@@ -2689,7 +2689,7 @@  discard block
 block discarded – undo
2689 2689
                             break;
2690 2690
 
2691 2691
                         // Deferred eager load only works for single identifier classes
2692
-                        case (isset($hints[self::HINT_DEFEREAGERLOAD]) && !$targetClass->isIdentifierComposite()):
2692
+                        case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite()):
2693 2693
                             // TODO: Is there a faster approach?
2694 2694
                             $this->eagerLoadingEntities[$targetClass->getRootClassName()][$relatedIdHash] = current($associatedId);
2695 2695
 
@@ -3061,7 +3061,7 @@  discard block
 block discarded – undo
3061 3061
     {
3062 3062
         $class = $this->em->getClassMetadata(get_class($entity));
3063 3063
 
3064
-        if (! $class->getProperty($propertyName)) {
3064
+        if ( ! $class->getProperty($propertyName)) {
3065 3065
             return; // ignore non-persistent fields
3066 3066
         }
3067 3067
 
@@ -3201,7 +3201,7 @@  discard block
 block discarded – undo
3201 3201
      */
3202 3202
     private function afterTransactionComplete()
3203 3203
     {
3204
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
3204
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
3205 3205
             $persister->afterTransactionComplete();
3206 3206
         });
3207 3207
     }
@@ -3211,7 +3211,7 @@  discard block
 block discarded – undo
3211 3211
      */
3212 3212
     private function afterTransactionRolledBack()
3213 3213
     {
3214
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
3214
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
3215 3215
             $persister->afterTransactionRolledBack();
3216 3216
         });
3217 3217
     }
@@ -3294,11 +3294,11 @@  discard block
 block discarded – undo
3294 3294
      */
3295 3295
     private function mergeEntityStateIntoManagedCopy($entity, $managedCopy)
3296 3296
     {
3297
-        if (! $this->isLoaded($entity)) {
3297
+        if ( ! $this->isLoaded($entity)) {
3298 3298
             return;
3299 3299
         }
3300 3300
 
3301
-        if (! $this->isLoaded($managedCopy)) {
3301
+        if ( ! $this->isLoaded($managedCopy)) {
3302 3302
             $managedCopy->__load();
3303 3303
         }
3304 3304
 
@@ -3307,7 +3307,7 @@  discard block
 block discarded – undo
3307 3307
         foreach ($class->getDeclaredPropertiesIterator() as $property) {
3308 3308
             switch (true) {
3309 3309
                 case ($property instanceof FieldMetadata):
3310
-                    if (! $property->isPrimaryKey()) {
3310
+                    if ( ! $property->isPrimaryKey()) {
3311 3311
                         $property->setValue($managedCopy, $property->getValue($entity));
3312 3312
                     }
3313 3313
 
@@ -3329,7 +3329,7 @@  discard block
 block discarded – undo
3329 3329
                         continue 2;
3330 3330
                     }
3331 3331
 
3332
-                    if (! in_array('merge', $property->getCascade())) {
3332
+                    if ( ! in_array('merge', $property->getCascade())) {
3333 3333
                         if ($this->getEntityState($other) === self::STATE_DETACHED) {
3334 3334
                             $targetEntity    = $property->getTargetEntity();
3335 3335
                             $targetClass     = $this->em->getClassMetadata($targetEntity);
@@ -3361,7 +3361,7 @@  discard block
 block discarded – undo
3361 3361
 
3362 3362
                     $managedCol = $property->getValue($managedCopy);
3363 3363
 
3364
-                    if (! $managedCol) {
3364
+                    if ( ! $managedCol) {
3365 3365
                         $managedCol = $property->wrap($managedCopy, [], $this->em);
3366 3366
 
3367 3367
                         $property->setValue($managedCopy, $managedCol);
@@ -3371,7 +3371,7 @@  discard block
 block discarded – undo
3371 3371
                         $managedCol->initialize();
3372 3372
 
3373 3373
                         // clear and set dirty a managed collection if its not also the same collection to merge from.
3374
-                        if (! $managedCol->isEmpty() && $managedCol !== $mergeCol) {
3374
+                        if ( ! $managedCol->isEmpty() && $managedCol !== $mergeCol) {
3375 3375
                             $managedCol->unwrap()->clear();
3376 3376
                             $managedCol->setDirty(true);
3377 3377
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Tools\Console\Command;
6 6
 
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 
166 166
         $matches = array_filter(
167 167
             $this->getMappedEntities($entityManager),
168
-            function ($mappedEntity) use ($entityName) {
169
-                return preg_match('{' . preg_quote($entityName) . '}', $mappedEntity);
168
+            function($mappedEntity) use ($entityName) {
169
+                return preg_match('{'.preg_quote($entityName).'}', $mappedEntity);
170 170
             }
171 171
         );
172 172
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
             $output[] = $this->formatField(
225 225
                 sprintf('  %s', $parentClass->getParent()),
226
-                ($parentClass->isRootEntity() ? '(Root) ' : '') . $this->formatValue($attributes)
226
+                ($parentClass->isRootEntity() ? '(Root) ' : '').$this->formatValue($attributes)
227 227
             );
228 228
         }
229 229
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         }
249 249
 
250 250
         if (is_bool($value)) {
251
-            return '<comment>' . ($value ? 'True' : 'False') . '</comment>';
251
+            return '<comment>'.($value ? 'True' : 'False').'</comment>';
252 252
         }
253 253
 
254 254
         if (empty($value)) {
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
             if ($property instanceof FieldMetadata) {
332 332
                 $output = array_merge($output, $this->formatColumn($property));
333
-            }  else if ($property instanceof AssociationMetadata) {
333
+            } else if ($property instanceof AssociationMetadata) {
334 334
                 // @todo guilhermeblanco Fix me! We are trying to iterate through an AssociationMetadata instance
335 335
                 foreach ($property as $field => $value) {
336 336
                     $output[] = $this->formatField(sprintf('    %s', $field), $this->formatValue($value));
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         return $this->formatField(
387 387
             'Entity listeners',
388 388
             array_map(
389
-                function ($entityListener) {
389
+                function($entityListener) {
390 390
                     return get_class($entityListener);
391 391
                 },
392 392
                 $entityListeners
Please login to merge, or discard this patch.