Passed
Pull Request — master (#7782)
by Gabriel
06:00
created
lib/Doctrine/ORM/Cache/Region/FileLockRegion.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function __construct(Region $region, $directory, $lockLifetime)
54 54
     {
55
-        if (! is_dir($directory) && ! @mkdir($directory, 0775, true)) {
55
+        if ( ! is_dir($directory) && ! @mkdir($directory, 0775, true)) {
56 56
             throw new InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $directory));
57 57
         }
58 58
 
59
-        if (! is_writable($directory)) {
59
+        if ( ! is_writable($directory)) {
60 60
             throw new InvalidArgumentException(sprintf('The directory "%s" is not writable.', $directory));
61 61
         }
62 62
 
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $filename = $this->getLockFileName($key);
74 74
 
75
-        if (! is_file($filename)) {
75
+        if ( ! is_file($filename)) {
76 76
             return false;
77 77
         }
78 78
 
79 79
         $time    = $this->getLockTime($filename);
80 80
         $content = $this->getLockContent($filename);
81 81
 
82
-        if (! $content || ! $time) {
82
+        if ( ! $content || ! $time) {
83 83
             @unlink($filename);
84 84
 
85 85
             return false;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     private function getLockFileName(CacheKey $key)
106 106
     {
107
-        return $this->directory . DIRECTORY_SEPARATOR . $key->hash . '.' . self::LOCK_EXTENSION;
107
+        return $this->directory.DIRECTORY_SEPARATOR.$key->hash.'.'.self::LOCK_EXTENSION;
108 108
     }
109 109
 
110 110
     /**
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         $lock     = Lock::createLockRead();
226 226
         $filename = $this->getLockFileName($key);
227 227
 
228
-        if (! @file_put_contents($filename, $lock->value, LOCK_EX)) {
228
+        if ( ! @file_put_contents($filename, $lock->value, LOCK_EX)) {
229 229
             return null;
230 230
         }
231 231
         chmod($filename, 0664);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $association = $collection->getMapping();
39 39
 
40
-        if (! $association->isOwningSide()) {
40
+        if ( ! $association->isOwningSide()) {
41 41
             return; // ignore inverse side
42 42
         }
43 43
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             /** @var JoinColumnMetadata $joinColumn */
50 50
             $referencedColumnName = $joinColumn->getReferencedColumnName();
51 51
 
52
-            if (! $joinColumn->getType()) {
52
+            if ( ! $joinColumn->getType()) {
53 53
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
54 54
             }
55 55
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $association = $collection->getMapping();
71 71
 
72
-        if (! $association->isOwningSide()) {
72
+        if ( ! $association->isOwningSide()) {
73 73
             return; // ignore inverse side
74 74
         }
75 75
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     {
101 101
         $association = $collection->getMapping();
102 102
 
103
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
103
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
104 104
             throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.');
105 105
         }
106 106
 
@@ -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
 
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
         }*/
177 177
 
178 178
         $sql = 'SELECT COUNT(*)'
179
-            . ' FROM ' . $joinTableName . ' t'
179
+            . ' FROM '.$joinTableName.' t'
180 180
             . $joinTargetEntitySQL
181
-            . ' WHERE ' . implode(' AND ', $conditions);
181
+            . ' WHERE '.implode(' AND ', $conditions);
182 182
 
183 183
         return $this->conn->fetchColumn($sql, $params, 0, $types);
184 184
     }
@@ -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
         [$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
     }
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
      */
218 218
     public function contains(PersistentCollection $collection, $element)
219 219
     {
220
-        if (! $this->isValidEntityState($element)) {
220
+        if ( ! $this->isValidEntityState($element)) {
221 221
             return false;
222 222
         }
223 223
 
224 224
         [$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
     }
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function removeElement(PersistentCollection $collection, $element)
235 235
     {
236
-        if (! $this->isValidEntityState($element)) {
236
+        if ( ! $this->isValidEntityState($element)) {
237 237
             return false;
238 238
         }
239 239
 
240 240
         [$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);
@@ -336,8 +336,8 @@  discard block
 block discarded – undo
336 336
 
337 337
         // A join is needed if there is filtering on the target entity
338 338
         $tableName = $rootClass->table->getQuotedQualifiedName($this->platform);
339
-        $joinSql   = ' JOIN ' . $tableName . ' te'
340
-            . ' ON' . implode(' AND ', $this->getOnConditionSQL($association));
339
+        $joinSql   = ' JOIN '.$tableName.' te'
340
+            . ' ON'.implode(' AND ', $this->getOnConditionSQL($association));
341 341
 
342 342
         return [$joinSql, $filterSql];
343 343
     }
@@ -358,18 +358,18 @@  discard block
 block discarded – undo
358 358
             $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias);
359 359
 
360 360
             if ($filterExpr) {
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 isset($filterClauses[1])
372
-            ? '(' . $filterSql . ')'
372
+            ? '('.$filterSql.')'
373 373
             : $filterSql;
374 374
     }
375 375
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
             $quotedColumnName           = $this->platform->quoteIdentifier($joinColumn->getColumnName());
397 397
             $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName());
398 398
 
399
-            $conditions[] = ' t.' . $quotedColumnName . ' = te.' . $quotedReferencedColumnName;
399
+            $conditions[] = ' t.'.$quotedColumnName.' = te.'.$quotedReferencedColumnName;
400 400
         }
401 401
 
402 402
         return $conditions;
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
             $columns[] = $this->platform->quoteIdentifier($joinColumn->getColumnName());
419 419
         }
420 420
 
421
-        return 'DELETE FROM ' . $joinTableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
421
+        return 'DELETE FROM '.$joinTableName.' WHERE '.implode(' = ? AND ', $columns).' = ?';
422 422
     }
423 423
 
424 424
     /**
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
474 474
             $referencedColumnName = $joinColumn->getReferencedColumnName();
475 475
 
476
-            if (! $joinColumn->getType()) {
476
+            if ( ! $joinColumn->getType()) {
477 477
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
478 478
             }
479 479
 
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
487 487
             $referencedColumnName = $joinColumn->getReferencedColumnName();
488 488
 
489
-            if (! $joinColumn->getType()) {
489
+            if ( ! $joinColumn->getType()) {
490 490
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
491 491
             }
492 492
 
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
538 538
             $referencedColumnName = $joinColumn->getReferencedColumnName();
539 539
 
540
-            if (! $joinColumn->getType()) {
540
+            if ( ! $joinColumn->getType()) {
541 541
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
542 542
             }
543 543
 
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
551 551
             $referencedColumnName = $joinColumn->getReferencedColumnName();
552 552
 
553
-            if (! $joinColumn->getType()) {
553
+            if ( ! $joinColumn->getType()) {
554 554
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
555 555
             }
556 556
 
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
         $sourceClass       = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
635 635
         $targetClass       = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
636 636
 
637
-        if (! $owningAssociation->isOwningSide()) {
637
+        if ( ! $owningAssociation->isOwningSide()) {
638 638
             $owningAssociation  = $targetClass->getProperty($owningAssociation->getMappedBy());
639 639
             $joinTable          = $owningAssociation->getJoinTable();
640 640
             $joinColumns        = $joinTable->getJoinColumns();
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
         }
647 647
 
648 648
         $joinTableName   = $joinTable->getQuotedQualifiedName($this->platform);
649
-        $quotedJoinTable = $joinTableName . ' t';
649
+        $quotedJoinTable = $joinTableName.' t';
650 650
         $whereClauses    = [];
651 651
         $params          = [];
652 652
         $types           = [];
@@ -660,11 +660,11 @@  discard block
 block discarded – undo
660 660
                 $quotedColumnName           = $this->platform->quoteIdentifier($joinColumn->getColumnName());
661 661
                 $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName());
662 662
 
663
-                $joinConditions[] = ' t.' . $quotedColumnName . ' = tr.' . $quotedReferencedColumnName;
663
+                $joinConditions[] = ' t.'.$quotedColumnName.' = tr.'.$quotedReferencedColumnName;
664 664
             }
665 665
 
666 666
             $tableName        = $targetClass->table->getQuotedQualifiedName($this->platform);
667
-            $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions);
667
+            $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions);
668 668
             $indexByProperty  = $targetClass->getProperty($indexBy);
669 669
 
670 670
             switch (true) {
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
688 688
             $referencedColumnName = $joinColumn->getReferencedColumnName();
689 689
 
690
-            if (! $joinColumn->getType()) {
690
+            if ( ! $joinColumn->getType()) {
691 691
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em));
692 692
             }
693 693
 
@@ -696,13 +696,13 @@  discard block
 block discarded – undo
696 696
             $types[]        = $joinColumn->getType();
697 697
         }
698 698
 
699
-        if (! $joinNeeded) {
699
+        if ( ! $joinNeeded) {
700 700
             foreach ($joinColumns as $joinColumn) {
701 701
                 /** @var JoinColumnMetadata $joinColumn */
702 702
                 $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
703 703
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
704 704
 
705
-                if (! $joinColumn->getType()) {
705
+                if ( ! $joinColumn->getType()) {
706 706
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
707 707
                 }
708 708
 
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
             [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association);
717 717
 
718 718
             if ($filterSql) {
719
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
719
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
720 720
                 $whereClauses[]   = $filterSql;
721 721
             }
722 722
         }
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
         $association       = $collection->getMapping();
740 740
         $owningAssociation = $association;
741 741
 
742
-        if (! $association->isOwningSide()) {
742
+        if ( ! $association->isOwningSide()) {
743 743
             $sourceClass      = $this->em->getClassMetadata($association->getTargetEntity());
744 744
             $targetClass      = $this->em->getClassMetadata($association->getSourceEntity());
745 745
             $sourceIdentifier = $this->uow->getEntityIdentifier($element);
@@ -765,11 +765,11 @@  discard block
 block discarded – undo
765 765
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
766 766
             $referencedColumnName = $joinColumn->getReferencedColumnName();
767 767
 
768
-            if (! $joinColumn->getType()) {
768
+            if ( ! $joinColumn->getType()) {
769 769
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em));
770 770
             }
771 771
 
772
-            $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?';
772
+            $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?';
773 773
             $params[]       = $sourceIdentifier[$sourceClass->fieldNames[$referencedColumnName]];
774 774
             $types[]        = $joinColumn->getType();
775 775
         }
@@ -779,11 +779,11 @@  discard block
 block discarded – undo
779 779
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
780 780
             $referencedColumnName = $joinColumn->getReferencedColumnName();
781 781
 
782
-            if (! $joinColumn->getType()) {
782
+            if ( ! $joinColumn->getType()) {
783 783
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
784 784
             }
785 785
 
786
-            $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?';
786
+            $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?';
787 787
             $params[]       = $targetIdentifier[$targetClass->fieldNames[$referencedColumnName]];
788 788
             $types[]        = $joinColumn->getType();
789 789
         }
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
             [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association);
795 795
 
796 796
             if ($filterSql) {
797
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
797
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
798 798
                 $whereClauses[]   = $filterSql;
799 799
             }
800 800
         }
@@ -839,10 +839,10 @@  discard block
 block discarded – undo
839 839
                 $property   = $targetClass->getProperty($name);
840 840
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
841 841
 
842
-                $orderBy[] = $columnName . ' ' . $direction;
842
+                $orderBy[] = $columnName.' '.$direction;
843 843
             }
844 844
 
845
-            return ' ORDER BY ' . implode(', ', $orderBy);
845
+            return ' ORDER BY '.implode(', ', $orderBy);
846 846
         }
847 847
 
848 848
         return '';
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlValueVisitor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,11 +79,11 @@
 block discarded – undo
79 79
 
80 80
         switch ($comparison->getOperator()) {
81 81
             case Comparison::CONTAINS:
82
-                return '%' . $value . '%';
82
+                return '%'.$value.'%';
83 83
             case Comparison::STARTS_WITH:
84
-                return $value . '%';
84
+                return $value.'%';
85 85
             case Comparison::ENDS_WITH:
86
-                return '%' . $value;
86
+                return '%'.$value;
87 87
             default:
88 88
                 return $value;
89 89
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/AssociationMetadataExporter.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -24,33 +24,33 @@
 block discarded – undo
24 24
         $cacheExporter    = new CacheMetadataExporter();
25 25
         $variableExporter = new VariableExporter();
26 26
         $indentation      = str_repeat(self::INDENTATION, $indentationLevel);
27
-        $objectReference  = $indentation . self::VARIABLE;
27
+        $objectReference  = $indentation.self::VARIABLE;
28 28
         $cascade          = $this->resolveCascade($value->getCascade());
29 29
         $lines            = [];
30 30
 
31
-        $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value);
31
+        $lines[] = $objectReference.' = '.$this->exportInstantiation($value);
32 32
 
33
-        if (! empty($value->getCache())) {
33
+        if ( ! empty($value->getCache())) {
34 34
             $lines[] = $cacheExporter->export($value->getCache(), $indentationLevel);
35 35
             $lines[] = null;
36
-            $lines[] = $objectReference . '->setCache(' . $cacheExporter::VARIABLE . ');';
36
+            $lines[] = $objectReference.'->setCache('.$cacheExporter::VARIABLE.');';
37 37
         }
38 38
 
39
-        if (! empty($value->getMappedBy())) {
40
-            $lines[] = $objectReference . '->setMappedBy("' . $value->getMappedBy() . '");';
41
-            $lines[] = $objectReference . '->setOwningSide(false);';
39
+        if ( ! empty($value->getMappedBy())) {
40
+            $lines[] = $objectReference.'->setMappedBy("'.$value->getMappedBy().'");';
41
+            $lines[] = $objectReference.'->setOwningSide(false);';
42 42
         }
43 43
 
44
-        if (! empty($value->getInversedBy())) {
45
-            $lines[] = $objectReference . '->setInversedBy("' . $value->getInversedBy() . '");';
44
+        if ( ! empty($value->getInversedBy())) {
45
+            $lines[] = $objectReference.'->setInversedBy("'.$value->getInversedBy().'");';
46 46
         }
47 47
 
48
-        $lines[] = $objectReference . '->setSourceEntity("' . $value->getSourceEntity() . '");';
49
-        $lines[] = $objectReference . '->setTargetEntity("' . $value->getTargetEntity() . '");';
50
-        $lines[] = $objectReference . '->setFetchMode(Mapping\FetchMode::' . strtoupper($value->getFetchMode()) . '");';
51
-        $lines[] = $objectReference . '->setCascade(' . $variableExporter->export($cascade, $indentationLevel + 1) . ');';
52
-        $lines[] = $objectReference . '->setOrphanRemoval(' . $variableExporter->export($value->isOrphanRemoval(), $indentationLevel + 1) . ');';
53
-        $lines[] = $objectReference . '->setPrimaryKey(' . $variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1) . ');';
48
+        $lines[] = $objectReference.'->setSourceEntity("'.$value->getSourceEntity().'");';
49
+        $lines[] = $objectReference.'->setTargetEntity("'.$value->getTargetEntity().'");';
50
+        $lines[] = $objectReference.'->setFetchMode(Mapping\FetchMode::'.strtoupper($value->getFetchMode()).'");';
51
+        $lines[] = $objectReference.'->setCascade('.$variableExporter->export($cascade, $indentationLevel + 1).');';
52
+        $lines[] = $objectReference.'->setOrphanRemoval('.$variableExporter->export($value->isOrphanRemoval(), $indentationLevel + 1).');';
53
+        $lines[] = $objectReference.'->setPrimaryKey('.$variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1).');';
54 54
 
55 55
         return implode(PHP_EOL, $lines);
56 56
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/TableMetadataExporter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,24 +23,24 @@
 block discarded – undo
23 23
         /** @var TableMetadata $value */
24 24
         $variableExporter = new VariableExporter();
25 25
         $indentation      = str_repeat(self::INDENTATION, $indentationLevel);
26
-        $objectReference  = $indentation . self::VARIABLE;
26
+        $objectReference  = $indentation.self::VARIABLE;
27 27
         $lines            = [];
28 28
 
29
-        $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value);
29
+        $lines[] = $objectReference.' = '.$this->exportInstantiation($value);
30 30
 
31
-        if (! empty($value->getSchema())) {
32
-            $lines[] = $objectReference . '->setSchema("' . $value->getSchema() . '");';
31
+        if ( ! empty($value->getSchema())) {
32
+            $lines[] = $objectReference.'->setSchema("'.$value->getSchema().'");';
33 33
         }
34 34
 
35 35
         foreach ($value->getIndexes() as $index) {
36
-            $lines[] = $objectReference . '->addIndex(' . ltrim($variableExporter->export($index, $indentationLevel + 1)) . ');';
36
+            $lines[] = $objectReference.'->addIndex('.ltrim($variableExporter->export($index, $indentationLevel + 1)).');';
37 37
         }
38 38
 
39 39
         foreach ($value->getUniqueConstraints() as $uniqueConstraint) {
40
-            $lines[] = $objectReference . '->addUniqueConstraint(' . ltrim($variableExporter->export($uniqueConstraint, $indentationLevel + 1)) . ');';
40
+            $lines[] = $objectReference.'->addUniqueConstraint('.ltrim($variableExporter->export($uniqueConstraint, $indentationLevel + 1)).');';
41 41
         }
42 42
 
43
-        $lines[] = $objectReference . '->setOptions(' . ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)) . ');';
43
+        $lines[] = $objectReference.'->setOptions('.ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)).');';
44 44
 
45 45
         return implode(PHP_EOL, $lines);
46 46
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/JoinTableMetadataExporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,19 +24,19 @@
 block discarded – undo
24 24
         /** @var JoinTableMetadata $value */
25 25
         $joinColumnExporter = new JoinColumnMetadataExporter();
26 26
         $indentation        = str_repeat(self::INDENTATION, $indentationLevel);
27
-        $objectReference    = $indentation . self::VARIABLE;
27
+        $objectReference    = $indentation.self::VARIABLE;
28 28
         $lines              = [];
29 29
 
30 30
         $lines[] = parent::export($value, $indentationLevel);
31 31
 
32 32
         foreach ($value->getJoinColumns() as $joinColumn) {
33 33
             $lines[] = $joinColumnExporter->export($joinColumn, $indentationLevel);
34
-            $lines[] = $objectReference . '->addJoinColumn(' . $joinColumnExporter::VARIABLE . ');';
34
+            $lines[] = $objectReference.'->addJoinColumn('.$joinColumnExporter::VARIABLE.');';
35 35
         }
36 36
 
37 37
         foreach ($value->getInverseJoinColumns() as $inverseJoinColumn) {
38 38
             $lines[] = $joinColumnExporter->export($inverseJoinColumn, $indentationLevel);
39
-            $lines[] = $objectReference . '->addInverseJoinColumn(' . $joinColumnExporter::VARIABLE . ');';
39
+            $lines[] = $objectReference.'->addInverseJoinColumn('.$joinColumnExporter::VARIABLE.');';
40 40
         }
41 41
 
42 42
         return implode(PHP_EOL, $lines);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/JoinColumnMetadataExporter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@
 block discarded – undo
23 23
     {
24 24
         /** @var JoinColumnMetadata $value */
25 25
         $indentation     = str_repeat(self::INDENTATION, $indentationLevel);
26
-        $objectReference = $indentation . self::VARIABLE;
26
+        $objectReference = $indentation.self::VARIABLE;
27 27
         $lines           = [];
28 28
 
29 29
         $lines[] = parent::export($value, $indentationLevel);
30
-        $lines[] = $objectReference . '->setReferencedColumnName("' . $value->getReferencedColumnName() . '");';
31
-        $lines[] = $objectReference . '->setAliasedName("' . $value->getAliasedName() . '");';
32
-        $lines[] = $objectReference . '->setOnDelete("' . $value->getOnDelete() . '");';
30
+        $lines[] = $objectReference.'->setReferencedColumnName("'.$value->getReferencedColumnName().'");';
31
+        $lines[] = $objectReference.'->setAliasedName("'.$value->getAliasedName().'");';
32
+        $lines[] = $objectReference.'->setOnDelete("'.$value->getOnDelete().'");';
33 33
 
34 34
         return implode(PHP_EOL, $lines);
35 35
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/ToOneAssociationMetadataExporter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         /** @var ToOneAssociationMetadata $value */
20 20
         $joinColumnExporter = new JoinColumnMetadataExporter();
21 21
         $indentation        = str_repeat(self::INDENTATION, $indentationLevel);
22
-        $objectReference    = $indentation . self::VARIABLE;
22
+        $objectReference    = $indentation.self::VARIABLE;
23 23
         $lines              = [];
24 24
 
25 25
         $lines[] = parent::export($value, $indentationLevel);
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             $lines[] = null;
29 29
             $lines[] = $joinColumnExporter->export($joinColumn, $indentationLevel);
30 30
             $lines[] = null;
31
-            $lines[] = $objectReference . '->addJoinColumn(' . $joinColumnExporter::VARIABLE . ');';
31
+            $lines[] = $objectReference.'->addJoinColumn('.$joinColumnExporter::VARIABLE.');';
32 32
         }
33 33
 
34 34
         return implode(PHP_EOL, $lines);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/LocalColumnMetadataExporter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,18 +20,18 @@
 block discarded – undo
20 20
     {
21 21
         /** @var LocalColumnMetadata $value */
22 22
         $indentation     = str_repeat(self::INDENTATION, $indentationLevel);
23
-        $objectReference = $indentation . self::VARIABLE;
23
+        $objectReference = $indentation.self::VARIABLE;
24 24
         $lines           = [];
25 25
 
26 26
         $lines[] = parent::export($value, $indentationLevel);
27 27
 
28
-        $lines[] = $objectReference . '->setLength(' . $value->getLength() . ');';
29
-        $lines[] = $objectReference . '->setScale(' . $value->getScale() . ');';
30
-        $lines[] = $objectReference . '->setPrecision(' . $value->getPrecision() . ');';
28
+        $lines[] = $objectReference.'->setLength('.$value->getLength().');';
29
+        $lines[] = $objectReference.'->setScale('.$value->getScale().');';
30
+        $lines[] = $objectReference.'->setPrecision('.$value->getPrecision().');';
31 31
 
32 32
         if ($value->hasValueGenerator()) {
33 33
             $lines[] = sprintf(
34
-                $objectReference . '->setValueGenerator(new ValueGenerator(%s, %s));',
34
+                $objectReference.'->setValueGenerator(new ValueGenerator(%s, %s));',
35 35
                 var_export($value->getValueGenerator()->getType(), true),
36 36
                 var_export($value->getValueGenerator()->getDefinition(), true)
37 37
             );
Please login to merge, or discard this patch.