Failed Conditions
Push — master ( a3e53b...559253 )
by Guilherme
14:58
created
lib/Doctrine/ORM/Mapping/ClassMetadata.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
             $this->setCache(clone $parent->cache);
220 220
         }
221 221
 
222
-        if (! empty($parent->lifecycleCallbacks)) {
222
+        if ( ! empty($parent->lifecycleCallbacks)) {
223 223
             $this->lifecycleCallbacks = $parent->lifecycleCallbacks;
224 224
         }
225 225
 
226
-        if (! empty($parent->entityListeners)) {
226
+        if ( ! empty($parent->entityListeners)) {
227 227
             $this->entityListeners = $parent->entityListeners;
228 228
         }
229 229
     }
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      */
280 280
     public function __toString()
281 281
     {
282
-        return self::class . '@' . spl_object_id($this);
282
+        return self::class.'@'.spl_object_id($this);
283 283
     }
284 284
 
285 285
     /**
@@ -375,11 +375,11 @@  discard block
 block discarded – undo
375 375
      */
376 376
     public function isIdentifier(string $fieldName) : bool
377 377
     {
378
-        if (! $this->identifier) {
378
+        if ( ! $this->identifier) {
379 379
             return false;
380 380
         }
381 381
 
382
-        if (! $this->isIdentifierComposite()) {
382
+        if ( ! $this->isIdentifierComposite()) {
383 383
             return $fieldName === $this->identifier[0];
384 384
         }
385 385
 
@@ -403,11 +403,11 @@  discard block
 block discarded – undo
403 403
         }
404 404
 
405 405
         // Verify & complete identifier mapping
406
-        if (! $this->identifier) {
406
+        if ( ! $this->identifier) {
407 407
             throw MappingException::identifierRequired($this->className);
408 408
         }
409 409
 
410
-        $explicitlyGeneratedProperties = array_filter($this->properties, static function (Property $property) : bool {
410
+        $explicitlyGeneratedProperties = array_filter($this->properties, static function(Property $property) : bool {
411 411
             return $property instanceof FieldMetadata
412 412
                 && $property->isPrimaryKey()
413 413
                 && $property->hasValueGenerator();
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
         foreach ($this->lifecycleCallbacks as $callbacks) {
429 429
             /** @var array $callbacks */
430 430
             foreach ($callbacks as $callbackFuncName) {
431
-                if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
431
+                if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
432 432
                     throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName);
433 433
                 }
434 434
             }
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
             throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className);
458 458
         }
459 459
 
460
-        if (! isset($this->identifier[0])) {
460
+        if ( ! isset($this->identifier[0])) {
461 461
             throw MappingException::noIdDefined($this->className);
462 462
         }
463 463
 
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
             // Association defined as Id field
517 517
             $targetClass = $em->getClassMetadata($property->getTargetEntity());
518 518
 
519
-            if (! $property->isOwningSide()) {
519
+            if ( ! $property->isOwningSide()) {
520 520
                 $property = $targetClass->getProperty($property->getMappedBy());
521 521
             }
522 522
 
@@ -556,10 +556,10 @@  discard block
 block discarded – undo
556 556
     {
557 557
         $schema = $this->getSchemaName() === null
558 558
             ? ''
559
-            : $this->getSchemaName() . '_';
559
+            : $this->getSchemaName().'_';
560 560
 
561 561
         // replace dots with underscores because PostgreSQL creates temporary tables in a special schema
562
-        return $schema . $this->getTableName() . '_id_tmp';
562
+        return $schema.$this->getTableName().'_id_tmp';
563 563
     }
564 564
 
565 565
     /**
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
      */
594 594
     public function setInheritanceType($type) : void
595 595
     {
596
-        if (! $this->isInheritanceType($type)) {
596
+        if ( ! $this->isInheritanceType($type)) {
597 597
             throw MappingException::invalidInheritanceType($this->className, $type);
598 598
         }
599 599
 
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
     {
612 612
         $fieldName = $property->getName();
613 613
 
614
-        if (! isset($this->properties[$fieldName])) {
614
+        if ( ! isset($this->properties[$fieldName])) {
615 615
             throw MappingException::invalidOverrideFieldName($this->className, $fieldName);
616 616
         }
617 617
 
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
         $inheritedProperty = $declaringClass->isMappedSuperclass ? clone $property : $property;
828 828
 
829 829
         if ($inheritedProperty instanceof FieldMetadata) {
830
-            if (! $declaringClass->isMappedSuperclass) {
830
+            if ( ! $declaringClass->isMappedSuperclass) {
831 831
                 $inheritedProperty->setTableName($property->getTableName());
832 832
             }
833 833
 
@@ -920,11 +920,11 @@  discard block
 block discarded – undo
920 920
             'method' => $methodName,
921 921
         ];
922 922
 
923
-        if (! class_exists($class)) {
923
+        if ( ! class_exists($class)) {
924 924
             throw MappingException::entityListenerClassNotFound($class, $this->className);
925 925
         }
926 926
 
927
-        if (! method_exists($class, $methodName)) {
927
+        if ( ! method_exists($class, $methodName)) {
928 928
             throw MappingException::entityListenerMethodNotFound($class, $methodName, $this->className);
929 929
         }
930 930
 
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
             return;
993 993
         }
994 994
 
995
-        if (! (class_exists($className) || interface_exists($className))) {
995
+        if ( ! (class_exists($className) || interface_exists($className))) {
996 996
             throw MappingException::invalidClassInDiscriminatorMap($className, $this->className);
997 997
         }
998 998
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Builder/EmbeddedMetadataBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $embeddedMetadata->setSourceEntity($componentClassName);
80 80
         $embeddedMetadata->setTargetEntity($this->getTargetEmbedded($this->embeddedAnnotation->class));
81 81
 
82
-        if (! empty($this->embeddedAnnotation->columnPrefix)) {
82
+        if ( ! empty($this->embeddedAnnotation->columnPrefix)) {
83 83
             $embeddedMetadata->setColumnPrefix($this->embeddedAnnotation->columnPrefix);
84 84
         }
85 85
 
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
     protected function getTargetEmbedded(string $targetEmbedded) : string
103 103
     {
104 104
         // Validate if target embedded is defined
105
-        if (! $targetEmbedded) {
105
+        if ( ! $targetEmbedded) {
106 106
             throw Mapping\MappingException::missingEmbeddedClass($this->fieldName);
107 107
         }
108 108
 
109 109
         // Validate that target entity exists
110
-        if (! (class_exists($targetEmbedded) || interface_exists($targetEmbedded))) {
110
+        if ( ! (class_exists($targetEmbedded) || interface_exists($targetEmbedded))) {
111 111
             throw Mapping\MappingException::invalidTargetEmbeddedClass(
112 112
                 $targetEmbedded,
113 113
                 $this->componentMetadata->getClassName(),
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
45 45
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
46 46
 
47
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);
47
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform);
48 48
 
49 49
         // Append subclass columns
50 50
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $conditionSql .= ' AND ';
115 115
         }
116 116
 
117
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
117
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
118 118
     }
119 119
 
120 120
     /**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $conditionSql .= ' AND ';
129 129
         }
130 130
 
131
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
131
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
132 132
     }
133 133
 
134 134
     /**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
         return sprintf(
157 157
             '%s IN (%s)',
158
-            $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform),
158
+            $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform),
159 159
             implode(', ', $values)
160 160
         );
161 161
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             }
108 108
 
109 109
             foreach ($data as $columnName => $value) {
110
-                if (! is_array($id) || ! isset($id[$columnName])) {
110
+                if ( ! is_array($id) || ! isset($id[$columnName])) {
111 111
                     $type = $this->columns[$columnName]->getType();
112 112
 
113 113
                     $stmt->bindValue($paramIndex++, $value, $type);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     {
132 132
         $updateData = $this->prepareUpdateData($entity);
133 133
 
134
-        if (! $updateData) {
134
+        if ( ! $updateData) {
135 135
             return;
136 136
         }
137 137
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             $versionedClass = $this->class->versionProperty->getDeclaringClass();
150 150
             $versionedTable = $versionedClass->getTableName();
151 151
 
152
-            if (! isset($updateData[$versionedTable])) {
152
+            if ( ! isset($updateData[$versionedTable])) {
153 153
                 $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform);
154 154
 
155 155
                 $this->updateTable($entity, $tableName, [], true);
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 
231 231
         if ($filterSql) {
232 232
             $conditionSql .= $conditionSql
233
-                ? ' AND ' . $filterSql
233
+                ? ' AND '.$filterSql
234 234
                 : $filterSql;
235 235
         }
236 236
 
@@ -238,26 +238,26 @@  discard block
 block discarded – undo
238 238
 
239 239
         switch ($lockMode) {
240 240
             case LockMode::PESSIMISTIC_READ:
241
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
241
+                $lockSql = ' '.$this->platform->getReadLockSQL();
242 242
                 break;
243 243
 
244 244
             case LockMode::PESSIMISTIC_WRITE:
245
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
245
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
246 246
                 break;
247 247
         }
248 248
 
249 249
         $tableName  = $this->class->table->getQuotedQualifiedName($this->platform);
250
-        $from       = ' FROM ' . $tableName . ' ' . $baseTableAlias;
251
-        $where      = $conditionSql !== '' ? ' WHERE ' . $conditionSql : '';
250
+        $from       = ' FROM '.$tableName.' '.$baseTableAlias;
251
+        $where      = $conditionSql !== '' ? ' WHERE '.$conditionSql : '';
252 252
         $lock       = $this->platform->appendLockHint($from, $lockMode);
253 253
         $columnList = $this->getSelectColumnsSQL();
254
-        $query      = 'SELECT ' . $columnList
254
+        $query      = 'SELECT '.$columnList
255 255
                     . $lock
256 256
                     . $joinSql
257 257
                     . $where
258 258
                     . $orderBySql;
259 259
 
260
-        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql;
260
+        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql;
261 261
     }
262 262
 
263 263
     /**
@@ -279,14 +279,14 @@  discard block
 block discarded – undo
279 279
 
280 280
         if ($filterSql !== '') {
281 281
             $conditionSql = $conditionSql
282
-                ? $conditionSql . ' AND ' . $filterSql
282
+                ? $conditionSql.' AND '.$filterSql
283 283
                 : $filterSql;
284 284
         }
285 285
 
286 286
         return 'SELECT COUNT(*) '
287
-            . 'FROM ' . $tableName . ' ' . $baseTableAlias
287
+            . 'FROM '.$tableName.' '.$baseTableAlias
288 288
             . $joinSql
289
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
289
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
290 290
     }
291 291
 
292 292
     /**
@@ -305,18 +305,18 @@  discard block
 block discarded – undo
305 305
             $conditions = [];
306 306
             $tableName  = $parentClass->table->getQuotedQualifiedName($this->platform);
307 307
             $tableAlias = $this->getSQLTableAlias($parentClass->getTableName());
308
-            $joinSql   .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
308
+            $joinSql   .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
309 309
 
310 310
             foreach ($identifierColumns as $idColumn) {
311 311
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
312 312
 
313
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
313
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
314 314
             }
315 315
 
316 316
             $joinSql .= implode(' AND ', $conditions);
317 317
         }
318 318
 
319
-        return parent::getLockTablesSql($lockMode) . $joinSql;
319
+        return parent::getLockTablesSql($lockMode).$joinSql;
320 320
     }
321 321
 
322 322
     /**
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
                 continue;
344 344
             }
345 345
 
346
-            if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
346
+            if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
347 347
                 continue;
348 348
             }
349 349
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
365 365
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
366 366
 
367
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);
367
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform);
368 368
 
369 369
         // sub tables
370 370
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -481,12 +481,12 @@  discard block
 block discarded – undo
481 481
             $conditions = [];
482 482
             $tableName  = $parentClass->table->getQuotedQualifiedName($this->platform);
483 483
             $tableAlias = $this->getSQLTableAlias($parentClass->getTableName());
484
-            $joinSql   .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
484
+            $joinSql   .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
485 485
 
486 486
             foreach ($identifierColumns as $idColumn) {
487 487
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
488 488
 
489
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
489
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
490 490
             }
491 491
 
492 492
             $joinSql .= implode(' AND ', $conditions);
@@ -498,12 +498,12 @@  discard block
 block discarded – undo
498 498
             $subClass   = $this->em->getClassMetadata($subClassName);
499 499
             $tableName  = $subClass->table->getQuotedQualifiedName($this->platform);
500 500
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName());
501
-            $joinSql   .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
501
+            $joinSql   .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
502 502
 
503 503
             foreach ($identifierColumns as $idColumn) {
504 504
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
505 505
 
506
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
506
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
507 507
             }
508 508
 
509 509
             $joinSql .= implode(' AND ', $conditions);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Parser.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
         }
399 399
 
400 400
         foreach ($this->queryComponents as $dqlAlias => $qComp) {
401
-            if (! isset($this->identVariableExpressions[$dqlAlias])) {
401
+            if ( ! isset($this->identVariableExpressions[$dqlAlias])) {
402 402
                 continue;
403 403
             }
404 404
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
         $tokenStr = substr($dql, $tokenPos, $length);
464 464
 
465 465
         // Building informative message
466
-        $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;
466
+        $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message;
467 467
 
468 468
         throw QueryException::semanticalError(
469 469
             $message,
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
             $identVariable = $deferredItem['expression'];
567 567
 
568 568
             // Check if IdentificationVariable exists in queryComponents
569
-            if (! isset($this->queryComponents[$identVariable])) {
569
+            if ( ! isset($this->queryComponents[$identVariable])) {
570 570
                 $this->semanticalError(
571 571
                     sprintf("'%s' is not defined.", $identVariable),
572 572
                     $deferredItem['token']
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
             $qComp = $this->queryComponents[$identVariable];
577 577
 
578 578
             // Check if queryComponent points to an AbstractSchemaName or a ResultVariable
579
-            if (! isset($qComp['metadata'])) {
579
+            if ( ! isset($qComp['metadata'])) {
580 580
                 $this->semanticalError(
581 581
                     sprintf("'%s' does not point to a Class.", $identVariable),
582 582
                     $deferredItem['token']
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
             // If the namespace is not given then assumes the first FROM entity namespace
611 611
             if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) {
612 612
                 $namespace = substr($fromClassName, 0, strrpos($fromClassName, '\\'));
613
-                $fqcn      = $namespace . '\\' . $className;
613
+                $fqcn      = $namespace.'\\'.$className;
614 614
 
615 615
                 if (class_exists($fqcn)) {
616 616
                     $expression->className = $fqcn;
@@ -618,13 +618,13 @@  discard block
 block discarded – undo
618 618
                 }
619 619
             }
620 620
 
621
-            if (! class_exists($className)) {
621
+            if ( ! class_exists($className)) {
622 622
                 $this->semanticalError(sprintf('Class "%s" is not defined.', $className), $token);
623 623
             }
624 624
 
625 625
             $class = new ReflectionClass($className);
626 626
 
627
-            if (! $class->isInstantiable()) {
627
+            if ( ! $class->isInstantiable()) {
628 628
                 $this->semanticalError(sprintf('Class "%s" can not be instantiated.', $className), $token);
629 629
             }
630 630
 
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
             $resultVariable = $deferredItem['expression'];
682 682
 
683 683
             // Check if ResultVariable exists in queryComponents
684
-            if (! isset($this->queryComponents[$resultVariable])) {
684
+            if ( ! isset($this->queryComponents[$resultVariable])) {
685 685
                 $this->semanticalError(
686 686
                     sprintf("'%s' is not defined.", $resultVariable),
687 687
                     $deferredItem['token']
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
             $qComp = $this->queryComponents[$resultVariable];
692 692
 
693 693
             // Check if queryComponent points to an AbstractSchemaName or a ResultVariable
694
-            if (! isset($qComp['resultVariable'])) {
694
+            if ( ! isset($qComp['resultVariable'])) {
695 695
                 $this->semanticalError(
696 696
                     sprintf("'%s' does not point to a ResultVariable.", $resultVariable),
697 697
                     $deferredItem['token']
@@ -733,9 +733,9 @@  discard block
 block discarded – undo
733 733
             $property = $class->getProperty($field);
734 734
 
735 735
             // Check if field or association exists
736
-            if (! $property) {
736
+            if ( ! $property) {
737 737
                 $this->semanticalError(
738
-                    'Class ' . $class->getClassName() . ' has no field or association named ' . $field,
738
+                    'Class '.$class->getClassName().' has no field or association named '.$field,
739 739
                     $deferredItem['token']
740 740
                 );
741 741
             }
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
             // Validate if PathExpression is one of the expected types
752 752
             $expectedType = $pathExpression->expectedType;
753 753
 
754
-            if (! ($expectedType & $fieldType)) {
754
+            if ( ! ($expectedType & $fieldType)) {
755 755
                 // We need to recognize which was expected type(s)
756 756
                 $expectedStringTypes = [];
757 757
 
@@ -773,8 +773,8 @@  discard block
 block discarded – undo
773 773
                 // Build the error message
774 774
                 $semanticalError  = 'Invalid PathExpression. ';
775 775
                 $semanticalError .= count($expectedStringTypes) === 1
776
-                    ? 'Must be a ' . $expectedStringTypes[0] . '.'
777
-                    : implode(' or ', $expectedStringTypes) . ' expected.';
776
+                    ? 'Must be a '.$expectedStringTypes[0].'.'
777
+                    : implode(' or ', $expectedStringTypes).' expected.';
778 778
 
779 779
                 $this->semanticalError($semanticalError, $deferredItem['token']);
780 780
             }
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 
787 787
     private function processRootEntityAliasSelected()
788 788
     {
789
-        if (! $this->identVariableExpressions) {
789
+        if ( ! $this->identVariableExpressions) {
790 790
             return;
791 791
         }
792 792
 
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
 
944 944
         [$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']);
945 945
 
946
-        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
946
+        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName;
947 947
     }
948 948
 
949 949
     /**
@@ -1022,9 +1022,9 @@  discard block
 block discarded – undo
1022 1022
     {
1023 1023
         $identVariable = $this->IdentificationVariable();
1024 1024
 
1025
-        if (! isset($this->queryComponents[$identVariable])) {
1025
+        if ( ! isset($this->queryComponents[$identVariable])) {
1026 1026
             $this->semanticalError(
1027
-                'Identification Variable ' . $identVariable . ' used in join path expression but was not defined before.'
1027
+                'Identification Variable '.$identVariable.' used in join path expression but was not defined before.'
1028 1028
             );
1029 1029
         }
1030 1030
 
@@ -1038,8 +1038,8 @@  discard block
 block discarded – undo
1038 1038
         $class    = $qComp['metadata'];
1039 1039
         $property = $class->getProperty($field);
1040 1040
 
1041
-        if (! ($property !== null && $property instanceof AssociationMetadata)) {
1042
-            $this->semanticalError('Class ' . $class->getClassName() . ' has no association named ' . $field);
1041
+        if ( ! ($property !== null && $property instanceof AssociationMetadata)) {
1042
+            $this->semanticalError('Class '.$class->getClassName().' has no association named '.$field);
1043 1043
         }
1044 1044
 
1045 1045
         return new AST\JoinAssociationPathExpression($identVariable, $field);
@@ -1069,7 +1069,7 @@  discard block
 block discarded – undo
1069 1069
             while ($this->lexer->isNextToken(Lexer::T_DOT)) {
1070 1070
                 $this->match(Lexer::T_DOT);
1071 1071
                 $this->match(Lexer::T_IDENTIFIER);
1072
-                $field .= '.' . $this->lexer->token['value'];
1072
+                $field .= '.'.$this->lexer->token['value'];
1073 1073
             }
1074 1074
         }
1075 1075
 
@@ -1451,7 +1451,7 @@  discard block
 block discarded – undo
1451 1451
         // Still need to decide between IdentificationVariable or ResultVariable
1452 1452
         $lookaheadValue = $this->lexer->lookahead['value'];
1453 1453
 
1454
-        if (! isset($this->queryComponents[$lookaheadValue])) {
1454
+        if ( ! isset($this->queryComponents[$lookaheadValue])) {
1455 1455
             $this->semanticalError('Cannot group by undefined identification or result variable.');
1456 1456
         }
1457 1457
 
@@ -1799,7 +1799,7 @@  discard block
 block discarded – undo
1799 1799
         while ($this->lexer->isNextToken(Lexer::T_DOT)) {
1800 1800
             $this->match(Lexer::T_DOT);
1801 1801
             $this->match(Lexer::T_IDENTIFIER);
1802
-            $field .= '.' . $this->lexer->token['value'];
1802
+            $field .= '.'.$this->lexer->token['value'];
1803 1803
         }
1804 1804
 
1805 1805
         $partialFieldSet[] = $field;
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
             while ($this->lexer->isNextToken(Lexer::T_DOT)) {
1814 1814
                 $this->match(Lexer::T_DOT);
1815 1815
                 $this->match(Lexer::T_IDENTIFIER);
1816
-                $field .= '.' . $this->lexer->token['value'];
1816
+                $field .= '.'.$this->lexer->token['value'];
1817 1817
             }
1818 1818
 
1819 1819
             $partialFieldSet[] = $field;
@@ -2419,7 +2419,7 @@  discard block
 block discarded – undo
2419 2419
 
2420 2420
         // Phase 1 AST optimization: Prevent AST\ConditionalFactor
2421 2421
         // if only one AST\ConditionalPrimary is defined
2422
-        if (! $not) {
2422
+        if ( ! $not) {
2423 2423
             return $conditionalPrimary;
2424 2424
         }
2425 2425
 
@@ -2438,7 +2438,7 @@  discard block
 block discarded – undo
2438 2438
     {
2439 2439
         $condPrimary = new AST\ConditionalPrimary();
2440 2440
 
2441
-        if (! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) {
2441
+        if ( ! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) {
2442 2442
             $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression();
2443 2443
 
2444 2444
             return $condPrimary;
@@ -2607,7 +2607,7 @@  discard block
 block discarded – undo
2607 2607
             $this->match(Lexer::T_OF);
2608 2608
         }
2609 2609
 
2610
-        $collMemberExpr      = new AST\CollectionMemberExpression(
2610
+        $collMemberExpr = new AST\CollectionMemberExpression(
2611 2611
             $entityExpr,
2612 2612
             $this->CollectionValuedPathExpression()
2613 2613
         );
@@ -2941,7 +2941,7 @@  discard block
 block discarded – undo
2941 2941
         $lookaheadType = $this->lexer->lookahead['type'];
2942 2942
         $isDistinct    = false;
2943 2943
 
2944
-        if (! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) {
2944
+        if ( ! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) {
2945 2945
             $this->syntaxError('One of: MAX, MIN, AVG, SUM, COUNT');
2946 2946
         }
2947 2947
 
@@ -2971,7 +2971,7 @@  discard block
 block discarded – undo
2971 2971
         $lookaheadType = $this->lexer->lookahead['type'];
2972 2972
         $value         = $this->lexer->lookahead['value'];
2973 2973
 
2974
-        if (! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) {
2974
+        if ( ! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) {
2975 2975
             $this->syntaxError('ALL, ANY or SOME');
2976 2976
         }
2977 2977
 
@@ -3209,7 +3209,7 @@  discard block
 block discarded – undo
3209 3209
                 $lookaheadValue = $this->lexer->lookahead['value'];
3210 3210
 
3211 3211
                 // Validate existing component
3212
-                if (! isset($this->queryComponents[$lookaheadValue])) {
3212
+                if ( ! isset($this->queryComponents[$lookaheadValue])) {
3213 3213
                     $this->semanticalError('Cannot add having condition on undefined result variable.');
3214 3214
                 }
3215 3215
 
@@ -3220,7 +3220,7 @@  discard block
 block discarded – undo
3220 3220
                 }
3221 3221
 
3222 3222
                 // Validating ResultVariable
3223
-                if (! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) {
3223
+                if ( ! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) {
3224 3224
                     $this->semanticalError('Cannot add having condition on a non result variable.');
3225 3225
                 }
3226 3226
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Proxy/Factory/StaticProxyFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function generateProxyClasses(array $classes) : int
58 58
     {
59
-        $concreteClasses = array_filter($classes, static function (ClassMetadata $metadata) : bool {
59
+        $concreteClasses = array_filter($classes, static function(ClassMetadata $metadata) : bool {
60 60
             return ! ($metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract());
61 61
         });
62 62
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 ->proxyFactory
66 66
                 ->createProxy(
67 67
                     $metadata->getClassName(),
68
-                    static function () {
68
+                    static function() {
69 69
                         // empty closure, serves its purpose, for now
70 70
                     },
71 71
                     $this->skippedFieldsFqns($metadata)
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
     private function makeInitializer(ClassMetadata $metadata, EntityPersister $persister) : Closure
104 104
     {
105
-        return static function (
105
+        return static function(
106 106
             GhostObjectInterface $ghostObject,
107 107
             string $method,
108 108
             // we don't care
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $identifier = $persister->getIdentifier($ghostObject);
122 122
 
123 123
             // @TODO how do we use `$properties` in the persister? That would be a massive optimisation
124
-            if (! $persister->loadById($identifier, $ghostObject)) {
124
+            if ( ! $persister->loadById($identifier, $ghostObject)) {
125 125
                 $initializer = $originalInitializer;
126 126
 
127 127
                 throw EntityNotFoundException::fromClassNameAndIdentifier(
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         $transientFieldsFqns = [];
154 154
 
155 155
         foreach ($metadata->getPropertiesIterator() as $name => $property) {
156
-            if (! $property instanceof TransientMetadata) {
156
+            if ( ! $property instanceof TransientMetadata) {
157 157
                 continue;
158 158
             }
159 159
 
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
     private function propertyFqcn(ReflectionProperty $property) : string
192 192
     {
193 193
         if ($property->isPrivate()) {
194
-            return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName();
194
+            return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName();
195 195
         }
196 196
 
197 197
         if ($property->isProtected()) {
198
-            return "\0*\0" . $property->getName();
198
+            return "\0*\0".$property->getName();
199 199
         }
200 200
 
201 201
         return $property->getName();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/DriverMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function getDatabasePlatform() : AbstractPlatform
36 36
     {
37
-        if (! $this->platformMock) {
37
+        if ( ! $this->platformMock) {
38 38
             $this->platformMock = new DatabasePlatformMock();
39 39
         }
40 40
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/ConnectionMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     public function quote($input, $type = ParameterType::STRING) : string
115 115
     {
116 116
         if (is_string($input)) {
117
-            return "'" . $input . "'";
117
+            return "'".$input."'";
118 118
         }
119 119
 
120 120
         return $input;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DbalTypes/UpperCaseStringType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) : string
34 34
     {
35
-        return 'UPPER(' . $sqlExpr . ')';
35
+        return 'UPPER('.$sqlExpr.')';
36 36
     }
37 37
 
38 38
     /**
@@ -40,6 +40,6 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function convertToPHPValueSQL($sqlExpr, $platform) : string
42 42
     {
43
-        return 'LOWER(' . $sqlExpr . ')';
43
+        return 'LOWER('.$sqlExpr.')';
44 44
     }
45 45
 }
Please login to merge, or discard this patch.