Failed Conditions
Push — develop ( c47956...348e78 )
by Marco
17s
created
lib/Doctrine/ORM/EntityNotFoundException.php 1 patch
Spacing   +3 added lines, -3 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
 
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
         $ids = [];
26 26
 
27 27
         foreach ($id as $key => $value) {
28
-            $ids[] = $key . '(' . $value . ')';
28
+            $ids[] = $key.'('.$value.')';
29 29
         }
30 30
 
31 31
 
32 32
         return new self(
33
-            'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found'
33
+            'Entity of type \''.$className.'\''.($ids ? ' for IDs '.implode(', ', $ids) : '').' was not found'
34 34
         );
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlValueVisitor.php 1 patch
Spacing   +2 added lines, -2 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;
6 6
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * @var array
26 26
      */
27
-    private $types  = [];
27
+    private $types = [];
28 28
 
29 29
     /**
30 30
      * Converts a comparison expression into the target query language output.
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/CollectionPersister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php 1 patch
Spacing   +44 added lines, -44 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
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $association = $collection->getMapping();
33 33
 
34
-        if (! $association->isOwningSide()) {
34
+        if ( ! $association->isOwningSide()) {
35 35
             return; // ignore inverse side
36 36
         }
37 37
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     {
57 57
         $association = $collection->getMapping();
58 58
 
59
-        if (! $association->isOwningSide()) {
59
+        if ( ! $association->isOwningSide()) {
60 60
             return; // ignore inverse side
61 61
         }
62 62
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     {
88 88
         $association = $collection->getMapping();
89 89
 
90
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
90
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
91 91
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
92 92
         }
93 93
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             : $association->getMappedBy()
98 98
         ;
99 99
 
100
-        $criteria  = [
100
+        $criteria = [
101 101
             $mappedKey                   => $collection->getOwner(),
102 102
             $association->getIndexedBy() => $index,
103 103
         ];
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
             $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
134 134
             $referencedName   = $joinColumn->getReferencedColumnName();
135 135
 
136
-            if (! $joinColumn->getType()) {
136
+            if ( ! $joinColumn->getType()) {
137 137
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedName, $sourceClass, $this->em));
138 138
             }
139 139
 
140
-            $conditions[]   = 't.' . $quotedColumnName . ' = ?';
140
+            $conditions[]   = 't.'.$quotedColumnName.' = ?';
141 141
             $params[]       = $id[$sourceClass->fieldNames[$referencedName]];
142 142
             $types[]        = $joinColumn->getType();
143 143
         }
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
         }*/
167 167
 
168 168
         $sql = 'SELECT COUNT(*)'
169
-            . ' FROM ' . $joinTableName . ' t'
169
+            . ' FROM '.$joinTableName.' t'
170 170
             . $joinTargetEntitySQL
171
-            . ' WHERE ' . implode(' AND ', $conditions);
171
+            . ' WHERE '.implode(' AND ', $conditions);
172 172
 
173 173
         return $this->conn->fetchColumn($sql, $params, 0, $types);
174 174
     }
@@ -190,13 +190,13 @@  discard block
 block discarded – undo
190 190
     {
191 191
         $association = $collection->getMapping();
192 192
 
193
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
193
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
194 194
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
195 195
         }
196 196
 
197 197
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true);
198 198
 
199
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
199
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
200 200
 
201 201
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
202 202
     }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true);
214 214
 
215
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
215
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
216 216
 
217 217
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
218 218
     }
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false);
230 230
 
231
-        $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
231
+        $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
232 232
 
233 233
         return (bool) $this->conn->executeUpdate($sql, $params, $types);
234 234
     }
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         $onConditions  = $this->getOnConditionSQL($association);
247 247
         $whereClauses  = $params = $types = [];
248 248
 
249
-        if (! $association->isOwningSide()) {
249
+        if ( ! $association->isOwningSide()) {
250 250
             $association = $targetClass->getProperty($association->getMappedBy());
251 251
             $joinColumns = $association->getJoinTable()->getInverseJoinColumns();
252 252
         } else {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
             $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
258 258
             $referencedName   = $joinColumn->getReferencedColumnName();
259 259
 
260
-            if (! $joinColumn->getType()) {
260
+            if ( ! $joinColumn->getType()) {
261 261
                 $joinColumn->setType(
262 262
                     PersisterHelper::getTypeOfColumn($referencedName, $ownerMetadata, $this->em)
263 263
                 );
@@ -287,11 +287,11 @@  discard block
 block discarded – undo
287 287
 
288 288
         $resultSetMapping->addRootEntityFromClassMetadata($targetClass->getClassName(), 'te');
289 289
 
290
-        $sql = 'SELECT ' . $resultSetMapping->generateSelectClause()
291
-            . ' FROM ' . $tableName . ' te'
292
-            . ' JOIN ' . $joinTableName . ' t ON'
290
+        $sql = 'SELECT '.$resultSetMapping->generateSelectClause()
291
+            . ' FROM '.$tableName.' te'
292
+            . ' JOIN '.$joinTableName.' t ON'
293 293
             . implode(' AND ', $onConditions)
294
-            . ' WHERE ' . implode(' AND ', $whereClauses);
294
+            . ' WHERE '.implode(' AND ', $whereClauses);
295 295
 
296 296
         $sql .= $this->getOrderingSql($criteria, $targetClass);
297 297
         $sql .= $this->getLimitSql($criteria);
@@ -328,8 +328,8 @@  discard block
 block discarded – undo
328 328
 
329 329
         // A join is needed if there is filtering on the target entity
330 330
         $tableName = $rootClass->table->getQuotedQualifiedName($this->platform);
331
-        $joinSql   = ' JOIN ' . $tableName . ' te'
332
-            . ' ON' . implode(' AND ', $this->getOnConditionSQL($association));
331
+        $joinSql   = ' JOIN '.$tableName.' te'
332
+            . ' ON'.implode(' AND ', $this->getOnConditionSQL($association));
333 333
 
334 334
         return [$joinSql, $filterSql];
335 335
     }
@@ -348,18 +348,18 @@  discard block
 block discarded – undo
348 348
 
349 349
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
350 350
             if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
351
-                $filterClauses[] = '(' . $filterExpr . ')';
351
+                $filterClauses[] = '('.$filterExpr.')';
352 352
             }
353 353
         }
354 354
 
355
-        if (! $filterClauses) {
355
+        if ( ! $filterClauses) {
356 356
             return '';
357 357
         }
358 358
 
359 359
         $filterSql = implode(' AND ', $filterClauses);
360 360
 
361 361
         return count($filterClauses) > 1
362
-            ? '(' . $filterSql . ')'
362
+            ? '('.$filterSql.')'
363 363
             : $filterSql
364 364
         ;
365 365
     }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
             $quotedColumnName           = $this->platform->quoteIdentifier($joinColumn->getColumnName());
391 391
             $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName());
392 392
 
393
-            $conditions[] = ' t.' . $quotedColumnName . ' = ' . 'te.' . $quotedReferencedColumnName;
393
+            $conditions[] = ' t.'.$quotedColumnName.' = '.'te.'.$quotedReferencedColumnName;
394 394
         }
395 395
 
396 396
         return $conditions;
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
             $columns[] = $this->platform->quoteIdentifier($joinColumn->getColumnName());
413 413
         }
414 414
 
415
-        return 'DELETE FROM ' . $joinTableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
415
+        return 'DELETE FROM '.$joinTableName.' WHERE '.implode(' = ? AND ', $columns).' = ?';
416 416
     }
417 417
 
418 418
     /**
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
         $sourceClass       = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
604 604
         $targetClass       = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
605 605
 
606
-        if (! $owningAssociation->isOwningSide()) {
606
+        if ( ! $owningAssociation->isOwningSide()) {
607 607
             $owningAssociation  = $targetClass->getProperty($owningAssociation->getMappedBy());
608 608
             $joinTable          = $owningAssociation->getJoinTable();
609 609
             $joinColumns        = $joinTable->getJoinColumns();
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
         }
616 616
 
617 617
         $joinTableName   = $joinTable->getQuotedQualifiedName($this->platform);
618
-        $quotedJoinTable = $joinTableName . ' t';
618
+        $quotedJoinTable = $joinTableName.' t';
619 619
         $whereClauses    = [];
620 620
         $params          = [];
621 621
         $types           = [];
@@ -628,39 +628,39 @@  discard block
 block discarded – undo
628 628
                 $quotedColumnName           = $this->platform->quoteIdentifier($joinColumn->getColumnName());
629 629
                 $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName());
630 630
 
631
-                $joinConditions[] = ' t.' . $quotedColumnName . ' = ' . 'tr.' . $quotedReferencedColumnName;
631
+                $joinConditions[] = ' t.'.$quotedColumnName.' = '.'tr.'.$quotedReferencedColumnName;
632 632
             }
633 633
 
634 634
             $tableName        = $targetClass->table->getQuotedQualifiedName($this->platform);
635
-            $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions);
635
+            $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions);
636 636
             $columnName       = $targetClass->getProperty($indexBy)->getColumnName();
637 637
 
638
-            $whereClauses[] = 'tr.' . $this->platform->quoteIdentifier($columnName) . ' = ?';
638
+            $whereClauses[] = 'tr.'.$this->platform->quoteIdentifier($columnName).' = ?';
639 639
             $params[]       = $key;
640 640
             $types[]        = PersisterHelper::getTypeOfColumn($columnName, $targetClass, $this->em);
641 641
         }
642 642
 
643 643
         foreach ($inverseJoinColumns as $joinColumn) {
644
-            if (! $joinColumn->getType()) {
644
+            if ( ! $joinColumn->getType()) {
645 645
                 $joinColumn->setType(
646 646
                     PersisterHelper::getTypeOfColumn($joinColumn->getReferencedColumnName(), $sourceClass, $this->em)
647 647
                 );
648 648
             }
649 649
 
650
-            $whereClauses[] = 't.' . $this->platform->quoteIdentifier($joinColumn->getColumnName()) . ' = ?';
650
+            $whereClauses[] = 't.'.$this->platform->quoteIdentifier($joinColumn->getColumnName()).' = ?';
651 651
             $params[]       = $id[$sourceClass->fieldNames[$joinColumn->getReferencedColumnName()]];
652 652
             $types[]        = $joinColumn->getType();
653 653
         }
654 654
 
655 655
         if ( ! $joinNeeded) {
656 656
             foreach ($joinColumns as $joinColumn) {
657
-                if (! $joinColumn->getType()) {
657
+                if ( ! $joinColumn->getType()) {
658 658
                     $joinColumn->setType(
659 659
                         PersisterHelper::getTypeOfColumn($joinColumn->getReferencedColumnName(), $targetClass, $this->em)
660 660
                     );
661 661
                 }
662 662
 
663
-                $whereClauses[] = 't.' . $this->platform->quoteIdentifier($joinColumn->getColumnName()) . ' = ?';
663
+                $whereClauses[] = 't.'.$this->platform->quoteIdentifier($joinColumn->getColumnName()).' = ?';
664 664
                 $params[]       = $key;
665 665
                 $types[]        = $joinColumn->getType();
666 666
             }
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
             list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($association);
671 671
 
672 672
             if ($filterSql) {
673
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
673
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
674 674
                 $whereClauses[] = $filterSql;
675 675
             }
676 676
         }
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
         $association       = $collection->getMapping();
695 695
         $owningAssociation = $association;
696 696
 
697
-        if (! $association->isOwningSide()) {
697
+        if ( ! $association->isOwningSide()) {
698 698
             $sourceClass = $this->em->getClassMetadata($association->getTargetEntity());
699 699
             $targetClass = $this->em->getClassMetadata($association->getSourceEntity());
700 700
             $sourceId = $this->uow->getEntityIdentifier($element);
@@ -719,13 +719,13 @@  discard block
 block discarded – undo
719 719
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
720 720
             $referencedColumnName = $joinColumn->getReferencedColumnName();
721 721
 
722
-            if (! $joinColumn->getType()) {
722
+            if ( ! $joinColumn->getType()) {
723 723
                 $joinColumn->setType(
724 724
                     PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)
725 725
                 );
726 726
             }
727 727
 
728
-            $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?';
728
+            $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?';
729 729
             $params[]       = $sourceId[$sourceClass->fieldNames[$referencedColumnName]];
730 730
             $types[]        = $joinColumn->getType();
731 731
         }
@@ -734,13 +734,13 @@  discard block
 block discarded – undo
734 734
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
735 735
             $referencedColumnName = $joinColumn->getReferencedColumnName();
736 736
 
737
-            if (! $joinColumn->getType()) {
737
+            if ( ! $joinColumn->getType()) {
738 738
                 $joinColumn->setType(
739 739
                     PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)
740 740
                 );
741 741
             }
742 742
 
743
-            $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?';
743
+            $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?';
744 744
             $params[]       = $targetId[$targetClass->fieldNames[$referencedColumnName]];
745 745
             $types[]        = $joinColumn->getType();
746 746
         }
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
             list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($association);
752 752
 
753 753
             if ($filterSql) {
754
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
754
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
755 755
                 $whereClauses[] = $filterSql;
756 756
             }
757 757
         }
@@ -800,10 +800,10 @@  discard block
 block discarded – undo
800 800
                 $property   = $targetClass->getProperty($name);
801 801
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
802 802
 
803
-                $orderBy[] = $columnName . ' ' . $direction;
803
+                $orderBy[] = $columnName.' '.$direction;
804 804
             }
805 805
 
806
-            return ' ORDER BY ' . implode(', ', $orderBy);
806
+            return ' ORDER BY '.implode(', ', $orderBy);
807 807
         }
808 808
         return '';
809 809
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php 1 patch
Spacing   +15 added lines, -15 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
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         // the entire collection with a new would trigger this operation.
31 31
         $association = $collection->getMapping();
32 32
 
33
-        if (! $association->isOrphanRemoval()) {
33
+        if ( ! $association->isOrphanRemoval()) {
34 34
             // Handling non-orphan removal should never happen, as @OneToMany
35 35
             // can only be inverse side. For owning side one to many, it is
36 36
             // required to have a join table, which would classify as a ManyToManyPersister.
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $association = $collection->getMapping();
64 64
 
65
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
65
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
66 66
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
67 67
         }
68 68
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $association = $collection->getMapping();
113 113
 
114
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
114
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
115 115
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
116 116
         }
117 117
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         // only works with single id identifier entities. Will throw an
121 121
         // exception in Entity Persisters if that is not the case for the
122 122
         // 'mappedBy' field.
123
-        $criteria  = [
123
+        $criteria = [
124 124
             $association->getMappedBy()  => $collection->getOwner(),
125 125
             $association->getIndexedBy() => $key,
126 126
         ];
@@ -157,12 +157,12 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $association = $collection->getMapping();
159 159
 
160
-        if (! $association->isOrphanRemoval()) {
160
+        if ( ! $association->isOrphanRemoval()) {
161 161
             // no-op: this is not the owning side, therefore no operations should be applied
162 162
             return false;
163 163
         }
164 164
 
165
-        if (! $this->isValidEntityState($element)) {
165
+        if ( ! $this->isValidEntityState($element)) {
166 166
             return false;
167 167
         }
168 168
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         }
203 203
 
204 204
         $tableName = $targetClass->table->getQuotedQualifiedName($this->platform);
205
-        $statement = 'DELETE FROM ' . $tableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
205
+        $statement = 'DELETE FROM '.$tableName.' WHERE '.implode(' = ? AND ', $columns).' = ?';
206 206
 
207 207
         return $this->conn->executeUpdate($statement, $parameters);
208 208
     }
@@ -241,17 +241,17 @@  discard block
 block discarded – undo
241 241
             ];
242 242
         }
243 243
 
244
-        $statement = $this->platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable
245
-            . ' (' . $this->platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
244
+        $statement = $this->platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable
245
+            . ' ('.$this->platform->getColumnDeclarationListSQL($columnDefinitions).')';
246 246
 
247 247
         $this->conn->executeUpdate($statement);
248 248
 
249 249
         // 2) Build insert table records into temporary table
250
-        $dql   = ' SELECT t0.' . implode(', t0.', $rootClass->getIdentifierFieldNames())
251
-               . ' FROM ' . $targetClass->getClassName() . ' t0 WHERE t0.' . $association->getMappedBy() . ' = :owner';
250
+        $dql   = ' SELECT t0.'.implode(', t0.', $rootClass->getIdentifierFieldNames())
251
+               . ' FROM '.$targetClass->getClassName().' t0 WHERE t0.'.$association->getMappedBy().' = :owner';
252 252
         $query = $this->em->createQuery($dql)->setParameter('owner', $collection->getOwner());
253 253
 
254
-        $statement  = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ') ' . $query->getSQL();
254
+        $statement  = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.') '.$query->getSQL();
255 255
         $parameters = array_values($sourcePersister->getIdentifier($collection->getOwner()));
256 256
         $numDeleted = $this->conn->executeUpdate($statement, $parameters);
257 257
 
@@ -265,8 +265,8 @@  discard block
 block discarded – undo
265 265
         foreach (array_reverse($classNames) as $className) {
266 266
             $parentClass = $this->em->getClassMetadata($className);
267 267
             $tableName   = $parentClass->table->getQuotedQualifiedName($this->platform);
268
-            $statement   = 'DELETE FROM ' . $tableName . ' WHERE (' . $idColumnNameList . ')'
269
-                . ' IN (SELECT ' . $idColumnNameList . ' FROM ' . $tempTable . ')';
268
+            $statement   = 'DELETE FROM '.$tableName.' WHERE ('.$idColumnNameList.')'
269
+                . ' IN (SELECT '.$idColumnNameList.' FROM '.$tempTable.')';
270 270
 
271 271
             $this->conn->executeUpdate($statement);
272 272
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/AbstractCollectionPersister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/PersisterException.php 1 patch
Spacing   +2 added lines, -2 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;
6 6
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     static public function matchingAssocationFieldRequiresObject($class, $associationName)
18 18
     {
19 19
         return new self(sprintf(
20
-            "Cannot match on %s::%s with a non-object value. Matching objects by id is " .
20
+            "Cannot match on %s::%s with a non-object value. Matching objects by id is ".
21 21
             "not compatible with matching on an in-memory collection, which compares objects by reference.",
22 22
             $class, $associationName
23 23
         ));
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php 1 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
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
50 50
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
51 51
 
52
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform);
52
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform);
53 53
 
54 54
         // Append subclass columns
55 55
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                         $targetClass = $this->em->getClassMetadata($property->getTargetEntity());
71 71
 
72 72
                         foreach ($property->getJoinColumns() as $joinColumn) {
73
-                            if (! $joinColumn->getType()) {
73
+                            if ( ! $joinColumn->getType()) {
74 74
                                 $joinColumn->setType(
75 75
                                     PersisterHelper::getTypeOfColumn($joinColumn->getReferencedColumnName(), $targetClass, $this->em)
76 76
                                 );
@@ -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/Persisters/Entity/EntityPersister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.