Completed
Pull Request — master (#7902)
by
unknown
63:54
created
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/ClassMetadataExporter.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $lines[] = null;
30 30
 
31 31
         if ($namespace) {
32
-            $lines[] = 'namespace ' . $namespace . ';';
32
+            $lines[] = 'namespace '.$namespace.';';
33 33
             $lines[] = null;
34 34
         }
35 35
 
@@ -64,31 +64,31 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $indentation     = \str_repeat(self::INDENTATION, $indentationLevel);
66 66
         $bodyIndentation = \str_repeat(self::INDENTATION, $indentationLevel + 1);
67
-        $objectReference = $bodyIndentation . self::VARIABLE;
67
+        $objectReference = $bodyIndentation.self::VARIABLE;
68 68
         $lines           = [];
69 69
 
70
-        $lines[] = $indentation . 'public function __construct(';
71
-        $lines[] = $bodyIndentation . 'ClassMetadataBuildingContext $metadataBuildingContext,';
72
-        $lines[] = $bodyIndentation . '?ClassMetadata $parent = null';
73
-        $lines[] = $indentation . ')';
74
-        $lines[] = $indentation . '{';
75
-        $lines[] = $bodyIndentation . 'parent::__construct("' . $metadata->getClassName() . '", $parent, $metadataBuildingContext);';
70
+        $lines[] = $indentation.'public function __construct(';
71
+        $lines[] = $bodyIndentation.'ClassMetadataBuildingContext $metadataBuildingContext,';
72
+        $lines[] = $bodyIndentation.'?ClassMetadata $parent = null';
73
+        $lines[] = $indentation.')';
74
+        $lines[] = $indentation.'{';
75
+        $lines[] = $bodyIndentation.'parent::__construct("'.$metadata->getClassName().'", $parent, $metadataBuildingContext);';
76 76
 
77 77
         if ($metadata->getCustomRepositoryClassName()) {
78 78
             $lines[] = null;
79
-            $lines[] = $objectReference . '->setCustomRepositoryClassName("' . $metadata->getCustomRepositoryClassName() . '");';
79
+            $lines[] = $objectReference.'->setCustomRepositoryClassName("'.$metadata->getCustomRepositoryClassName().'");';
80 80
         }
81 81
 
82 82
         if ($metadata->changeTrackingPolicy) {
83 83
             $lines[] = null;
84
-            $lines[] = $objectReference . '->setChangeTrackingPolicy(Mapping\ChangeTrackingPolicy::' . \strtoupper($metadata->changeTrackingPolicy) . ');';
84
+            $lines[] = $objectReference.'->setChangeTrackingPolicy(Mapping\ChangeTrackingPolicy::'.\strtoupper($metadata->changeTrackingPolicy).');';
85 85
         }
86 86
 
87 87
         $lines[] = $this->exportInheritance($metadata, $indentationLevel);
88 88
         $lines[] = $this->exportTable($metadata, $indentationLevel);
89 89
         $lines[] = $this->exportProperties($metadata, $indentationLevel);
90 90
         $lines[] = $this->exportLifecycleCallbacks($metadata, $indentationLevel);
91
-        $lines[] = $indentation . '}';
91
+        $lines[] = $indentation.'}';
92 92
 
93 93
         return \implode(PHP_EOL, $lines);
94 94
     }
@@ -96,17 +96,17 @@  discard block
 block discarded – undo
96 96
     private function exportInheritance(Mapping\ClassMetadata $metadata, int $indentationLevel) : string
97 97
     {
98 98
         $bodyIndentation = \str_repeat(self::INDENTATION, $indentationLevel + 1);
99
-        $objectReference = $bodyIndentation . self::VARIABLE;
99
+        $objectReference = $bodyIndentation.self::VARIABLE;
100 100
         $lines           = [];
101 101
 
102 102
         if ($metadata->inheritanceType) {
103 103
             $lines[] = null;
104
-            $lines[] = $objectReference . '->setInheritanceType(Mapping\InheritanceType::' . \strtoupper($metadata->inheritanceType) . ');';
104
+            $lines[] = $objectReference.'->setInheritanceType(Mapping\InheritanceType::'.\strtoupper($metadata->inheritanceType).');';
105 105
         }
106 106
 
107 107
         if ($metadata->discriminatorColumn) {
108 108
             $lines[] = null;
109
-            $lines[] = $bodyIndentation . '// Discriminator mapping';
109
+            $lines[] = $bodyIndentation.'// Discriminator mapping';
110 110
             $lines[] = $this->exportDiscriminatorMetadata($metadata, $indentationLevel + 1);
111 111
         }
112 112
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         if ($metadata->table) {
122 122
             $lines[] = null;
123
-            $lines[] = $bodyIndentation . '// Table';
123
+            $lines[] = $bodyIndentation.'// Table';
124 124
             $lines[] = $this->exportTableMetadata($metadata->table, $indentationLevel + 1);
125 125
         }
126 126
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
         foreach ($metadata->getPropertiesIterator() as $name => $property) {
136 136
             $lines[] = null;
137
-            $lines[] = $bodyIndentation . '// Property: ' . $name;
137
+            $lines[] = $bodyIndentation.'// Property: '.$name;
138 138
             $lines[] = $this->exportProperty($property, $indentationLevel + 1);
139 139
         }
140 140
 
@@ -144,16 +144,16 @@  discard block
 block discarded – undo
144 144
     private function exportLifecycleCallbacks(Mapping\ClassMetadata $metadata, int $indentationLevel) : string
145 145
     {
146 146
         $bodyIndentation = \str_repeat(self::INDENTATION, $indentationLevel + 1);
147
-        $objectReference = $bodyIndentation . self::VARIABLE;
147
+        $objectReference = $bodyIndentation.self::VARIABLE;
148 148
         $lines           = [];
149 149
 
150 150
         if ($metadata->lifecycleCallbacks) {
151 151
             $lines[] = null;
152
-            $lines[] = $bodyIndentation . '// Lifecycle callbacks';
152
+            $lines[] = $bodyIndentation.'// Lifecycle callbacks';
153 153
 
154 154
             foreach ($metadata->lifecycleCallbacks as $event => $callbacks) {
155 155
                 foreach ($callbacks as $callback) {
156
-                    $lines[] = $objectReference . '->addLifecycleCallback("' . $callback . '", "' . $event . '");';
156
+                    $lines[] = $objectReference.'->addLifecycleCallback("'.$callback.'", "'.$event.'");';
157 157
                 }
158 158
             }
159 159
         }
@@ -166,17 +166,17 @@  discard block
 block discarded – undo
166 166
         $variableExporter      = new VariableExporter();
167 167
         $discriminatorExporter = new DiscriminatorColumnMetadataExporter();
168 168
         $indentation           = \str_repeat(self::INDENTATION, $indentationLevel);
169
-        $objectReference       = $indentation . self::VARIABLE;
169
+        $objectReference       = $indentation.self::VARIABLE;
170 170
         $lines                 = [];
171 171
 
172 172
         $lines[] = $discriminatorExporter->export($metadata->discriminatorColumn, $indentationLevel);
173 173
         $lines[] = null;
174
-        $lines[] = $objectReference . '->setDiscriminatorColumn(' . $discriminatorExporter::VARIABLE . ');';
174
+        $lines[] = $objectReference.'->setDiscriminatorColumn('.$discriminatorExporter::VARIABLE.');';
175 175
 
176 176
         if ($metadata->discriminatorMap) {
177 177
             $discriminatorMap = $variableExporter->export($metadata->discriminatorMap, $indentationLevel + 1);
178 178
 
179
-            $lines[] = $objectReference . '->setDiscriminatorMap(' . $discriminatorMap . ');';
179
+            $lines[] = $objectReference.'->setDiscriminatorMap('.$discriminatorMap.');';
180 180
         }
181 181
 
182 182
         return \implode(PHP_EOL, $lines);
@@ -186,12 +186,12 @@  discard block
 block discarded – undo
186 186
     {
187 187
         $tableExporter   = new TableMetadataExporter();
188 188
         $indentation     = \str_repeat(self::INDENTATION, $indentationLevel);
189
-        $objectReference = $indentation . self::VARIABLE;
189
+        $objectReference = $indentation.self::VARIABLE;
190 190
         $lines           = [];
191 191
 
192 192
         $lines[] = $tableExporter->export($table, $indentationLevel);
193 193
         $lines[] = null;
194
-        $lines[] = $objectReference . '->setTable(' . $tableExporter::VARIABLE . ');';
194
+        $lines[] = $objectReference.'->setTable('.$tableExporter::VARIABLE.');';
195 195
 
196 196
         return \implode(PHP_EOL, $lines);
197 197
     }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     private function exportProperty(Mapping\Property $property, int $indentationLevel) : string
200 200
     {
201 201
         $indentation     = \str_repeat(self::INDENTATION, $indentationLevel);
202
-        $objectReference = $indentation . self::VARIABLE;
202
+        $objectReference = $indentation.self::VARIABLE;
203 203
         $lines           = [];
204 204
 
205 205
         switch (true) {
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 
231 231
         $lines[] = $propertyExporter->export($property, $indentationLevel);
232 232
         $lines[] = null;
233
-        $lines[] = $objectReference . '->addProperty(' . $propertyExporter::VARIABLE . ');';
233
+        $lines[] = $objectReference.'->addProperty('.$propertyExporter::VARIABLE.');';
234 234
 
235 235
         return \implode(PHP_EOL, $lines);
236 236
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/ManyToManyAssociationMetadataExporter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         /** @var ManyToManyAssociationMetadata $value */
23 23
         $indentation     = \str_repeat(self::INDENTATION, $indentationLevel);
24
-        $objectReference = $indentation . self::VARIABLE;
24
+        $objectReference = $indentation.self::VARIABLE;
25 25
         $lines           = [];
26 26
 
27 27
         $lines[] = parent::export($value, $indentationLevel);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             $lines[] = null;
33 33
             $lines[] = $joinTableExporter->export($value->getJoinTable(), $indentationLevel);
34 34
             $lines[] = null;
35
-            $lines[] = $objectReference . '->setJoinTable(' . $joinTableExporter::VARIABLE . ');';
35
+            $lines[] = $objectReference.'->setJoinTable('.$joinTableExporter::VARIABLE.');';
36 36
         }
37 37
 
38 38
         return \implode(PHP_EOL, $lines);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/CacheMetadataExporter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@
 block discarded – undo
22 22
     {
23 23
         /** @var CacheMetadata $value */
24 24
         $indentation     = \str_repeat(self::INDENTATION, $indentationLevel);
25
-        $objectReference = $indentation . self::VARIABLE;
25
+        $objectReference = $indentation.self::VARIABLE;
26 26
         $lines           = [];
27 27
 
28
-        $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value);
28
+        $lines[] = $objectReference.' = '.$this->exportInstantiation($value);
29 29
 
30 30
         return \implode(PHP_EOL, $lines);
31 31
     }
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.
lib/Doctrine/ORM/Mapping/Exporter/ToManyAssociationMetadataExporter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@
 block discarded – undo
19 19
         /** @var ToManyAssociationMetadata $value */
20 20
         $variableExporter = new VariableExporter();
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);
26 26
 
27
-        if (! empty($value->getIndexedBy())) {
28
-            $lines[] = $objectReference . '->setIndexedBy("' . $value->getIndexedBy() . '"");';
27
+        if ( ! empty($value->getIndexedBy())) {
28
+            $lines[] = $objectReference.'->setIndexedBy("'.$value->getIndexedBy().'"");';
29 29
         }
30 30
 
31
-        $lines[] = $objectReference . '->setOderBy(' . $variableExporter->export($value->getOrderBy(), $indentationLevel + 1) . ');';
31
+        $lines[] = $objectReference.'->setOderBy('.$variableExporter->export($value->getOrderBy(), $indentationLevel + 1).');';
32 32
 
33 33
         return \implode(PHP_EOL, $lines);
34 34
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/MappingException.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public static function pathRequired()
25 25
     {
26
-        return new self('Specifying the paths to your entities is required ' .
26
+        return new self('Specifying the paths to your entities is required '.
27 27
             'in the AnnotationDriver to retrieve all class names.');
28 28
     }
29 29
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public static function missingQueryMapping($entity, $queryName)
215 215
     {
216
-        return new self('Query named "' . $queryName . '" in "' . $entity . ' requires a result class or result set mapping.');
216
+        return new self('Query named "'.$queryName.'" in "'.$entity.' requires a result class or result set mapping.');
217 217
     }
218 218
 
219 219
     /**
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public static function missingResultSetMappingEntity($entity, $resultName)
226 226
     {
227
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a entity class name.');
227
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a entity class name.');
228 228
     }
229 229
 
230 230
     /**
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      */
236 236
     public static function missingResultSetMappingFieldName($entity, $resultName)
237 237
     {
238
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a field name.');
238
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a field name.');
239 239
     }
240 240
 
241 241
     /**
@@ -282,8 +282,8 @@  discard block
 block discarded – undo
282 282
     {
283 283
         $message = \sprintf("The mapping of field '%s' is invalid: The option '%s' is required.", $field, $expectedOption);
284 284
 
285
-        if (! empty($hint)) {
286
-            $message .= ' (Hint: ' . $hint . ')';
285
+        if ( ! empty($hint)) {
286
+            $message .= ' (Hint: '.$hint.')';
287 287
         }
288 288
 
289 289
         return new self($message);
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
      */
313 313
     public static function reflectionFailure($entity, ReflectionException $previousException)
314 314
     {
315
-        return new self('An error occurred in ' . $entity, 0, $previousException);
315
+        return new self('An error occurred in '.$entity, 0, $previousException);
316 316
     }
317 317
 
318 318
     /**
@@ -323,8 +323,8 @@  discard block
 block discarded – undo
323 323
      */
324 324
     public static function joinColumnMustPointToMappedField($className, $joinColumn)
325 325
     {
326
-        return new self('The column ' . $joinColumn . ' must be mapped to a field in class '
327
-            . $className . ' since it is referenced by a join column of another class.');
326
+        return new self('The column '.$joinColumn.' must be mapped to a field in class '
327
+            . $className.' since it is referenced by a join column of another class.');
328 328
     }
329 329
 
330 330
     /**
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public static function propertyTypeIsRequired($className, $propertyName)
360 360
     {
361
-        return new self("The attribute 'type' is required for the column description of property " . $className . '::$' . $propertyName . '.');
361
+        return new self("The attribute 'type' is required for the column description of property ".$className.'::$'.$propertyName.'.');
362 362
     }
363 363
 
364 364
     /**
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
      */
385 385
     public static function duplicateQueryMapping($entity, $queryName)
386 386
     {
387
-        return new self('Query named "' . $queryName . '" in "' . $entity . '" was already declared, but it must be declared only once');
387
+        return new self('Query named "'.$queryName.'" in "'.$entity.'" was already declared, but it must be declared only once');
388 388
     }
389 389
 
390 390
     /**
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      */
396 396
     public static function duplicateResultSetMapping($entity, $resultName)
397 397
     {
398
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . '" was already declared, but it must be declared only once');
398
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.'" was already declared, but it must be declared only once');
399 399
     }
400 400
 
401 401
     /**
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
      */
406 406
     public static function singleIdNotAllowedOnCompositePrimaryKey($entity)
407 407
     {
408
-        return new self('Single id is not allowed on composite primary key in entity ' . $entity);
408
+        return new self('Single id is not allowed on composite primary key in entity '.$entity);
409 409
     }
410 410
 
411 411
     /**
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      */
416 416
     public static function noIdDefined($entity)
417 417
     {
418
-        return new self('No ID defined for entity ' . $entity);
418
+        return new self('No ID defined for entity '.$entity);
419 419
     }
420 420
 
421 421
     /**
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
      */
424 424
     public static function unsupportedOptimisticLockingType(Type $unsupportedType)
425 425
     {
426
-        return new self('Locking type "' . $unsupportedType->getName() . '" is not supported by Doctrine.');
426
+        return new self('Locking type "'.$unsupportedType->getName().'" is not supported by Doctrine.');
427 427
     }
428 428
 
429 429
     /**
@@ -433,13 +433,13 @@  discard block
 block discarded – undo
433 433
      */
434 434
     public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
435 435
     {
436
-        if (! empty($path)) {
437
-            $path = '[' . $path . ']';
436
+        if ( ! empty($path)) {
437
+            $path = '['.$path.']';
438 438
         }
439 439
 
440 440
         return new self(
441
-            'File mapping drivers must have a valid directory path, ' .
442
-            'however the given path ' . $path . ' seems to be incorrect!'
441
+            'File mapping drivers must have a valid directory path, '.
442
+            'however the given path '.$path.' seems to be incorrect!'
443 443
         );
444 444
     }
445 445
 
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
     public static function invalidClassInDiscriminatorMap($className, $owningClass)
456 456
     {
457 457
         return new self(\sprintf(
458
-            "Entity class '%s' used in the discriminator map of class '%s' " .
458
+            "Entity class '%s' used in the discriminator map of class '%s' ".
459 459
             'does not exist.',
460 460
             $className,
461 461
             $owningClass
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
     public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, $fieldName, $type)
522 522
     {
523 523
         return new self(\sprintf(
524
-            'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' .
524
+            'It is not possible to set id field "%s" to type "%s" in entity class "%s". '.
525 525
             'The type "%s" requires conversion SQL which is not allowed for identifiers.',
526 526
             $fieldName,
527 527
             $type,
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
      */
558 558
     public static function duplicateColumnName($className, $columnName)
559 559
     {
560
-        return new self("Duplicate definition of column '" . $columnName . "' on entity '" . $className . "' in a field or discriminator column mapping.");
560
+        return new self("Duplicate definition of column '".$columnName."' on entity '".$className."' in a field or discriminator column mapping.");
561 561
     }
562 562
 
563 563
     /**
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
      */
569 569
     public static function illegalToManyAssociationOnMappedSuperclass($className, $field)
570 570
     {
571
-        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '" . $className . '#' . $field . "'.");
571
+        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className.'#'.$field."'.");
572 572
     }
573 573
 
574 574
     /**
@@ -580,8 +580,8 @@  discard block
 block discarded – undo
580 580
      */
581 581
     public static function cannotMapCompositePrimaryKeyEntitiesAsForeignId($className, $targetEntity, $targetField)
582 582
     {
583
-        return new self("It is not possible to map entity '" . $className . "' with a composite primary key " .
584
-            "as part of the primary key of another entity '" . $targetEntity . '#' . $targetField . "'.");
583
+        return new self("It is not possible to map entity '".$className."' with a composite primary key ".
584
+            "as part of the primary key of another entity '".$targetEntity.'#'.$targetField."'.");
585 585
     }
586 586
 
587 587
     /**
@@ -635,8 +635,8 @@  discard block
 block discarded – undo
635 635
      */
636 636
     public static function illegalOrphanRemoval($className, $field)
637 637
     {
638
-        return new self('Orphan removal is only allowed on one-to-one and one-to-many ' .
639
-            'associations, but ' . $className . '#' . $field . ' is not.');
638
+        return new self('Orphan removal is only allowed on one-to-one and one-to-many '.
639
+            'associations, but '.$className.'#'.$field.' is not.');
640 640
     }
641 641
 
642 642
     /**
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
      */
669 669
     public static function noInheritanceOnMappedSuperClass($className)
670 670
     {
671
-        return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'.");
671
+        return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'.");
672 672
     }
673 673
 
674 674
     /**
@@ -680,8 +680,8 @@  discard block
 block discarded – undo
680 680
     public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName)
681 681
     {
682 682
         return new self(
683
-            "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
684
-            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '" . $className . "' an abstract class " .
683
+            "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ".
684
+            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ".
685 685
             'to avoid this exception from occurring.'
686 686
         );
687 687
     }
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
      */
695 695
     public static function lifecycleCallbackMethodNotFound($className, $methodName)
696 696
     {
697
-        return new self("Entity '" . $className . "' has no public method '" . $methodName . "' to be registered as lifecycle callback.");
697
+        return new self("Entity '".$className."' has no public method '".$methodName."' to be registered as lifecycle callback.");
698 698
     }
699 699
 
700 700
     /**
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
      */
729 729
     public static function invalidFetchMode($className, $annotation)
730 730
     {
731
-        return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
731
+        return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'");
732 732
     }
733 733
 
734 734
     /**
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
      */
739 739
     public static function compositeKeyAssignedIdGeneratorRequired($className)
740 740
     {
741
-        return new self("Entity '" . $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
741
+        return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
742 742
     }
743 743
 
744 744
     /**
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
      */
751 751
     public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName)
752 752
     {
753
-        return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity . '#' . $associationName . "'.");
753
+        return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity.'#'.$associationName."'.");
754 754
     }
755 755
 
756 756
     /**
@@ -762,8 +762,8 @@  discard block
 block discarded – undo
762 762
      */
763 763
     public static function invalidCascadeOption(array $cascades, $className, $propertyName)
764 764
     {
765
-        $cascades = \implode(', ', \array_map(static function ($e) {
766
-            return "'" . $e . "'";
765
+        $cascades = \implode(', ', \array_map(static function($e) {
766
+            return "'".$e."'";
767 767
         }, $cascades));
768 768
 
769 769
         return new self(\sprintf(
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
     {
797 797
         return new self(
798 798
             \sprintf(
799
-                'Infinite nesting detected for embedded property %s::%s. ' .
799
+                'Infinite nesting detected for embedded property %s::%s. '.
800 800
                 'You cannot embed an embeddable from the same type inside an embeddable.',
801 801
                 $className,
802 802
                 $propertyName
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
     {
812 812
         return new self(
813 813
             \sprintf(
814
-                'Class %s not found in namespaces %s.' .
814
+                'Class %s not found in namespaces %s.'.
815 815
                 $className,
816 816
                 \implode(', ', $namespaces)
817 817
             )
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Utility/NormalizeIdentifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $normalizedAssociatedId = [];
36 36
 
37 37
         foreach ($targetClass->getPropertiesIterator() as $name => $property) {
38
-            if (! \array_key_exists($name, $flatIdentifier)) {
38
+            if ( ! \array_key_exists($name, $flatIdentifier)) {
39 39
                 continue;
40 40
             }
41 41
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 
340 340
         $this->computeChangeSets();
341 341
 
342
-        if (! ($this->entityInsertions ||
342
+        if ( ! ($this->entityInsertions ||
343 343
                 $this->entityDeletions ||
344 344
                 $this->entityUpdates ||
345 345
                 $this->collectionUpdates ||
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
             // Entity deletions come last and need to be in reverse commit order
401 401
             if ($this->entityDeletions) {
402 402
                 foreach (\array_reverse($commitOrder) as $committedEntityName) {
403
-                    if (! $this->entityDeletions) {
403
+                    if ( ! $this->entityDeletions) {
404 404
                         break; // just a performance optimisation
405 405
                     }
406 406
 
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
         $oid  = spl_object_id($entity);
485 485
         $data = [];
486 486
 
487
-        if (! isset($this->entityChangeSets[$oid])) {
487
+        if ( ! isset($this->entityChangeSets[$oid])) {
488 488
             return $data;
489 489
         }
490 490
 
@@ -564,12 +564,12 @@  discard block
 block discarded – undo
564 564
                     || ! $class->getProperty($name) instanceof FieldMetadata
565 565
                     || ! $class->getProperty($name)->hasValueGenerator()
566 566
                     || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY
567
-                ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) {
567
+                ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) {
568 568
                 $actualData[$name] = $value;
569 569
             }
570 570
         }
571 571
 
572
-        if (! isset($this->originalEntityData[$oid])) {
572
+        if ( ! isset($this->originalEntityData[$oid])) {
573 573
             // Entity is either NEW or MANAGED but not yet fully persisted (only has an id).
574 574
             // These result in an INSERT.
575 575
             $this->originalEntityData[$oid] = $actualData;
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 
597 597
             foreach ($actualData as $propName => $actualValue) {
598 598
                 // skip field, its a partially omitted one!
599
-                if (! (isset($originalData[$propName]) || \array_key_exists($propName, $originalData))) {
599
+                if ( ! (isset($originalData[$propName]) || \array_key_exists($propName, $originalData))) {
600 600
                     continue;
601 601
                 }
602 602
 
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
                     if ($owner === null) { // cloned
619 619
                         $actualValue->setOwner($entity, $property);
620 620
                     } elseif ($owner !== $entity) { // no clone, we have to fix
621
-                        if (! $actualValue->isInitialized()) {
621
+                        if ( ! $actualValue->isInitialized()) {
622 622
                             $actualValue->initialize(); // we have to do this otherwise the cols share state
623 623
                         }
624 624
 
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
                         // Check if original value exists
657 657
                         if ($orgValue instanceof PersistentCollection) {
658 658
                             // A PersistentCollection was de-referenced, so delete it.
659
-                            if (! $this->isCollectionScheduledForDeletion($orgValue)) {
659
+                            if ( ! $this->isCollectionScheduledForDeletion($orgValue)) {
660 660
                                 $this->scheduleCollectionDeletion($orgValue);
661 661
 
662 662
                                 $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 
680 680
         // Look for changes in associations of the entity
681 681
         foreach ($class->getPropertiesIterator() as $property) {
682
-            if (! $property instanceof AssociationMetadata) {
682
+            if ( ! $property instanceof AssociationMetadata) {
683 683
                 continue;
684 684
             }
685 685
 
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
                 // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here.
747 747
                 $oid = spl_object_id($entity);
748 748
 
749
-                if (! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) {
749
+                if ( ! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) {
750 750
                     $this->computeChangeSet($class, $entity);
751 751
                 }
752 752
             }
@@ -783,13 +783,13 @@  discard block
 block discarded – undo
783 783
         $targetClass    = $this->em->getClassMetadata($targetEntity);
784 784
 
785 785
         foreach ($unwrappedValue as $key => $entry) {
786
-            if (! ($entry instanceof $targetEntity)) {
786
+            if ( ! ($entry instanceof $targetEntity)) {
787 787
                 throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry);
788 788
             }
789 789
 
790 790
             $state = $this->getEntityState($entry, self::STATE_NEW);
791 791
 
792
-            if (! ($entry instanceof $targetEntity)) {
792
+            if ( ! ($entry instanceof $targetEntity)) {
793 793
                 throw UnexpectedAssociationValue::create(
794 794
                     $association->getSourceEntity(),
795 795
                     $association->getName(),
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 
801 801
             switch ($state) {
802 802
                 case self::STATE_NEW:
803
-                    if (! \in_array('persist', $association->getCascade(), true)) {
803
+                    if ( ! \in_array('persist', $association->getCascade(), true)) {
804 804
                         $this->nonCascadedNewDetectedEntities[spl_object_id($entry)] = [$association, $entry];
805 805
 
806 806
                         break;
@@ -849,12 +849,12 @@  discard block
 block discarded – undo
849 849
         $persister      = $this->getEntityPersister($class->getClassName());
850 850
         $generationPlan->executeImmediate($this->em, $entity);
851 851
 
852
-        if (! $generationPlan->containsDeferred()) {
852
+        if ( ! $generationPlan->containsDeferred()) {
853 853
             $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity));
854 854
 
855 855
             // Some identifiers may be foreign keys to new entities.
856 856
             // In this case, we don't have the value yet and should treat it as if we have a post-insert generator
857
-            if (! $this->hasMissingIdsWhichAreForeignKeys($class, $id)) {
857
+            if ( ! $this->hasMissingIdsWhichAreForeignKeys($class, $id)) {
858 858
                 $this->entityIdentifiers[$oid] = $id;
859 859
             }
860 860
         }
@@ -899,7 +899,7 @@  discard block
 block discarded – undo
899 899
     {
900 900
         $oid = spl_object_id($entity);
901 901
 
902
-        if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
902
+        if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
903 903
             throw ORMInvalidArgumentException::entityNotManaged($entity);
904 904
         }
905 905
 
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
                         break;
923 923
                     }
924 924
 
925
-                    if (! $property->isPrimaryKey()
925
+                    if ( ! $property->isPrimaryKey()
926 926
                         || ! $property->getValueGenerator()
927 927
                         || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) {
928 928
                         $actualData[$name] = $property->getValue($entity);
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
             }
937 937
         }
938 938
 
939
-        if (! isset($this->originalEntityData[$oid])) {
939
+        if ( ! isset($this->originalEntityData[$oid])) {
940 940
             throw new RuntimeException('Cannot call recomputeSingleEntityChangeSet before computeChangeSet on an entity.');
941 941
         }
942 942
 
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
         if ($changeSet) {
955 955
             if (isset($this->entityChangeSets[$oid])) {
956 956
                 $this->entityChangeSets[$oid] = \array_merge($this->entityChangeSets[$oid], $changeSet);
957
-            } elseif (! isset($this->entityInsertions[$oid])) {
957
+            } elseif ( ! isset($this->entityInsertions[$oid])) {
958 958
                 $this->entityChangeSets[$oid] = $changeSet;
959 959
                 $this->entityUpdates[$oid]    = $entity;
960 960
             }
@@ -1024,7 +1024,7 @@  discard block
 block discarded – undo
1024 1024
                 $this->recomputeSingleEntityChangeSet($class, $entity);
1025 1025
             }
1026 1026
 
1027
-            if (! empty($this->entityChangeSets[$oid])) {
1027
+            if ( ! empty($this->entityChangeSets[$oid])) {
1028 1028
                 $persister->update($entity);
1029 1029
             }
1030 1030
 
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
 
1064 1064
             // Entity with this $oid after deletion treated as NEW, even if the $oid
1065 1065
             // is obtained by a new entity because the old one went out of scope.
1066
-            if (! $class->isIdentifierComposite()) {
1066
+            if ( ! $class->isIdentifierComposite()) {
1067 1067
                 $property = $class->getProperty($class->getSingleIdentifierFieldName());
1068 1068
 
1069 1069
                 if ($property instanceof FieldMetadata && $property->hasValueGenerator()) {
@@ -1110,13 +1110,13 @@  discard block
 block discarded – undo
1110 1110
         // Calculate dependencies for new nodes
1111 1111
         while ($class = \array_pop($newNodes)) {
1112 1112
             foreach ($class->getPropertiesIterator() as $property) {
1113
-                if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1113
+                if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1114 1114
                     continue;
1115 1115
                 }
1116 1116
 
1117 1117
                 $targetClass = $this->em->getClassMetadata($property->getTargetEntity());
1118 1118
 
1119
-                if (! $calc->hasNode($targetClass->getClassName())) {
1119
+                if ( ! $calc->hasNode($targetClass->getClassName())) {
1120 1120
                     $calc->addNode($targetClass->getClassName(), $targetClass);
1121 1121
 
1122 1122
                     $newNodes[] = $targetClass;
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
 
1125 1125
                 $weight = ! \array_filter(
1126 1126
                     $property->getJoinColumns(),
1127
-                    static function (JoinColumnMetadata $joinColumn) {
1127
+                    static function(JoinColumnMetadata $joinColumn) {
1128 1128
                         return $joinColumn->isNullable();
1129 1129
                     }
1130 1130
                 );
@@ -1132,14 +1132,14 @@  discard block
 block discarded – undo
1132 1132
                 $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight);
1133 1133
 
1134 1134
                 // If the target class has mapped subclasses, these share the same dependency.
1135
-                if (! $targetClass->getSubClasses()) {
1135
+                if ( ! $targetClass->getSubClasses()) {
1136 1136
                     continue;
1137 1137
                 }
1138 1138
 
1139 1139
                 foreach ($targetClass->getSubClasses() as $subClassName) {
1140 1140
                     $targetSubClass = $this->em->getClassMetadata($subClassName);
1141 1141
 
1142
-                    if (! $calc->hasNode($subClassName)) {
1142
+                    if ( ! $calc->hasNode($subClassName)) {
1143 1143
                         $calc->addNode($targetSubClass->getClassName(), $targetSubClass);
1144 1144
 
1145 1145
                         $newNodes[] = $targetSubClass;
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
     {
1216 1216
         $oid = spl_object_id($entity);
1217 1217
 
1218
-        if (! isset($this->entityIdentifiers[$oid])) {
1218
+        if ( ! isset($this->entityIdentifiers[$oid])) {
1219 1219
             throw ORMInvalidArgumentException::entityHasNoIdentity($entity, 'scheduling for update');
1220 1220
         }
1221 1221
 
@@ -1223,7 +1223,7 @@  discard block
 block discarded – undo
1223 1223
             throw ORMInvalidArgumentException::entityIsRemoved($entity, 'schedule for update');
1224 1224
         }
1225 1225
 
1226
-        if (! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) {
1226
+        if ( ! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) {
1227 1227
             $this->entityUpdates[$oid] = $entity;
1228 1228
         }
1229 1229
     }
@@ -1298,7 +1298,7 @@  discard block
 block discarded – undo
1298 1298
             return; // entity has not been persisted yet, so nothing more to do.
1299 1299
         }
1300 1300
 
1301
-        if (! $this->isInIdentityMap($entity)) {
1301
+        if ( ! $this->isInIdentityMap($entity)) {
1302 1302
             return;
1303 1303
         }
1304 1304
 
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
 
1307 1307
         unset($this->entityUpdates[$oid]);
1308 1308
 
1309
-        if (! isset($this->entityDeletions[$oid])) {
1309
+        if ( ! isset($this->entityDeletions[$oid])) {
1310 1310
             $this->entityDeletions[$oid] = $entity;
1311 1311
             $this->entityStates[$oid]    = self::STATE_REMOVED;
1312 1312
         }
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
         $persister = $this->getEntityPersister($class->getClassName());
1409 1409
         $id        = $persister->getIdentifier($entity);
1410 1410
 
1411
-        if (! $id) {
1411
+        if ( ! $id) {
1412 1412
             return self::STATE_NEW;
1413 1413
         }
1414 1414
 
@@ -1766,7 +1766,7 @@  discard block
 block discarded – undo
1766 1766
         $class = $this->em->getClassMetadata(\get_class($entity));
1767 1767
 
1768 1768
         foreach ($class->getPropertiesIterator() as $association) {
1769
-            if (! ($association instanceof AssociationMetadata && \in_array('refresh', $association->getCascade(), true))) {
1769
+            if ( ! ($association instanceof AssociationMetadata && \in_array('refresh', $association->getCascade(), true))) {
1770 1770
                 continue;
1771 1771
             }
1772 1772
 
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
         }
1814 1814
 
1815 1815
         foreach ($class->getPropertiesIterator() as $association) {
1816
-            if (! ($association instanceof AssociationMetadata && \in_array('persist', $association->getCascade(), true))) {
1816
+            if ( ! ($association instanceof AssociationMetadata && \in_array('persist', $association->getCascade(), true))) {
1817 1817
                 continue;
1818 1818
             }
1819 1819
 
@@ -1829,7 +1829,7 @@  discard block
 block discarded – undo
1829 1829
 
1830 1830
                 case $relatedEntities instanceof Collection:
1831 1831
                 case \is_array($relatedEntities):
1832
-                    if (! ($association instanceof ToManyAssociationMetadata)) {
1832
+                    if ( ! ($association instanceof ToManyAssociationMetadata)) {
1833 1833
                         throw ORMInvalidArgumentException::invalidAssociation(
1834 1834
                             $this->em->getClassMetadata($targetEntity),
1835 1835
                             $association,
@@ -1844,7 +1844,7 @@  discard block
 block discarded – undo
1844 1844
                     break;
1845 1845
 
1846 1846
                 case $relatedEntities !== null:
1847
-                    if (! $relatedEntities instanceof $targetEntity) {
1847
+                    if ( ! $relatedEntities instanceof $targetEntity) {
1848 1848
                         throw ORMInvalidArgumentException::invalidAssociation(
1849 1849
                             $this->em->getClassMetadata($targetEntity),
1850 1850
                             $association,
@@ -1873,7 +1873,7 @@  discard block
 block discarded – undo
1873 1873
         $class             = $this->em->getClassMetadata(\get_class($entity));
1874 1874
 
1875 1875
         foreach ($class->getPropertiesIterator() as $association) {
1876
-            if (! ($association instanceof AssociationMetadata && \in_array('remove', $association->getCascade(), true))) {
1876
+            if ( ! ($association instanceof AssociationMetadata && \in_array('remove', $association->getCascade(), true))) {
1877 1877
                 continue;
1878 1878
             }
1879 1879
 
@@ -1932,7 +1932,7 @@  discard block
 block discarded – undo
1932 1932
 
1933 1933
         switch (true) {
1934 1934
             case $lockMode === LockMode::OPTIMISTIC:
1935
-                if (! $class->isVersioned()) {
1935
+                if ( ! $class->isVersioned()) {
1936 1936
                     throw OptimisticLockException::notVersioned($class->getClassName());
1937 1937
                 }
1938 1938
 
@@ -1955,7 +1955,7 @@  discard block
 block discarded – undo
1955 1955
             case $lockMode === LockMode::NONE:
1956 1956
             case $lockMode === LockMode::PESSIMISTIC_READ:
1957 1957
             case $lockMode === LockMode::PESSIMISTIC_WRITE:
1958
-                if (! $this->em->getConnection()->isTransactionActive()) {
1958
+                if ( ! $this->em->getConnection()->isTransactionActive()) {
1959 1959
                     throw TransactionRequiredException::transactionRequired();
1960 1960
                 }
1961 1961
 
@@ -2113,7 +2113,7 @@  discard block
 block discarded – undo
2113 2113
                     $entity->addPropertyChangedListener($this);
2114 2114
                 }
2115 2115
             } else {
2116
-                if (! isset($hints[Query::HINT_REFRESH])
2116
+                if ( ! isset($hints[Query::HINT_REFRESH])
2117 2117
                     || (isset($hints[Query::HINT_REFRESH_ENTITY]) && $hints[Query::HINT_REFRESH_ENTITY] !== $entity)) {
2118 2118
                     return $entity;
2119 2119
                 }
@@ -2161,7 +2161,7 @@  discard block
 block discarded – undo
2161 2161
         }
2162 2162
 
2163 2163
         foreach ($class->getPropertiesIterator() as $field => $association) {
2164
-            if (! ($association instanceof AssociationMetadata)) {
2164
+            if ( ! ($association instanceof AssociationMetadata)) {
2165 2165
                 continue;
2166 2166
             }
2167 2167
 
@@ -2210,7 +2210,7 @@  discard block
 block discarded – undo
2210 2210
                 continue;
2211 2211
             }
2212 2212
 
2213
-            if (! $association->isOwningSide()) {
2213
+            if ( ! $association->isOwningSide()) {
2214 2214
                 // use the given entity association
2215 2215
                 if (isset($data[$field]) && \is_object($data[$field]) &&
2216 2216
                     isset($this->entityStates[spl_object_id($data[$field])])) {
@@ -2260,7 +2260,7 @@  discard block
 block discarded – undo
2260 2260
                 $associatedId[$targetField] = $joinColumnValue;
2261 2261
             }
2262 2262
 
2263
-            if (! $associatedId) {
2263
+            if ( ! $associatedId) {
2264 2264
                 // Foreign key is NULL
2265 2265
                 $association->setValue($entity, null);
2266 2266
                 $this->originalEntityData[$oid][$field] = null;
@@ -2269,7 +2269,7 @@  discard block
 block discarded – undo
2269 2269
             }
2270 2270
 
2271 2271
             // @todo guilhermeblanco Can we remove the need of this somehow?
2272
-            if (! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2272
+            if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2273 2273
                 $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode();
2274 2274
             }
2275 2275
 
@@ -2286,7 +2286,7 @@  discard block
 block discarded – undo
2286 2286
                     // If this is an uninitialized proxy, we are deferring eager loads,
2287 2287
                     // this association is marked as eager fetch, and its an uninitialized proxy (wtf!)
2288 2288
                     // then we can append this entity for eager loading!
2289
-                    if (! $targetClass->isIdentifierComposite() &&
2289
+                    if ( ! $targetClass->isIdentifierComposite() &&
2290 2290
                         $newValue instanceof GhostObjectInterface &&
2291 2291
                         isset($hints[self::HINT_DEFEREAGERLOAD]) &&
2292 2292
                         $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER &&
@@ -2369,7 +2369,7 @@  discard block
 block discarded – undo
2369 2369
 
2370 2370
     public function triggerEagerLoads()
2371 2371
     {
2372
-        if (! $this->eagerLoadingEntities) {
2372
+        if ( ! $this->eagerLoadingEntities) {
2373 2373
             return;
2374 2374
         }
2375 2375
 
@@ -2378,7 +2378,7 @@  discard block
 block discarded – undo
2378 2378
         $this->eagerLoadingEntities = [];
2379 2379
 
2380 2380
         foreach ($eagerLoadingEntities as $entityName => $ids) {
2381
-            if (! $ids) {
2381
+            if ( ! $ids) {
2382 2382
                 continue;
2383 2383
             }
2384 2384
 
@@ -2676,7 +2676,7 @@  discard block
 block discarded – undo
2676 2676
     {
2677 2677
         $class = $this->em->getClassMetadata(\get_class($entity));
2678 2678
 
2679
-        if (! $class->getProperty($propertyName)) {
2679
+        if ( ! $class->getProperty($propertyName)) {
2680 2680
             return; // ignore non-persistent fields
2681 2681
         }
2682 2682
 
@@ -2685,7 +2685,7 @@  discard block
 block discarded – undo
2685 2685
         // Update changeset and mark entity for synchronization
2686 2686
         $this->entityChangeSets[$oid][$propertyName] = [$oldValue, $newValue];
2687 2687
 
2688
-        if (! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) {
2688
+        if ( ! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) {
2689 2689
             $this->scheduleForSynchronization($entity);
2690 2690
         }
2691 2691
     }
@@ -2767,7 +2767,7 @@  discard block
 block discarded – undo
2767 2767
      */
2768 2768
     private static function objToStr($obj)
2769 2769
     {
2770
-        return \method_exists($obj, '__toString') ? (string) $obj : \get_class($obj) . '@' . spl_object_id($obj);
2770
+        return \method_exists($obj, '__toString') ? (string) $obj : \get_class($obj).'@'.spl_object_id($obj);
2771 2771
     }
2772 2772
 
2773 2773
     /**
@@ -2782,7 +2782,7 @@  discard block
 block discarded – undo
2782 2782
      */
2783 2783
     public function markReadOnly($object)
2784 2784
     {
2785
-        if (! \is_object($object) || ! $this->isInIdentityMap($object)) {
2785
+        if ( ! \is_object($object) || ! $this->isInIdentityMap($object)) {
2786 2786
             throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
2787 2787
         }
2788 2788
 
@@ -2800,7 +2800,7 @@  discard block
 block discarded – undo
2800 2800
      */
2801 2801
     public function isReadOnly($object)
2802 2802
     {
2803
-        if (! \is_object($object)) {
2803
+        if ( ! \is_object($object)) {
2804 2804
             throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
2805 2805
         }
2806 2806
 
@@ -2812,7 +2812,7 @@  discard block
 block discarded – undo
2812 2812
      */
2813 2813
     private function afterTransactionComplete()
2814 2814
     {
2815
-        $this->performCallbackOnCachedPersister(static function (CachedPersister $persister) {
2815
+        $this->performCallbackOnCachedPersister(static function(CachedPersister $persister) {
2816 2816
             $persister->afterTransactionComplete();
2817 2817
         });
2818 2818
     }
@@ -2822,7 +2822,7 @@  discard block
 block discarded – undo
2822 2822
      */
2823 2823
     private function afterTransactionRolledBack()
2824 2824
     {
2825
-        $this->performCallbackOnCachedPersister(static function (CachedPersister $persister) {
2825
+        $this->performCallbackOnCachedPersister(static function(CachedPersister $persister) {
2826 2826
             $persister->afterTransactionRolledBack();
2827 2827
         });
2828 2828
     }
@@ -2832,7 +2832,7 @@  discard block
 block discarded – undo
2832 2832
      */
2833 2833
     private function performCallbackOnCachedPersister(callable $callback)
2834 2834
     {
2835
-        if (! $this->hasCache) {
2835
+        if ( ! $this->hasCache) {
2836 2836
             return;
2837 2837
         }
2838 2838
 
Please login to merge, or discard this patch.