Failed Conditions
Pull Request — master (#7242)
by Gabriel
08:46
created
lib/Doctrine/ORM/Sequencing/Planning/SingleValueGenerationPlan.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
     public function executeDeferred(EntityManagerInterface $entityManager, object $entity) : void
35 35
     {
36
-        if (! $this->executor->isDeferred()) {
36
+        if ( ! $this->executor->isDeferred()) {
37 37
             return;
38 38
         }
39 39
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/SchemaValidator.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         foreach ($classes as $class) {
62 62
             $ce = $this->validateClass($class);
63 63
 
64
-            if (! $ce) {
64
+            if ( ! $ce) {
65 65
                 continue;
66 66
             }
67 67
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $ce = [];
82 82
 
83 83
         foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $association) {
84
-            if (! ($association instanceof AssociationMetadata)) {
84
+            if ( ! ($association instanceof AssociationMetadata)) {
85 85
                 continue;
86 86
             }
87 87
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $fieldName       = $association->getName();
111 111
         $targetEntity    = $association->getTargetEntity();
112 112
 
113
-        if (! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) {
113
+        if ( ! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) {
114 114
             $message = "The target entity '%s' specified on %s#%s is unknown or not an entity.";
115 115
 
116 116
             return [sprintf($message, $targetEntity, $class->getClassName(), $fieldName)];
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         /** @var ClassMetadata $targetMetadata */
131 131
         $targetMetadata    = $metadataFactory->getMetadataFor($targetEntity);
132
-        $containsForeignId = array_filter($targetMetadata->identifier, function ($identifier) use ($targetMetadata) {
132
+        $containsForeignId = array_filter($targetMetadata->identifier, function($identifier) use ($targetMetadata) {
133 133
             $targetProperty = $targetMetadata->getProperty($identifier);
134 134
 
135 135
             return $targetProperty instanceof AssociationMetadata;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             /** @var AssociationMetadata $targetAssociation */
146 146
             $targetAssociation = $targetMetadata->getProperty($mappedBy);
147 147
 
148
-            if (! $targetAssociation) {
148
+            if ( ! $targetAssociation) {
149 149
                 $message = 'The association %s#%s refers to the owning side property %s#%s which does not exist.';
150 150
 
151 151
                 $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $mappedBy);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             /** @var AssociationMetadata $targetAssociation */
170 170
             $targetAssociation = $targetMetadata->getProperty($inversedBy);
171 171
 
172
-            if (! $targetAssociation) {
172
+            if ( ! $targetAssociation) {
173 173
                 $message = 'The association %s#%s refers to the inverse side property %s#%s which does not exist.';
174 174
 
175 175
                 $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $inversedBy);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                 $joinTable               = $association->getJoinTable();
214 214
 
215 215
                 foreach ($joinTable->getJoinColumns() as $joinColumn) {
216
-                    if (! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) {
216
+                    if ( ! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) {
217 217
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
218 218
 
219 219
                         $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $class->getClassName());
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                 }
223 223
 
224 224
                 foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) {
225
-                    if (! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) {
225
+                    if ( ! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) {
226 226
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
227 227
 
228 228
                         $ce[] = sprintf($message, $inverseJoinColumn->getReferencedColumnName(), $targetMetadata->getClassName());
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
                 if (count($targetIdentifierColumns) !== count($joinTable->getInverseJoinColumns())) {
234 234
                     $columnNames = array_map(
235
-                        function (JoinColumnMetadata $joinColumn) {
235
+                        function(JoinColumnMetadata $joinColumn) {
236 236
                             return $joinColumn->getReferencedColumnName();
237 237
                         },
238 238
                         $joinTable->getInverseJoinColumns()
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
                 if (count($classIdentifierColumns) !== count($joinTable->getJoinColumns())) {
249 249
                     $columnNames = array_map(
250
-                        function (JoinColumnMetadata $joinColumn) {
250
+                        function(JoinColumnMetadata $joinColumn) {
251 251
                             return $joinColumn->getReferencedColumnName();
252 252
                         },
253 253
                         $joinTable->getJoinColumns()
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                     continue;
298 298
                 }
299 299
 
300
-                if (! ($targetProperty instanceof AssociationMetadata)) {
300
+                if ( ! ($targetProperty instanceof AssociationMetadata)) {
301 301
                     $message = "The association %s#%s is ordered by a property '%s' that is non-existing field on the target entity '%s'.";
302 302
 
303 303
                     $ce[] = sprintf($message, $class->getClassName(), $fieldName, $orderField, $targetMetadata->getClassName());
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/Paginator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
         /** @var Query $countQuery */
222 222
         $countQuery = $this->cloneQuery($this->query);
223 223
 
224
-        if (! $countQuery->hasHint(CountWalker::HINT_DISTINCT)) {
224
+        if ( ! $countQuery->hasHint(CountWalker::HINT_DISTINCT)) {
225 225
             $countQuery->setHint(CountWalker::HINT_DISTINCT, true);
226 226
         }
227 227
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
         // Rebuild string orderby expressions to use the select expression they're referencing
141 141
         foreach ($orderByClause->orderByItems as $orderByItem) {
142
-            if (! is_string($orderByItem->expression) || ! isset($selectAliasToExpressionMap[$orderByItem->expression])) {
142
+            if ( ! is_string($orderByItem->expression) || ! isset($selectAliasToExpressionMap[$orderByItem->expression])) {
143 143
                 continue;
144 144
             }
145 145
 
@@ -193,13 +193,13 @@  discard block
 block discarded – undo
193 193
 
194 194
         $innerSql           = $this->getInnerSQL($AST);
195 195
         $sqlIdentifier      = $this->getSQLIdentifier($AST);
196
-        $sqlAliasIdentifier = array_map(function ($info) {
196
+        $sqlAliasIdentifier = array_map(function($info) {
197 197
             return $info['alias'];
198 198
         }, $sqlIdentifier);
199 199
 
200 200
         if ($hasOrderBy) {
201
-            $orderGroupBy = ' GROUP BY ' . implode(', ', $sqlAliasIdentifier);
202
-            $sqlPiece     = 'MIN(' . $this->walkResultVariable('dctrn_rownum') . ') AS dctrn_minrownum';
201
+            $orderGroupBy = ' GROUP BY '.implode(', ', $sqlAliasIdentifier);
202
+            $sqlPiece     = 'MIN('.$this->walkResultVariable('dctrn_rownum').') AS dctrn_minrownum';
203 203
 
204 204
             $sqlAliasIdentifier[] = $sqlPiece;
205 205
             $sqlIdentifier[]      = [
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $sql = sprintf('SELECT DISTINCT %s FROM (%s) dctrn_result', implode(', ', $sqlAliasIdentifier), $innerSql);
213 213
 
214 214
         if ($hasOrderBy) {
215
-            $sql .= $orderGroupBy . $outerOrderBy;
215
+            $sql .= $orderGroupBy.$outerOrderBy;
216 216
         }
217 217
 
218 218
         // Apply the limit and offset.
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
         $innerSql           = $this->getInnerSQL($AST);
258 258
         $sqlIdentifier      = $this->getSQLIdentifier($AST);
259
-        $sqlAliasIdentifier = array_map(function ($info) {
259
+        $sqlAliasIdentifier = array_map(function($info) {
260 260
             return $info['alias'];
261 261
         }, $sqlIdentifier);
262 262
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
             $idVar = $pathExpression->identificationVariable;
315 315
             $field = $pathExpression->field;
316 316
 
317
-            if (! isset($selects[$idVar])) {
317
+            if ( ! isset($selects[$idVar])) {
318 318
                 $selects[$idVar] = [];
319 319
             }
320 320
 
@@ -324,13 +324,13 @@  discard block
 block discarded – undo
324 324
         // Loop the select clause of the AST and exclude items from $select
325 325
         // that are already being selected in the query.
326 326
         foreach ($AST->selectClause->selectExpressions as $selectExpression) {
327
-            if (! ($selectExpression instanceof SelectExpression)) {
327
+            if ( ! ($selectExpression instanceof SelectExpression)) {
328 328
                 continue;
329 329
             }
330 330
 
331 331
             $idVar = $selectExpression->expression;
332 332
 
333
-            if (! is_string($idVar)) {
333
+            if ( ! is_string($idVar)) {
334 334
                 continue;
335 335
             }
336 336
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         ?OrderByClause $orderByClause
365 365
     ) : string {
366 366
         // If the sql statement has an order by clause, we need to wrap it in a new select distinct statement
367
-        if (! $orderByClause) {
367
+        if ( ! $orderByClause) {
368 368
             return $sql;
369 369
         }
370 370
 
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
      */
562 562
     public function walkPathExpression($pathExpr)
563 563
     {
564
-        if (! $this->inSubSelect && ! $this->platformSupportsRowNumber() && ! in_array($pathExpr, $this->orderByPathExpressions, true)) {
564
+        if ( ! $this->inSubSelect && ! $this->platformSupportsRowNumber() && ! in_array($pathExpr, $this->orderByPathExpressions, true)) {
565 565
             $this->orderByPathExpressions[] = $pathExpr;
566 566
         }
567 567
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         if ($property instanceof AssociationMetadata) {
55 55
             throw new \RuntimeException(
56
-                'Paginating an entity with foreign key as identifier only works when using the Output Walkers. ' .
56
+                'Paginating an entity with foreign key as identifier only works when using the Output Walkers. '.
57 57
                 'Call Paginator#setUseOutputWalkers(true) before iterating the paginator.'
58 58
             );
59 59
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $AST->selectClause->selectExpressions = [new SelectExpression($pathExpression, '_dctrn_id')];
72 72
         $AST->selectClause->isDistinct        = true;
73 73
 
74
-        if (! isset($AST->orderByClause)) {
74
+        if ( ! isset($AST->orderByClause)) {
75 75
             return;
76 76
         }
77 77
 
@@ -79,19 +79,19 @@  discard block
 block discarded – undo
79 79
             if ($item->expression instanceof PathExpression) {
80 80
                 $AST->selectClause->selectExpressions[] = new SelectExpression(
81 81
                     $this->createSelectExpressionItem($item->expression),
82
-                    '_dctrn_ord' . $this->aliasCounter++
82
+                    '_dctrn_ord'.$this->aliasCounter++
83 83
                 );
84 84
 
85 85
                 continue;
86 86
             }
87 87
 
88
-            if (! is_string($item->expression) || ! isset($queryComponents[$item->expression])) {
88
+            if ( ! is_string($item->expression) || ! isset($queryComponents[$item->expression])) {
89 89
                 continue;
90 90
             }
91 91
 
92 92
             $qComp = $queryComponents[$item->expression];
93 93
 
94
-            if (! isset($qComp['resultVariable'])) {
94
+            if ( ! isset($qComp['resultVariable'])) {
95 95
                 continue;
96 96
             }
97 97
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $from            = $AST->fromClause->identificationVariableDeclarations;
116 116
         $fromRoot        = reset($from);
117 117
 
118
-        if (! ($query instanceof Query) || ! $query->getMaxResults() || ! $AST->orderByClause || ! count($fromRoot->joins)) {
118
+        if ( ! ($query instanceof Query) || ! $query->getMaxResults() || ! $AST->orderByClause || ! count($fromRoot->joins)) {
119 119
             return;
120 120
         }
121 121
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         foreach ($AST->orderByClause->orderByItems as $orderByItem) {
125 125
             $expression = $orderByItem->expression;
126 126
 
127
-            if (! ($expression instanceof PathExpression) || ! isset($queryComponents[$expression->identificationVariable])) {
127
+            if ( ! ($expression instanceof PathExpression) || ! isset($queryComponents[$expression->identificationVariable])) {
128 128
                 continue;
129 129
             }
130 130
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function onClassMetadataNotFound(OnClassMetadataNotFoundEventArgs $args)
54 54
     {
55
-        if (! array_key_exists($args->getClassName(), $this->resolveTargetEntities)) {
55
+        if ( ! array_key_exists($args->getClassName(), $this->resolveTargetEntities)) {
56 56
             return;
57 57
         }
58 58
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $class = $args->getClassMetadata();
74 74
 
75 75
         foreach ($class->discriminatorMap as $key => $className) {
76
-            if (! isset($this->resolveTargetEntities[$className])) {
76
+            if ( ! isset($this->resolveTargetEntities[$className])) {
77 77
                 continue;
78 78
             }
79 79
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         }
84 84
 
85 85
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
86
-            if (! ($association instanceof AssociationMetadata) ||
86
+            if ( ! ($association instanceof AssociationMetadata) ||
87 87
                 ! isset($this->resolveTargetEntities[$association->getTargetEntity()])) {
88 88
                 continue;
89 89
             }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/SchemaTool.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                     $pkColumns = [];
177 177
 
178 178
                     foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) {
179
-                        if (! ($property instanceof FieldMetadata)) {
179
+                        if ( ! ($property instanceof FieldMetadata)) {
180 180
                             continue;
181 181
                         }
182 182
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
                         $this->gatherColumn($class, $property, $table);
190 190
 
191
-                        if (! $class->isIdentifier($fieldName)) {
191
+                        if ( ! $class->isIdentifier($fieldName)) {
192 192
                             continue;
193 193
                         }
194 194
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                         foreach ($class->identifier as $identifierField) {
208 208
                             $idProperty = $class->getProperty($identifierField);
209 209
 
210
-                            if (! $class->isInheritedProperty($identifierField)) {
210
+                            if ( ! $class->isInheritedProperty($identifierField)) {
211 211
                                 continue;
212 212
                             }
213 213
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                             $inheritedKeyColumns[] = $columnName;
222 222
                         }
223 223
 
224
-                        if (! empty($inheritedKeyColumns)) {
224
+                        if ( ! empty($inheritedKeyColumns)) {
225 225
                             // Add a FK constraint on the ID column
226 226
                             $rootClass = $this->em->getClassMetadata($class->getRootClassName());
227 227
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
                     continue;
260 260
                 }
261 261
 
262
-                if (! ($property instanceof ToOneAssociationMetadata)) {
262
+                if ( ! ($property instanceof ToOneAssociationMetadata)) {
263 263
                     continue;
264 264
                 }
265 265
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
                 }
269 269
             }
270 270
 
271
-            if (! $table->hasIndex('primary')) {
271
+            if ( ! $table->hasIndex('primary')) {
272 272
                 $table->setPrimaryKey($pkColumns);
273 273
             }
274 274
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             $primaryKey = $table->getIndex('primary');
279 279
 
280 280
             foreach ($table->getIndexes() as $idxKey => $existingIndex) {
281
-                if (! $primaryKey->overrules($existingIndex)) {
281
+                if ( ! $primaryKey->overrules($existingIndex)) {
282 282
                     continue;
283 283
                 }
284 284
 
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
             $processedClasses[$class->getClassName()] = true;
331 331
 
332 332
             foreach ($class->getDeclaredPropertiesIterator() as $property) {
333
-                if (! $property instanceof FieldMetadata
333
+                if ( ! $property instanceof FieldMetadata
334 334
                     || ! $property->hasValueGenerator()
335 335
                     || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE
336 336
                     || $class->getClassName() !== $class->getRootClassName()) {
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
                 $schema->createSequence($quotedName, $property->getValueGenerator()->getDefinition()['allocationSize']);
347 347
             }
348 348
 
349
-            if (! $eventManager->hasListeners(ToolEvents::postGenerateSchemaTable)) {
349
+            if ( ! $eventManager->hasListeners(ToolEvents::postGenerateSchemaTable)) {
350 350
                 continue;
351 351
             }
352 352
 
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             );
357 357
         }
358 358
 
359
-        if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) {
359
+        if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) {
360 360
             $schema->visit(new RemoveNamespacedAssets());
361 361
         }
362 362
 
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
                 break;
396 396
         }
397 397
 
398
-        if (! empty($discrColumn->getColumnDefinition())) {
398
+        if ( ! empty($discrColumn->getColumnDefinition())) {
399 399
             $options['columnDefinition'] = $discrColumn->getColumnDefinition();
400 400
         }
401 401
 
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
         $pkColumns = [];
414 414
 
415 415
         foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) {
416
-            if (! ($property instanceof FieldMetadata)) {
416
+            if ( ! ($property instanceof FieldMetadata)) {
417 417
                 continue;
418 418
             }
419 419
 
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 
424 424
             $this->gatherColumn($class, $property, $table);
425 425
 
426
-            if (! $property->isPrimaryKey()) {
426
+            if ( ! $property->isPrimaryKey()) {
427 427
                 continue;
428 428
             }
429 429
 
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
             $knownOptions = ['comment', 'unsigned', 'fixed', 'default'];
480 480
 
481 481
             foreach ($knownOptions as $knownOption) {
482
-                if (! array_key_exists($knownOption, $fieldOptions)) {
482
+                if ( ! array_key_exists($knownOption, $fieldOptions)) {
483 483
                     continue;
484 484
                 }
485 485
 
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
     private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks)
533 533
     {
534 534
         foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) {
535
-            if (! ($property instanceof AssociationMetadata)) {
535
+            if ( ! ($property instanceof AssociationMetadata)) {
536 536
                 continue;
537 537
             }
538 538
 
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
                 continue;
541 541
             }
542 542
 
543
-            if (! $property->isOwningSide()) {
543
+            if ( ! $property->isOwningSide()) {
544 544
                 continue;
545 545
             }
546 546
 
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
         $idColumns        = $class->getIdentifierColumns($this->em);
631 631
         $idColumnNameList = array_keys($idColumns);
632 632
 
633
-        if (! in_array($referencedColumnName, $idColumnNameList, true)) {
633
+        if ( ! in_array($referencedColumnName, $idColumnNameList, true)) {
634 634
             return null;
635 635
         }
636 636
 
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
         foreach ($class->getIdentifierFieldNames() as $fieldName) {
639 639
             $property = $class->getProperty($fieldName);
640 640
 
641
-            if (! ($property instanceof AssociationMetadata)) {
641
+            if ( ! ($property instanceof AssociationMetadata)) {
642 642
                 continue;
643 643
             }
644 644
 
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
                 $joinColumn->getReferencedColumnName()
695 695
             );
696 696
 
697
-            if (! $definingClass) {
697
+            if ( ! $definingClass) {
698 698
                 throw MissingColumnException::fromColumnSourceAndTarget(
699 699
                     $joinColumn->getReferencedColumnName(),
700 700
                     $mapping->getSourceEntity(),
@@ -709,14 +709,14 @@  discard block
 block discarded – undo
709 709
             $localColumns[]      = $quotedColumnName;
710 710
             $foreignColumns[]    = $quotedReferencedColumnName;
711 711
 
712
-            if (! $theJoinTable->hasColumn($quotedColumnName)) {
712
+            if ( ! $theJoinTable->hasColumn($quotedColumnName)) {
713 713
                 // Only add the column to the table if it does not exist already.
714 714
                 // It might exist already if the foreign key is mapped into a regular
715 715
                 // property as well.
716 716
                 $property  = $definingClass->getProperty($referencedFieldName);
717 717
                 $columnDef = null;
718 718
 
719
-                if (! empty($joinColumn->getColumnDefinition())) {
719
+                if ( ! empty($joinColumn->getColumnDefinition())) {
720 720
                     $columnDef = $joinColumn->getColumnDefinition();
721 721
                 } elseif ($property->getColumnDefinition()) {
722 722
                     $columnDef = $property->getColumnDefinition();
@@ -763,7 +763,7 @@  discard block
 block discarded – undo
763 763
             $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName);
764 764
         }
765 765
 
766
-        $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns);
766
+        $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns);
767 767
 
768 768
         if (isset($addedFks[$compositeName])
769 769
             && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName']
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
             }
781 781
 
782 782
             $blacklistedFks[$compositeName] = true;
783
-        } elseif (! isset($blacklistedFks[$compositeName])) {
783
+        } elseif ( ! isset($blacklistedFks[$compositeName])) {
784 784
             $addedFks[$compositeName] = [
785 785
                 'foreignTableName' => $foreignTableName,
786 786
                 'foreignColumns'   => $foreignColumns,
@@ -862,10 +862,10 @@  discard block
 block discarded – undo
862 862
         $fullSchema = $sm->createSchema();
863 863
 
864 864
         foreach ($fullSchema->getTables() as $table) {
865
-            if (! $schema->hasTable($table->getName())) {
865
+            if ( ! $schema->hasTable($table->getName())) {
866 866
                 foreach ($table->getForeignKeys() as $foreignKey) {
867 867
                     /** @var $foreignKey \Doctrine\DBAL\Schema\ForeignKeyConstraint */
868
-                    if (! $schema->hasTable($foreignKey->getForeignTableName())) {
868
+                    if ( ! $schema->hasTable($foreignKey->getForeignTableName())) {
869 869
                         continue;
870 870
                     }
871 871
 
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
 
887 887
             foreach ($schema->getTables() as $table) {
888 888
                 /** @var $sequence Table */
889
-                if (! $table->hasPrimaryKey()) {
889
+                if ( ! $table->hasPrimaryKey()) {
890 890
                     continue;
891 891
                 }
892 892
 
@@ -895,8 +895,8 @@  discard block
 block discarded – undo
895 895
                     continue;
896 896
                 }
897 897
 
898
-                $checkSequence = $table->getName() . '_' . $columns[0] . '_seq';
899
-                if (! $fullSchema->hasSequence($checkSequence)) {
898
+                $checkSequence = $table->getName().'_'.$columns[0].'_seq';
899
+                if ( ! $fullSchema->hasSequence($checkSequence)) {
900 900
                     continue;
901 901
                 }
902 902
 
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
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
                 // It's a joined result
86 86
 
87 87
                 $parent = $this->rsm->parentAliasMap[$dqlAlias];
88
-                $path   = $parent . '.' . $dqlAlias;
88
+                $path   = $parent.'.'.$dqlAlias;
89 89
 
90 90
                 // missing parent data, skipping as RIGHT JOIN hydration is not supported.
91
-                if (! isset($nonemptyComponents[$parent])) {
91
+                if ( ! isset($nonemptyComponents[$parent])) {
92 92
                     continue;
93 93
                 }
94 94
 
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
                 if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) {
98 98
                     $first = reset($this->resultPointers);
99 99
                     // TODO: Exception if $key === null ?
100
-                    $baseElement =& $this->resultPointers[$parent][key($first)];
100
+                    $baseElement = & $this->resultPointers[$parent][key($first)];
101 101
                 } elseif (isset($this->resultPointers[$parent])) {
102
-                    $baseElement =& $this->resultPointers[$parent];
102
+                    $baseElement = & $this->resultPointers[$parent];
103 103
                 } else {
104 104
                     unset($this->resultPointers[$dqlAlias]); // Ticket #1228
105 105
 
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
                 $relation      = $parentClass->getProperty($relationAlias);
112 112
 
113 113
                 // Check the type of the relation (many or single-valued)
114
-                if (! $relation instanceof ToOneAssociationMetadata) {
114
+                if ( ! $relation instanceof ToOneAssociationMetadata) {
115 115
                     $oneToOne = false;
116 116
 
117
-                    if (! isset($baseElement[$relationAlias])) {
117
+                    if ( ! isset($baseElement[$relationAlias])) {
118 118
                         $baseElement[$relationAlias] = [];
119 119
                     }
120 120
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         $index        = $indexExists ? $this->identifierMap[$path][$id[$parent]][$id[$dqlAlias]] : false;
124 124
                         $indexIsValid = $index !== false ? isset($baseElement[$relationAlias][$index]) : false;
125 125
 
126
-                        if (! $indexExists || ! $indexIsValid) {
126
+                        if ( ! $indexExists || ! $indexIsValid) {
127 127
                             $element = $data;
128 128
 
129 129
                             if (isset($this->rsm->indexByMap[$dqlAlias])) {
@@ -144,12 +144,12 @@  discard block
 block discarded – undo
144 144
                         ( ! isset($baseElement[$relationAlias]))
145 145
                     ) {
146 146
                         $baseElement[$relationAlias] = null;
147
-                    } elseif (! isset($baseElement[$relationAlias])) {
147
+                    } elseif ( ! isset($baseElement[$relationAlias])) {
148 148
                         $baseElement[$relationAlias] = $data;
149 149
                     }
150 150
                 }
151 151
 
152
-                $coll =& $baseElement[$relationAlias];
152
+                $coll = & $baseElement[$relationAlias];
153 153
 
154 154
                 if (is_array($coll)) {
155 155
                     $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 $entityKey                    = $this->rsm->entityMappings[$dqlAlias] ?: 0;
162 162
 
163 163
                 // if this row has a NULL value for the root result id then make it a null result.
164
-                if (! isset($nonemptyComponents[$dqlAlias])) {
164
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
165 165
                     $result[] = $this->rsm->isMixed
166 166
                         ? [$entityKey => null]
167 167
                         : null;
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
             }
199 199
         }
200 200
 
201
-        if (! isset($resultKey)) {
201
+        if ( ! isset($resultKey)) {
202 202
             $this->resultCounter++;
203 203
         }
204 204
 
205 205
         // Append scalar values to mixed result sets
206 206
         if (isset($rowData['scalars'])) {
207
-            if (! isset($resultKey)) {
207
+            if ( ! isset($resultKey)) {
208 208
                 // this only ever happens when no object is fetched (scalar result only)
209 209
                 $resultKey = isset($this->rsm->indexByMap['scalars'])
210 210
                     ? $row[$this->rsm->indexByMap['scalars']]
@@ -217,11 +217,11 @@  discard block
 block discarded – undo
217 217
         }
218 218
 
219 219
         // Append new object to mixed result sets
220
-        if (! isset($rowData['newObjects'])) {
220
+        if ( ! isset($rowData['newObjects'])) {
221 221
             return;
222 222
         }
223 223
 
224
-        if (! isset($resultKey)) {
224
+        if ( ! isset($resultKey)) {
225 225
             $resultKey = $this->resultCounter - 1;
226 226
         }
227 227
 
@@ -262,22 +262,22 @@  discard block
 block discarded – undo
262 262
         }
263 263
 
264 264
         if ($oneToOne) {
265
-            $this->resultPointers[$dqlAlias] =& $coll;
265
+            $this->resultPointers[$dqlAlias] = & $coll;
266 266
 
267 267
             return;
268 268
         }
269 269
 
270 270
         if ($index !== false) {
271
-            $this->resultPointers[$dqlAlias] =& $coll[$index];
271
+            $this->resultPointers[$dqlAlias] = & $coll[$index];
272 272
 
273 273
             return;
274 274
         }
275 275
 
276
-        if (! $coll) {
276
+        if ( ! $coll) {
277 277
             return;
278 278
         }
279 279
 
280 280
         end($coll);
281
-        $this->resultPointers[$dqlAlias] =& $coll[key($coll)];
281
+        $this->resultPointers[$dqlAlias] = & $coll[key($coll)];
282 282
     }
283 283
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 $discrColumnName = $metaMappingDiscrColumnName;
84 84
             }
85 85
 
86
-            if (! isset($sqlResult[$discrColumnName])) {
86
+            if ( ! isset($sqlResult[$discrColumnName])) {
87 87
                 throw HydrationException::missingDiscriminatorColumn($entityName, $discrColumnName, key($this->rsm->aliasMap));
88 88
             }
89 89
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
             $discrMap = $this->class->discriminatorMap;
95 95
 
96
-            if (! isset($discrMap[$sqlResult[$discrColumnName]])) {
96
+            if ( ! isset($discrMap[$sqlResult[$discrColumnName]])) {
97 97
                 throw HydrationException::invalidDiscriminatorValue($sqlResult[$discrColumnName], array_keys($discrMap));
98 98
             }
99 99
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
             $cacheKeyInfo = $this->hydrateColumnInfo($column);
112 112
 
113
-            if (! $cacheKeyInfo) {
113
+            if ( ! $cacheKeyInfo) {
114 114
                 continue;
115 115
             }
116 116
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         $result[] = $entity;
140 140
 
141
-        if (! isset($this->hints[Query::HINT_INTERNAL_ITERATION]) || ! $this->hints[Query::HINT_INTERNAL_ITERATION]) {
141
+        if ( ! isset($this->hints[Query::HINT_INTERNAL_ITERATION]) || ! $this->hints[Query::HINT_INTERNAL_ITERATION]) {
142 142
             return;
143 143
         }
144 144
 
Please login to merge, or discard this patch.