Completed
Pull Request — 2.6 (#8015)
by
unknown
06:46
created
tests/Doctrine/Tests/ORM/PersistentCollectionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             ->expects(self::once())
169 169
             ->method('loadCollection')
170 170
             ->with($this->collection)
171
-            ->willReturnCallback(function (PersistentCollection $persistentCollection) use ($persistedElement) : void {
171
+            ->willReturnCallback(function(PersistentCollection $persistentCollection) use ($persistedElement) : void {
172 172
                 $persistentCollection->unwrap()->add($persistedElement);
173 173
             });
174 174
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             ->expects(self::once())
206 206
             ->method('loadCollection')
207 207
             ->with($this->collection)
208
-            ->willReturnCallback(function (PersistentCollection $persistentCollection) use (
208
+            ->willReturnCallback(function(PersistentCollection $persistentCollection) use (
209 209
                 $persistedElement,
210 210
                 $newElementThatIsAlsoPersisted
211 211
             ) : void {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             ->expects(self::once())
248 248
             ->method('loadCollection')
249 249
             ->with($this->collection)
250
-            ->willReturnCallback(function (PersistentCollection $persistentCollection) use (
250
+            ->willReturnCallback(function(PersistentCollection $persistentCollection) use (
251 251
                 $persistedElement,
252 252
                 $newElementThatIsAlsoPersisted
253 253
             ) : void {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@
 block discarded – undo
253 253
     private function processEntityListenerConfig(array $array, array $entityListenerConfig, string $event) : array
254 254
     {
255 255
         foreach ($entityListenerConfig as $entityListener) {
256
-            if (! isset($array['entityListeners'][$entityListener['class']])) {
256
+            if ( ! isset($array['entityListeners'][$entityListener['class']])) {
257 257
                 $array['entityListeners'][$entityListener['class']] = [];
258 258
             }
259 259
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -51,27 +51,27 @@  discard block
 block discarded – undo
51 51
         }
52 52
 
53 53
         if ($metadata->inheritanceType) {
54
-            $lines[] = '$metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_' . $this->_getInheritanceTypeString($metadata->inheritanceType) . ');';
54
+            $lines[] = '$metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_'.$this->_getInheritanceTypeString($metadata->inheritanceType).');';
55 55
         }
56 56
 
57 57
         if ($metadata->customRepositoryClassName) {
58
-            $lines[] = "\$metadata->customRepositoryClassName = '" . $metadata->customRepositoryClassName . "';";
58
+            $lines[] = "\$metadata->customRepositoryClassName = '".$metadata->customRepositoryClassName."';";
59 59
         }
60 60
 
61 61
         if ($metadata->table) {
62
-            $lines[] = '$metadata->setPrimaryTable(' . $this->_varExport($metadata->table) . ');';
62
+            $lines[] = '$metadata->setPrimaryTable('.$this->_varExport($metadata->table).');';
63 63
         }
64 64
 
65 65
         if ($metadata->discriminatorColumn) {
66
-            $lines[] = '$metadata->setDiscriminatorColumn(' . $this->_varExport($metadata->discriminatorColumn) . ');';
66
+            $lines[] = '$metadata->setDiscriminatorColumn('.$this->_varExport($metadata->discriminatorColumn).');';
67 67
         }
68 68
 
69 69
         if ($metadata->discriminatorMap) {
70
-            $lines[] = '$metadata->setDiscriminatorMap(' . $this->_varExport($metadata->discriminatorMap) . ');';
70
+            $lines[] = '$metadata->setDiscriminatorMap('.$this->_varExport($metadata->discriminatorMap).');';
71 71
         }
72 72
 
73 73
         if ($metadata->changeTrackingPolicy) {
74
-            $lines[] = '$metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_' . $this->_getChangeTrackingPolicyString($metadata->changeTrackingPolicy) . ');';
74
+            $lines[] = '$metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_'.$this->_getChangeTrackingPolicyString($metadata->changeTrackingPolicy).');';
75 75
         }
76 76
 
77 77
         if ($metadata->lifecycleCallbacks) {
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
         $lines = array_merge($lines, $this->processEntityListeners($metadata));
86 86
 
87 87
         foreach ($metadata->fieldMappings as $fieldMapping) {
88
-            $lines[] = '$metadata->mapField(' . $this->_varExport($fieldMapping) . ');';
88
+            $lines[] = '$metadata->mapField('.$this->_varExport($fieldMapping).');';
89 89
         }
90 90
 
91 91
         if ( ! $metadata->isIdentifierComposite && $generatorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
92
-            $lines[] = '$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_' . $generatorType . ');';
92
+            $lines[] = '$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_'.$generatorType.');';
93 93
         }
94 94
 
95 95
         foreach ($metadata->associationMappings as $associationMapping) {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                 $associationMappingArray = array_merge($associationMappingArray, $manyToManyMappingArray);
156 156
             }
157 157
 
158
-            $lines[] = '$metadata->' . $method . '(' . $this->_varExport($associationMappingArray) . ');';
158
+            $lines[] = '$metadata->'.$method.'('.$this->_varExport($associationMappingArray).');';
159 159
         }
160 160
 
161 161
         return implode("\n", $lines);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     protected function _varExport($var)
170 170
     {
171 171
         $export = var_export($var, true);
172
-        $export = str_replace("\n", PHP_EOL . str_repeat(' ', 8), $export);
172
+        $export = str_replace("\n", PHP_EOL.str_repeat(' ', 8), $export);
173 173
         $export = str_replace('  ', ' ', $export);
174 174
         $export = str_replace('array (', 'array(', $export);
175 175
         $export = str_replace('array( ', 'array(', $export);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         // Evaluate named native queries
110 110
         if (isset($element['namedNativeQueries'])) {
111 111
             foreach ($element['namedNativeQueries'] as $name => $mappingElement) {
112
-                if (!isset($mappingElement['name'])) {
112
+                if ( ! isset($mappingElement['name'])) {
113 113
                     $mappingElement['name'] = $name;
114 114
                 }
115 115
                 $metadata->addNamedNativeQuery(
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         // Evaluate sql result set mappings
127 127
         if (isset($element['sqlResultSetMappings'])) {
128 128
             foreach ($element['sqlResultSetMappings'] as $name => $resultSetMapping) {
129
-                if (!isset($resultSetMapping['name'])) {
129
+                if ( ! isset($resultSetMapping['name'])) {
130 130
                     $resultSetMapping['name'] = $name;
131 131
                 }
132 132
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         }
174 174
 
175 175
         if (isset($element['inheritanceType'])) {
176
-            $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType'])));
176
+            $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.strtoupper($element['inheritanceType'])));
177 177
 
178 178
             if ($metadata->inheritanceType != Metadata::INHERITANCE_TYPE_NONE) {
179 179
                 // Evaluate discriminatorColumn
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
                 }
363 363
 
364 364
                 if (isset($oneToOneElement['fetch'])) {
365
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToOneElement['fetch']);
365
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$oneToOneElement['fetch']);
366 366
                 }
367 367
 
368 368
                 if (isset($oneToOneElement['mappedBy'])) {
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
                 ];
417 417
 
418 418
                 if (isset($oneToManyElement['fetch'])) {
419
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToManyElement['fetch']);
419
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$oneToManyElement['fetch']);
420 420
                 }
421 421
 
422 422
                 if (isset($oneToManyElement['cascade'])) {
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
                 }
459 459
 
460 460
                 if (isset($manyToOneElement['fetch'])) {
461
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToOneElement['fetch']);
461
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$manyToOneElement['fetch']);
462 462
                 }
463 463
 
464 464
                 if (isset($manyToOneElement['inversedBy'])) {
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
                 ];
504 504
 
505 505
                 if (isset($manyToManyElement['fetch'])) {
506
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToManyElement['fetch']);
506
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$manyToManyElement['fetch']);
507 507
                 }
508 508
 
509 509
                 if (isset($manyToManyElement['mappedBy'])) {
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
         if (isset($element['associationOverride']) && is_array($element['associationOverride'])) {
574 574
 
575 575
             foreach ($element['associationOverride'] as $fieldName => $associationOverrideElement) {
576
-                $override   = [];
576
+                $override = [];
577 577
 
578 578
                 // Check for joinColumn
579 579
                 if (isset($associationOverrideElement['joinColumn'])) {
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
                 if (isset($associationOverrideElement['joinTable'])) {
592 592
 
593 593
                     $joinTableElement   = $associationOverrideElement['joinTable'];
594
-                    $joinTable          =  [
594
+                    $joinTable          = [
595 595
                         'name' => $joinTableElement['name']
596 596
                     ];
597 597
 
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
 
626 626
                 // Check for `fetch`
627 627
                 if (isset($associationOverrideElement['fetch'])) {
628
-                    $override['fetch'] = constant(Metadata::class . '::FETCH_' . $associationOverrideElement['fetch']);
628
+                    $override['fetch'] = constant(Metadata::class.'::FETCH_'.$associationOverrideElement['fetch']);
629 629
                 }
630 630
 
631 631
                 $metadata->setAssociationOverride($fieldName, $override);
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
         if (isset($element['lifecycleCallbacks'])) {
646 646
             foreach ($element['lifecycleCallbacks'] as $type => $methods) {
647 647
                 foreach ($methods as $method) {
648
-                    $metadata->addLifecycleCallback($method, constant('Doctrine\ORM\Events::' . $type));
648
+                    $metadata->addLifecycleCallback($method, constant('Doctrine\ORM\Events::'.$type));
649 649
                 }
650 650
             }
651 651
         }
@@ -787,12 +787,12 @@  discard block
 block discarded – undo
787 787
         $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null;
788 788
         $usage  = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null;
789 789
 
790
-        if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) {
790
+        if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) {
791 791
             throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage));
792 792
         }
793 793
 
794 794
         if ($usage) {
795
-            $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage);
795
+            $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage);
796 796
         }
797 797
 
798 798
         return [
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
         $sqlIdentifier = $this->getSQLIdentifier($AST);
209 209
 
210 210
         if ($hasOrderBy) {
211
-            $orderGroupBy = ' GROUP BY ' . implode(', ', $sqlIdentifier);
212
-            $sqlIdentifier[] = 'MIN(' . $this->walkResultVariable('dctrn_rownum') . ') AS dctrn_minrownum';
211
+            $orderGroupBy = ' GROUP BY '.implode(', ', $sqlIdentifier);
212
+            $sqlIdentifier[] = 'MIN('.$this->walkResultVariable('dctrn_rownum').') AS dctrn_minrownum';
213 213
         }
214 214
 
215 215
         // Build the counter query
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         );
221 221
 
222 222
         if ($hasOrderBy) {
223
-            $sql .= $orderGroupBy . $outerOrderBy;
223
+            $sql .= $orderGroupBy.$outerOrderBy;
224 224
         }
225 225
 
226 226
         // Apply the limit and offset.
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
         foreach ($orderByPathExpressions as $pathExpression) {
324 324
             $idVar = $pathExpression->identificationVariable;
325 325
             $field = $pathExpression->field;
326
-            if (!isset($selects[$idVar])) {
326
+            if ( ! isset($selects[$idVar])) {
327 327
                 $selects[$idVar] = [];
328 328
             }
329 329
             $selects[$idVar][$field] = true;
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         foreach ($AST->selectClause->selectExpressions as $selectExpression) {
335 335
             if ($selectExpression instanceof SelectExpression) {
336 336
                 $idVar = $selectExpression->expression;
337
-                if (!is_string($idVar)) {
337
+                if ( ! is_string($idVar)) {
338 338
                     continue;
339 339
                 }
340 340
                 $field = $selectExpression->fieldIdentificationVariable;
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         ?OrderByClause $orderByClause
371 371
     ) : string {
372 372
         // If the sql statement has an order by clause, we need to wrap it in a new select distinct statement
373
-        if (! $orderByClause) {
373
+        if ( ! $orderByClause) {
374 374
             return $sql;
375 375
         }
376 376
 
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
             $orderByItems[] = $orderByItemString;
413 413
             $identifier     = \substr($orderByItemString, 0, \strrpos($orderByItemString, ' '));
414 414
 
415
-            if (! \in_array($identifier, $identifiers, true)) {
415
+            if ( ! \in_array($identifier, $identifiers, true)) {
416 416
                 $identifiers[] = $identifier;
417 417
             }
418 418
         }
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
             $class = $metadataList[$dqlAliasForFieldAlias];
445 445
 
446 446
             // If the field is from a joined child table, we won't be ordering on it.
447
-            if (! isset($class->fieldMappings[$fieldName])) {
447
+            if ( ! isset($class->fieldMappings[$fieldName])) {
448 448
                 continue;
449 449
             }
450 450
 
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                 // for the joined parent table.
466 466
                 $otherClassMetadata = $this->em->getClassMetadata($fieldMapping['declared']);
467 467
 
468
-                if (! $otherClassMetadata->isMappedSuperclass) {
468
+                if ( ! $otherClassMetadata->isMappedSuperclass) {
469 469
                     $sqlTableAliasForFieldAlias = $this->getSQLTableAlias($otherClassMetadata->getTableName(), $dqlAliasForFieldAlias);
470 470
                 }
471 471
             }
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
      */
583 583
     public function walkPathExpression($pathExpr)
584 584
     {
585
-        if (!$this->inSubSelect && !$this->platformSupportsRowNumber() && !in_array($pathExpr, $this->orderByPathExpressions)) {
585
+        if ( ! $this->inSubSelect && ! $this->platformSupportsRowNumber() && ! in_array($pathExpr, $this->orderByPathExpressions)) {
586 586
             $this->orderByPathExpressions[] = $pathExpr;
587 587
         }
588 588
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/ORMInvalidArgumentException.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
 
84 84
     /**
85 85
      * @param array[][]|object[][] $newEntitiesWithAssociations non-empty an array
86
- *                                                              of [array $associationMapping, object $entity] pairs
86
+     *                                                              of [array $associationMapping, object $entity] pairs
87 87
      *
88 88
      * @return ORMInvalidArgumentException
89 89
      */
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     static public function scheduleInsertForManagedEntity($entity)
36 36
     {
37
-        return new self("A managed+dirty entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
37
+        return new self("A managed+dirty entity ".self::objToStr($entity)." can not be scheduled for insertion.");
38 38
     }
39 39
 
40 40
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     static public function scheduleInsertForRemovedEntity($entity)
46 46
     {
47
-        return new self("Removed entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
47
+        return new self("Removed entity ".self::objToStr($entity)." can not be scheduled for insertion.");
48 48
     }
49 49
 
50 50
     /**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     static public function scheduleInsertTwice($entity)
56 56
     {
57
-        return new self("Entity " . self::objToStr($entity) . " can not be scheduled for insertion twice.");
57
+        return new self("Entity ".self::objToStr($entity)." can not be scheduled for insertion twice.");
58 58
     }
59 59
 
60 60
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     static public function entityWithoutIdentity($className, $entity)
67 67
     {
68 68
         return new self(
69
-            "The given entity of type '" . $className . "' (".self::objToStr($entity).") has no identity/no " .
69
+            "The given entity of type '".$className."' (".self::objToStr($entity).") has no identity/no ".
70 70
             "id values set. It cannot be added to the identity map."
71 71
         );
72 72
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     static public function readOnlyRequiresManagedEntity($entity)
80 80
     {
81
-        return new self("Only managed entities can be marked or checked as read only. But " . self::objToStr($entity) . " is not");
81
+        return new self("Only managed entities can be marked or checked as read only. But ".self::objToStr($entity)." is not");
82 82
     }
83 83
 
84 84
     /**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     static public function newEntitiesFoundThroughRelationships($newEntitiesWithAssociations)
91 91
     {
92 92
         $errorMessages = array_map(
93
-            function (array $newEntityWithAssociation) : string {
93
+            function(array $newEntityWithAssociation) : string {
94 94
                 [$associationMapping, $entity] = $newEntityWithAssociation;
95 95
 
96 96
                 return self::newEntityFoundThroughRelationshipMessage($associationMapping, $entity);
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
      */
129 129
     static public function detachedEntityFoundThroughRelationship(array $assoc, $entry)
130 130
     {
131
-        return new self("A detached entity of type " . $assoc['targetEntity'] . " (" . self::objToStr($entry) . ") "
132
-            . " was found through the relationship '" . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' "
131
+        return new self("A detached entity of type ".$assoc['targetEntity']." (".self::objToStr($entry).") "
132
+            . " was found through the relationship '".$assoc['sourceEntity']."#".$assoc['fieldName']."' "
133 133
             . "during cascading a persist operation.");
134 134
     }
135 135
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      */
141 141
     static public function entityNotManaged($entity)
142 142
     {
143
-        return new self("Entity " . self::objToStr($entity) . " is not managed. An entity is managed if its fetched " .
143
+        return new self("Entity ".self::objToStr($entity)." is not managed. An entity is managed if its fetched ".
144 144
             "from the database or registered as new through EntityManager#persist");
145 145
     }
146 146
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     static public function entityHasNoIdentity($entity, $operation)
154 154
     {
155
-        return new self("Entity has no identity, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
155
+        return new self("Entity has no identity, therefore ".$operation." cannot be performed. ".self::objToStr($entity));
156 156
     }
157 157
 
158 158
     /**
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     static public function entityIsRemoved($entity, $operation)
165 165
     {
166
-        return new self("Entity is removed, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
166
+        return new self("Entity is removed, therefore ".$operation." cannot be performed. ".self::objToStr($entity));
167 167
     }
168 168
 
169 169
     /**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     static public function detachedEntityCannot($entity, $operation)
176 176
     {
177
-        return new self("Detached entity " . self::objToStr($entity) . " cannot be " . $operation);
177
+        return new self("Detached entity ".self::objToStr($entity)." cannot be ".$operation);
178 178
     }
179 179
 
180 180
     /**
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
      */
187 187
     public static function invalidObject($context, $given, $parameterIndex = 1)
188 188
     {
189
-        return new self($context . ' expects parameter ' . $parameterIndex .
190
-            ' to be an entity object, '. gettype($given) . ' given.');
189
+        return new self($context.' expects parameter '.$parameterIndex.
190
+            ' to be an entity object, '.gettype($given).' given.');
191 191
     }
192 192
 
193 193
     /**
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      */
196 196
     public static function invalidCompositeIdentifier()
197 197
     {
198
-        return new self("Binding an entity with a composite primary key to a query is not supported. " .
198
+        return new self("Binding an entity with a composite primary key to a query is not supported. ".
199 199
             "You should split the parameter into the explicit fields and bind them separately.");
200 200
     }
201 201
 
@@ -262,15 +262,15 @@  discard block
 block discarded – undo
262 262
     private static function newEntityFoundThroughRelationshipMessage(array $associationMapping, $entity) : string
263 263
     {
264 264
         return 'A new entity was found through the relationship \''
265
-            . $associationMapping['sourceEntity'] . '#' . $associationMapping['fieldName'] . '\' that was not'
266
-            . ' configured to cascade persist operations for entity: ' . self::objToStr($entity) . '.'
265
+            . $associationMapping['sourceEntity'].'#'.$associationMapping['fieldName'].'\' that was not'
266
+            . ' configured to cascade persist operations for entity: '.self::objToStr($entity).'.'
267 267
             . ' To solve this issue: Either explicitly call EntityManager#persist()'
268 268
             . ' on this unknown entity or configure cascade persist'
269 269
             . ' this association in the mapping for example @ManyToOne(..,cascade={"persist"}).'
270 270
             . (method_exists($entity, '__toString')
271 271
                 ? ''
272 272
                 : ' If you cannot find out which entity causes the problem implement \''
273
-                . $associationMapping['targetEntity'] . '#__toString()\' to get a clue.'
273
+                . $associationMapping['targetEntity'].'#__toString()\' to get a clue.'
274 274
             );
275 275
     }
276 276
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/ORMInvalidArgumentExceptionTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
             'fieldName'    => 'bar1',
82 82
             'targetEntity' => 'baz1',
83 83
         ];
84
-        $association2  = [
84
+        $association2 = [
85 85
             'sourceEntity' => 'foo2',
86 86
             'fieldName'    => 'bar2',
87 87
             'targetEntity' => 'baz2',
88 88
         ];
89
-        $association3  = [
89
+        $association3 = [
90 90
             'sourceEntity' => 'foo3',
91 91
             'fieldName'    => 'bar3',
92 92
             'targetEntity' => 'baz3',
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                     ],
104 104
                 ],
105 105
                 'A new entity was found through the relationship \'foo1#bar1\' that was not configured to cascade '
106
-                . 'persist operations for entity: stdClass@' . spl_object_hash($entity1)
106
+                . 'persist operations for entity: stdClass@'.spl_object_hash($entity1)
107 107
                 . '. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity '
108 108
                 . 'or configure cascade persist this association in the mapping for example '
109 109
                 . '@ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem '
@@ -120,15 +120,15 @@  discard block
 block discarded – undo
120 120
                         $entity2,
121 121
                     ],
122 122
                 ],
123
-                'Multiple non-persisted new entities were found through the given association graph:' . "\n\n"
123
+                'Multiple non-persisted new entities were found through the given association graph:'."\n\n"
124 124
                 . ' * A new entity was found through the relationship \'foo1#bar1\' that was not configured to '
125
-                . 'cascade persist operations for entity: stdClass@' . spl_object_hash($entity1) . '. '
125
+                . 'cascade persist operations for entity: stdClass@'.spl_object_hash($entity1).'. '
126 126
                 . 'To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity '
127 127
                 . 'or configure cascade persist this association in the mapping for example '
128 128
                 . '@ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem '
129
-                . 'implement \'baz1#__toString()\' to get a clue.' . "\n"
129
+                . 'implement \'baz1#__toString()\' to get a clue.'."\n"
130 130
                 . ' * A new entity was found through the relationship \'foo2#bar2\' that was not configured to '
131
-                . 'cascade persist operations for entity: stdClass@' . spl_object_hash($entity2) . '. To solve '
131
+                . 'cascade persist operations for entity: stdClass@'.spl_object_hash($entity2).'. To solve '
132 132
                 . 'this issue: Either explicitly call EntityManager#persist() on this unknown entity or '
133 133
                 . 'configure cascade persist this association in the mapping for example '
134 134
                 . '@ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem '
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     ],
143 143
                 ],
144 144
                 'A new entity was found through the relationship \'foo3#bar3\' that was not configured to cascade '
145
-                . 'persist operations for entity: ' . $stringEntity3
145
+                . 'persist operations for entity: '.$stringEntity3
146 146
                 . '. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity '
147 147
                 . 'or configure cascade persist this association in the mapping for example '
148 148
                 . '@ManyToOne(..,cascade={"persist"}).',
Please login to merge, or discard this patch.
tests/Doctrine/Performance/Hydration/SimpleInsertPerformanceBench.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
         for ($i = 1; $i <= 10000; ++$i) {
44 44
             $user           = new CMS\CmsUser;
45 45
             $user->status   = 'user';
46
-            $user->username = 'user' . $i;
47
-            $user->name     = 'Mr.Smith-' . $i;
46
+            $user->username = 'user'.$i;
47
+            $user->name     = 'Mr.Smith-'.$i;
48 48
 
49 49
             $this->users[$i] = $user;
50 50
         }
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
         // Yes, this is a lot of overhead, but I have no better solution other than
58 58
         // completely mocking out the DB, which would be silly (query impact is
59 59
         // necessarily part of our benchmarks)
60
-        $this->entityManager->getConnection()->executeQuery('DELETE FROM ' . $this->tableName)->execute();
60
+        $this->entityManager->getConnection()->executeQuery('DELETE FROM '.$this->tableName)->execute();
61 61
 
62 62
         foreach ($this->users as $key => $user) {
63 63
             $this->entityManager->persist($user);
64 64
 
65
-            if (! ($key % 20)) {
65
+            if ( ! ($key % 20)) {
66 66
                 $this->entityManager->flush();
67 67
                 $this->entityManager->clear();
68 68
             }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/ToolsException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 {
32 32
     public static function schemaToolFailure(string $sql, Throwable $e) : self
33 33
     {
34
-        return new self("Schema-Tool failed with Error '" . $e->getMessage() . "' while executing DDL: " . $sql, "0", $e);
34
+        return new self("Schema-Tool failed with Error '".$e->getMessage()."' while executing DDL: ".$sql, "0", $e);
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.