Failed Conditions
Push — master ( 8be1e3...e3936d )
by Marco
14s
created
ORM/Mapping/Factory/Strategy/FileWriterClassMetadataGeneratorStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory\Strategy;
7 7
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         $this->ensureDirectoryIsReady(dirname($filePath));
36 36
 
37
-        $tmpFileName = $filePath . '.' . uniqid('', true);
37
+        $tmpFileName = $filePath.'.'.uniqid('', true);
38 38
 
39 39
         file_put_contents($tmpFileName, $sourceCode);
40 40
         @chmod($tmpFileName, 0664);
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
      */
51 51
     private function ensureDirectoryIsReady(string $directory)
52 52
     {
53
-        if (! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) {
53
+        if ( ! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) {
54 54
             throw new \RuntimeException(sprintf('Your metadata directory "%s" must be writable', $directory));
55 55
         }
56 56
 
57
-        if (! is_writable($directory)) {
57
+        if ( ! is_writable($directory)) {
58 58
             throw new \RuntimeException(sprintf('Your proxy directory "%s" must be writable', $directory));
59 59
         }
60 60
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Internal\Hydration;
6 6
 
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
                 // It's a joined result
93 93
 
94 94
                 $parent = $this->rsm->parentAliasMap[$dqlAlias];
95
-                $path   = $parent . '.' . $dqlAlias;
95
+                $path   = $parent.'.'.$dqlAlias;
96 96
 
97 97
                 // missing parent data, skipping as RIGHT JOIN hydration is not supported.
98
-                if (! isset($nonemptyComponents[$parent])) {
98
+                if ( ! isset($nonemptyComponents[$parent])) {
99 99
                     continue;
100 100
                 }
101 101
 
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
                 if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) {
105 105
                     $first = reset($this->resultPointers);
106 106
                     // TODO: Exception if $key === null ?
107
-                    $baseElement =& $this->resultPointers[$parent][key($first)];
107
+                    $baseElement = & $this->resultPointers[$parent][key($first)];
108 108
                 } elseif (isset($this->resultPointers[$parent])) {
109
-                    $baseElement =& $this->resultPointers[$parent];
109
+                    $baseElement = & $this->resultPointers[$parent];
110 110
                 } else {
111 111
                     unset($this->resultPointers[$dqlAlias]); // Ticket #1228
112 112
 
@@ -118,10 +118,10 @@  discard block
 block discarded – undo
118 118
                 $relation      = $parentClass->getProperty($relationAlias);
119 119
 
120 120
                 // Check the type of the relation (many or single-valued)
121
-                if (! $relation instanceof ToOneAssociationMetadata) {
121
+                if ( ! $relation instanceof ToOneAssociationMetadata) {
122 122
                     $oneToOne = false;
123 123
 
124
-                    if (! isset($baseElement[$relationAlias])) {
124
+                    if ( ! isset($baseElement[$relationAlias])) {
125 125
                         $baseElement[$relationAlias] = [];
126 126
                     }
127 127
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                         $index        = $indexExists ? $this->identifierMap[$path][$id[$parent]][$id[$dqlAlias]] : false;
131 131
                         $indexIsValid = $index !== false ? isset($baseElement[$relationAlias][$index]) : false;
132 132
 
133
-                        if (! $indexExists || ! $indexIsValid) {
133
+                        if ( ! $indexExists || ! $indexIsValid) {
134 134
                             $element = $data;
135 135
 
136 136
                             if (isset($this->rsm->indexByMap[$dqlAlias])) {
@@ -151,12 +151,12 @@  discard block
 block discarded – undo
151 151
                         ( ! isset($baseElement[$relationAlias]))
152 152
                     ) {
153 153
                         $baseElement[$relationAlias] = null;
154
-                    } elseif (! isset($baseElement[$relationAlias])) {
154
+                    } elseif ( ! isset($baseElement[$relationAlias])) {
155 155
                         $baseElement[$relationAlias] = $data;
156 156
                     }
157 157
                 }
158 158
 
159
-                $coll =& $baseElement[$relationAlias];
159
+                $coll = & $baseElement[$relationAlias];
160 160
 
161 161
                 if (is_array($coll)) {
162 162
                     $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne);
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                 $entityKey                    = $this->rsm->entityMappings[$dqlAlias] ?: 0;
169 169
 
170 170
                 // if this row has a NULL value for the root result id then make it a null result.
171
-                if (! isset($nonemptyComponents[$dqlAlias])) {
171
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
172 172
                     $result[] = $this->rsm->isMixed
173 173
                         ? [$entityKey => null]
174 174
                         : null;
@@ -205,13 +205,13 @@  discard block
 block discarded – undo
205 205
             }
206 206
         }
207 207
 
208
-        if (! isset($resultKey)) {
208
+        if ( ! isset($resultKey)) {
209 209
             $this->resultCounter++;
210 210
         }
211 211
 
212 212
         // Append scalar values to mixed result sets
213 213
         if (isset($rowData['scalars'])) {
214
-            if (! isset($resultKey)) {
214
+            if ( ! isset($resultKey)) {
215 215
                 // this only ever happens when no object is fetched (scalar result only)
216 216
                 $resultKey = isset($this->rsm->indexByMap['scalars'])
217 217
                     ? $row[$this->rsm->indexByMap['scalars']]
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
         // Append new object to mixed result sets
227 227
         if (isset($rowData['newObjects'])) {
228
-            if (! isset($resultKey)) {
228
+            if ( ! isset($resultKey)) {
229 229
                 $resultKey = $this->resultCounter - 1;
230 230
             }
231 231
 
@@ -267,23 +267,23 @@  discard block
 block discarded – undo
267 267
         }
268 268
 
269 269
         if ($oneToOne) {
270
-            $this->resultPointers[$dqlAlias] =& $coll;
270
+            $this->resultPointers[$dqlAlias] = & $coll;
271 271
 
272 272
             return;
273 273
         }
274 274
 
275 275
         if ($index !== false) {
276
-            $this->resultPointers[$dqlAlias] =& $coll[$index];
276
+            $this->resultPointers[$dqlAlias] = & $coll[$index];
277 277
 
278 278
             return;
279 279
         }
280 280
 
281
-        if (! $coll) {
281
+        if ( ! $coll) {
282 282
             return;
283 283
         }
284 284
 
285 285
         end($coll);
286
-        $this->resultPointers[$dqlAlias] =& $coll[key($coll)];
286
+        $this->resultPointers[$dqlAlias] = & $coll[key($coll)];
287 287
 
288 288
         return;
289 289
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Internal\Hydration;
6 6
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     protected function prepare()
64 64
     {
65
-        if (! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) {
65
+        if ( ! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) {
66 66
             $this->hints[UnitOfWork::HINT_DEFEREAGERLOAD] = true;
67 67
         }
68 68
 
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
 
73 73
             // Remember which associations are "fetch joined", so that we know where to inject
74 74
             // collection stubs or proxies and where not.
75
-            if (! isset($this->rsm->relationMap[$dqlAlias])) {
75
+            if ( ! isset($this->rsm->relationMap[$dqlAlias])) {
76 76
                 continue;
77 77
             }
78 78
 
79 79
             $parent = $this->rsm->parentAliasMap[$dqlAlias];
80 80
 
81
-            if (! isset($this->rsm->aliasMap[$parent])) {
81
+            if ( ! isset($this->rsm->aliasMap[$parent])) {
82 82
                 throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $parent);
83 83
             }
84 84
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 $class        = $this->getClassMetadata($className);
105 105
                 $inverseAssoc = $class->getProperty($association->getInversedBy());
106 106
 
107
-                if (! ($inverseAssoc instanceof ToOneAssociationMetadata)) {
107
+                if ( ! ($inverseAssoc instanceof ToOneAssociationMetadata)) {
108 108
                     continue;
109 109
                 }
110 110
 
@@ -170,14 +170,14 @@  discard block
 block discarded – undo
170 170
         $value       = $association->getValue($entity);
171 171
         $oid         = spl_object_id($entity);
172 172
 
173
-        if (! $value instanceof PersistentCollection) {
173
+        if ( ! $value instanceof PersistentCollection) {
174 174
             $value = $association->wrap($entity, $value, $this->em);
175 175
 
176 176
             $association->setValue($entity, $value);
177 177
 
178 178
             $this->uow->setOriginalEntityProperty($oid, $fieldName, $value);
179 179
 
180
-            $this->initializedCollections[$oid . $fieldName] = $value;
180
+            $this->initializedCollections[$oid.$fieldName] = $value;
181 181
         } elseif (isset($this->hints[Query::HINT_REFRESH]) ||
182 182
             (isset($this->hints['fetched'][$parentDqlAlias][$fieldName]) && ! $value->isInitialized())
183 183
         ) {
@@ -186,10 +186,10 @@  discard block
 block discarded – undo
186 186
             $value->setInitialized(true);
187 187
             $value->unwrap()->clear();
188 188
 
189
-            $this->initializedCollections[$oid . $fieldName] = $value;
189
+            $this->initializedCollections[$oid.$fieldName] = $value;
190 190
         } else {
191 191
             // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN!
192
-            $this->existingCollections[$oid . $fieldName] = $value;
192
+            $this->existingCollections[$oid.$fieldName] = $value;
193 193
         }
194 194
 
195 195
         return $value;
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
         if (isset($this->rsm->discriminatorColumns[$dqlAlias])) {
213 213
             $fieldName = $this->rsm->discriminatorColumns[$dqlAlias];
214 214
 
215
-            if (! isset($this->rsm->metaMappings[$fieldName])) {
215
+            if ( ! isset($this->rsm->metaMappings[$fieldName])) {
216 216
                 throw HydrationException::missingDiscriminatorMetaMappingColumn($className, $fieldName, $dqlAlias);
217 217
             }
218 218
 
219 219
             $discrColumn = $this->rsm->metaMappings[$fieldName];
220 220
 
221
-            if (! isset($data[$discrColumn])) {
221
+            if ( ! isset($data[$discrColumn])) {
222 222
                 throw HydrationException::missingDiscriminatorColumn($className, $discrColumn, $dqlAlias);
223 223
             }
224 224
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             $discrMap           = $this->metadataCache[$className]->discriminatorMap;
230 230
             $discriminatorValue = (string) $data[$discrColumn];
231 231
 
232
-            if (! isset($discrMap[$discriminatorValue])) {
232
+            if ( ! isset($discrMap[$discriminatorValue])) {
233 233
                 throw HydrationException::invalidDiscriminatorValue($discriminatorValue, array_keys($discrMap));
234 234
             }
235 235
 
@@ -305,10 +305,10 @@  discard block
 block discarded – undo
305 305
                 $parentAlias = $this->rsm->parentAliasMap[$dqlAlias];
306 306
                 // we need the $path to save into the identifier map which entities were already
307 307
                 // seen for this parent-child relationship
308
-                $path = $parentAlias . '.' . $dqlAlias;
308
+                $path = $parentAlias.'.'.$dqlAlias;
309 309
 
310 310
                 // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs
311
-                if (! isset($nonemptyComponents[$parentAlias])) {
311
+                if ( ! isset($nonemptyComponents[$parentAlias])) {
312 312
                     // TODO: Add special case code where we hydrate the right join objects into identity map at least
313 313
                     continue;
314 314
                 }
@@ -339,15 +339,15 @@  discard block
 block discarded – undo
339 339
                 $oid = spl_object_id($parentObject);
340 340
 
341 341
                 // Check the type of the relation (many or single-valued)
342
-                if (! ($association instanceof ToOneAssociationMetadata)) {
342
+                if ( ! ($association instanceof ToOneAssociationMetadata)) {
343 343
                     // PATH A: Collection-valued association
344 344
                     $reflFieldValue = $association->getValue($parentObject);
345 345
 
346 346
                     if (isset($nonemptyComponents[$dqlAlias])) {
347
-                        $collKey = $oid . $relationField;
347
+                        $collKey = $oid.$relationField;
348 348
                         if (isset($this->initializedCollections[$collKey])) {
349 349
                             $reflFieldValue = $this->initializedCollections[$collKey];
350
-                        } elseif (! isset($this->existingCollections[$collKey])) {
350
+                        } elseif ( ! isset($this->existingCollections[$collKey])) {
351 351
                             $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias);
352 352
                         }
353 353
 
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
                         $index        = $indexExists ? $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] : false;
356 356
                         $indexIsValid = $index !== false ? isset($reflFieldValue[$index]) : false;
357 357
 
358
-                        if (! $indexExists || ! $indexIsValid) {
358
+                        if ( ! $indexExists || ! $indexIsValid) {
359 359
                             if (isset($this->existingCollections[$collKey])) {
360 360
                                 $element = $this->getEntityFromIdentityMap($entityName, $data);
361 361
 
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
                             // Update result pointer
385 385
                             $this->resultPointers[$dqlAlias] = $reflFieldValue[$index];
386 386
                         }
387
-                    } elseif (! $reflFieldValue) {
387
+                    } elseif ( ! $reflFieldValue) {
388 388
                         $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias);
389 389
                     } elseif ($reflFieldValue instanceof PersistentCollection && $reflFieldValue->isInitialized() === false) {
390 390
                         $reflFieldValue->setInitialized(true);
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
                     // PATH B: Single-valued association
394 394
                     $reflFieldValue = $association->getValue($parentObject);
395 395
 
396
-                    if (! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) ||
396
+                    if ( ! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) ||
397 397
                         ($reflFieldValue instanceof GhostObjectInterface && ! $reflFieldValue->isProxyInitialized())) {
398 398
                         // we only need to take action if this value is null,
399 399
                         // we refresh the entity or its an uninitialized proxy.
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
                 $entityKey                    = $this->rsm->entityMappings[$dqlAlias] ?: 0;
455 455
 
456 456
                 // if this row has a NULL value for the root result id then make it a null result.
457
-                if (! isset($nonemptyComponents[$dqlAlias])) {
457
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
458 458
                     if ($this->rsm->isMixed) {
459 459
                         $result[] = [$entityKey => null];
460 460
                     } else {
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                 }
467 467
 
468 468
                 // check for existing result from the iterations before
469
-                if (! isset($this->identifierMap[$dqlAlias][$id[$dqlAlias]])) {
469
+                if ( ! isset($this->identifierMap[$dqlAlias][$id[$dqlAlias]])) {
470 470
                     $element = $this->getEntity($data, $dqlAlias);
471 471
 
472 472
                     if ($this->rsm->isMixed) {
@@ -509,13 +509,13 @@  discard block
 block discarded – undo
509 509
             }
510 510
         }
511 511
 
512
-        if (! isset($resultKey)) {
512
+        if ( ! isset($resultKey)) {
513 513
             $this->resultCounter++;
514 514
         }
515 515
 
516 516
         // Append scalar values to mixed result sets
517 517
         if (isset($rowData['scalars'])) {
518
-            if (! isset($resultKey)) {
518
+            if ( ! isset($resultKey)) {
519 519
                 $resultKey = (isset($this->rsm->indexByMap['scalars']))
520 520
                     ? $row[$this->rsm->indexByMap['scalars']]
521 521
                     : $this->resultCounter - 1;
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 
529 529
         // Append new object to mixed result sets
530 530
         if (isset($rowData['newObjects'])) {
531
-            if (! isset($resultKey)) {
531
+            if ( ! isset($resultKey)) {
532 532
                 $resultKey = $this->resultCounter - 1;
533 533
             }
534 534
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Internal\Hydration;
6 6
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 $discrColumnName = $metaMappingDiscrColumnName;
80 80
             }
81 81
 
82
-            if (! isset($sqlResult[$discrColumnName])) {
82
+            if ( ! isset($sqlResult[$discrColumnName])) {
83 83
                 throw HydrationException::missingDiscriminatorColumn($entityName, $discrColumnName, key($this->rsm->aliasMap));
84 84
             }
85 85
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
             $discrMap = $this->class->discriminatorMap;
91 91
 
92
-            if (! isset($discrMap[$sqlResult[$discrColumnName]])) {
92
+            if ( ! isset($discrMap[$sqlResult[$discrColumnName]])) {
93 93
                 throw HydrationException::invalidDiscriminatorValue($sqlResult[$discrColumnName], array_keys($discrMap));
94 94
             }
95 95
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
             $cacheKeyInfo = $this->hydrateColumnInfo($column);
108 108
 
109
-            if (! $cacheKeyInfo) {
109
+            if ( ! $cacheKeyInfo) {
110 110
                 continue;
111 111
             }
112 112
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             $fieldName = $cacheKeyInfo['fieldName'];
123 123
 
124 124
             // Prevent overwrite in case of inherit classes using same property name (See AbstractHydrator)
125
-            if (! isset($data[$fieldName]) || ! $valueIsNull) {
125
+            if ( ! isset($data[$fieldName]) || ! $valueIsNull) {
126 126
                 $data[$fieldName] = $value;
127 127
             }
128 128
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Internal\Hydration;
6 6
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     {
144 144
         $row = $this->stmt->fetch(PDO::FETCH_ASSOC);
145 145
 
146
-        if (! $row) {
146
+        if ( ! $row) {
147 147
             $this->cleanup();
148 148
 
149 149
             return false;
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                         : $value;
287 287
 
288 288
                     if ($cacheKeyInfo['isIdentifier'] && $value !== null) {
289
-                        $id[$dqlAlias]                .= '|' . $value;
289
+                        $id[$dqlAlias]                .= '|'.$value;
290 290
                         $nonemptyComponents[$dqlAlias] = true;
291 291
                     }
292 292
                     break;
@@ -322,10 +322,10 @@  discard block
 block discarded – undo
322 322
 
323 323
             // WARNING: BC break! We know this is the desired behavior to type convert values, but this
324 324
             // erroneous behavior exists since 2.0 and we're forced to keep compatibility.
325
-            if (! isset($cacheKeyInfo['isScalar'])) {
325
+            if ( ! isset($cacheKeyInfo['isScalar'])) {
326 326
                 $dqlAlias  = $cacheKeyInfo['dqlAlias'];
327 327
                 $type      = $cacheKeyInfo['type'];
328
-                $fieldName = $dqlAlias . '_' . $fieldName;
328
+                $fieldName = $dqlAlias.'_'.$fieldName;
329 329
                 $value     = $type
330 330
                     ? $type->convertToPHPValue($value, $this->platform)
331 331
                     : $value;
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
      */
432 432
     protected function getClassMetadata($className)
433 433
     {
434
-        if (! isset($this->metadataCache[$className])) {
434
+        if ( ! isset($this->metadataCache[$className])) {
435 435
             $this->metadataCache[$className] = $this->em->getClassMetadata($className);
436 436
         }
437 437
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/IterableResult.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Internal\Hydration;
6 6
 
@@ -85,6 +85,6 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function valid()
87 87
     {
88
-        return $this->current!==false;
88
+        return $this->current !== false;
89 89
     }
90 90
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/HydrationException.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Internal\Hydration;
6 6
 
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public static function emptyDiscriminatorValue($dqlAlias)
40 40
     {
41
-        return new self("The DQL alias '" . $dqlAlias . "' contains an entity " .
42
-            'of an inheritance hierarchy with an empty discriminator value. This means ' .
43
-            'that the database contains inconsistent data with an empty ' .
41
+        return new self("The DQL alias '".$dqlAlias."' contains an entity ".
42
+            'of an inheritance hierarchy with an empty discriminator value. This means '.
43
+            'that the database contains inconsistent data with an empty '.
44 44
             'discriminator value in a table row.');
45 45
     }
46 46
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/TableMetadataExporter.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Mapping\Exporter;
6 6
 
@@ -18,24 +18,24 @@  discard block
 block discarded – undo
18 18
         /** @var TableMetadata $value */
19 19
         $variableExporter = new VariableExporter();
20 20
         $indentation      = str_repeat(self::INDENTATION, $indentationLevel);
21
-        $objectReference  = $indentation . static::VARIABLE;
21
+        $objectReference  = $indentation.static::VARIABLE;
22 22
         $lines            = [];
23 23
 
24
-        $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value);
24
+        $lines[] = $objectReference.' = '.$this->exportInstantiation($value);
25 25
 
26
-        if (! empty($value->getSchema())) {
27
-            $lines[] = $objectReference . '->setSchema("' . $value->getSchema() . '");';
26
+        if ( ! empty($value->getSchema())) {
27
+            $lines[] = $objectReference.'->setSchema("'.$value->getSchema().'");';
28 28
         }
29 29
 
30 30
         foreach ($value->getIndexes() as $index) {
31
-            $lines[] = $objectReference . '->addIndex(' . ltrim($variableExporter->export($index, $indentationLevel + 1)) . ');';
31
+            $lines[] = $objectReference.'->addIndex('.ltrim($variableExporter->export($index, $indentationLevel + 1)).');';
32 32
         }
33 33
 
34 34
         foreach ($value->getUniqueConstraints() as $uniqueConstraint) {
35
-            $lines[] = $objectReference . '->addUniqueConstraint(' . ltrim($variableExporter->export($uniqueConstraint, $indentationLevel + 1)) . ');';
35
+            $lines[] = $objectReference.'->addUniqueConstraint('.ltrim($variableExporter->export($uniqueConstraint, $indentationLevel + 1)).');';
36 36
         }
37 37
 
38
-        $lines[] = $objectReference . '->setOptions(' . ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)) . ');';
38
+        $lines[] = $objectReference.'->setOptions('.ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)).');';
39 39
 
40 40
         return implode(PHP_EOL, $lines);
41 41
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/AssociationMetadataExporter.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Mapping\Exporter;
6 6
 
@@ -19,33 +19,33 @@  discard block
 block discarded – undo
19 19
         $cacheExporter    = new CacheMetadataExporter();
20 20
         $variableExporter = new VariableExporter();
21 21
         $indentation      = str_repeat(self::INDENTATION, $indentationLevel);
22
-        $objectReference  = $indentation . static::VARIABLE;
22
+        $objectReference  = $indentation.static::VARIABLE;
23 23
         $cascade          = $this->resolveCascade($value->getCascade());
24 24
         $lines            = [];
25 25
 
26
-        $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value);
26
+        $lines[] = $objectReference.' = '.$this->exportInstantiation($value);
27 27
 
28
-        if (! empty($value->getCache())) {
28
+        if ( ! empty($value->getCache())) {
29 29
             $lines[] = $cacheExporter->export($value->getCache(), $indentationLevel);
30 30
             $lines[] = null;
31
-            $lines[] = $objectReference . '->setCache(' . $cacheExporter::VARIABLE . ');';
31
+            $lines[] = $objectReference.'->setCache('.$cacheExporter::VARIABLE.');';
32 32
         }
33 33
 
34
-        if (! empty($value->getMappedBy())) {
35
-            $lines[] = $objectReference . '->setMappedBy("' . $value->getMappedBy() . '");';
34
+        if ( ! empty($value->getMappedBy())) {
35
+            $lines[] = $objectReference.'->setMappedBy("'.$value->getMappedBy().'");';
36 36
         }
37 37
 
38
-        if (! empty($value->getInversedBy())) {
39
-            $lines[] = $objectReference . '->setInversedBy("' . $value->getInversedBy() . '");';
38
+        if ( ! empty($value->getInversedBy())) {
39
+            $lines[] = $objectReference.'->setInversedBy("'.$value->getInversedBy().'");';
40 40
         }
41 41
 
42
-        $lines[] = $objectReference . '->setSourceEntity("' . $value->getSourceEntity() . '");';
43
-        $lines[] = $objectReference . '->setTargetEntity("' . $value->getTargetEntity() . '");';
44
-        $lines[] = $objectReference . '->setFetchMode(Mapping\FetchMode::' . strtoupper($value->getFetchMode()) . '");';
45
-        $lines[] = $objectReference . '->setCascade(' . $variableExporter->export($cascade, $indentationLevel + 1) . ');';
46
-        $lines[] = $objectReference . '->setOwningSide(' . $variableExporter->export($value->isOwningSide(), $indentationLevel + 1) . ');';
47
-        $lines[] = $objectReference . '->setOrphanRemoval(' . $variableExporter->export($value->isOrphanRemoval(), $indentationLevel + 1) . ');';
48
-        $lines[] = $objectReference . '->setPrimaryKey(' . $variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1) . ');';
42
+        $lines[] = $objectReference.'->setSourceEntity("'.$value->getSourceEntity().'");';
43
+        $lines[] = $objectReference.'->setTargetEntity("'.$value->getTargetEntity().'");';
44
+        $lines[] = $objectReference.'->setFetchMode(Mapping\FetchMode::'.strtoupper($value->getFetchMode()).'");';
45
+        $lines[] = $objectReference.'->setCascade('.$variableExporter->export($cascade, $indentationLevel + 1).');';
46
+        $lines[] = $objectReference.'->setOwningSide('.$variableExporter->export($value->isOwningSide(), $indentationLevel + 1).');';
47
+        $lines[] = $objectReference.'->setOrphanRemoval('.$variableExporter->export($value->isOrphanRemoval(), $indentationLevel + 1).');';
48
+        $lines[] = $objectReference.'->setPrimaryKey('.$variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1).');';
49 49
 
50 50
         return implode(PHP_EOL, $lines);
51 51
     }
Please login to merge, or discard this patch.