Failed Conditions
Pull Request — develop (#6873)
by
unknown
112:44 queued 47:41
created
lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php 2 patches
Braces   +10 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,11 @@  discard block
 block discarded – undo
73 73
             $first             = true;
74 74
 
75 75
             foreach ($owningAssociation->getJoinColumns() as $joinColumn) {
76
-                if ($first) $first = false; else $sql .= ' AND ';
76
+                if ($first) {
77
+                    $first = false;
78
+                } else {
79
+                    $sql .= ' AND ';
80
+                }
77 81
 
78 82
                 $sql .= sprintf('%s.%s = %s.%s',
79 83
                     $targetTableAlias,
@@ -106,7 +110,11 @@  discard block
 block discarded – undo
106 110
             $first = true;
107 111
 
108 112
             foreach ($joinColumns as $joinColumn) {
109
-                if ($first) $first = false; else $sql .= ' AND ';
113
+                if ($first) {
114
+                    $first = false;
115
+                } else {
116
+                    $sql .= ' AND ';
117
+                }
110 118
 
111 119
                 $sql .= sprintf('%s.%s = %s.%s',
112 120
                     $joinTableAlias,
Please login to merge, or discard this 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\Query\AST\Functions;
6 6
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $targetTableAlias   = $sqlWalker->getSQLTableAlias($targetClass->getTableName());
51 51
             $sourceTableAlias   = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias);
52 52
 
53
-            $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE ';
53
+            $sql .= $targetTableName.' '.$targetTableAlias.' WHERE ';
54 54
 
55 55
             $owningAssociation = $targetClass->getProperty($association->getMappedBy());
56 56
             $first             = true;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             }
80 80
 
81 81
             // join to target table
82
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' WHERE ';
82
+            $sql .= $joinTableName.' '.$joinTableAlias.' WHERE ';
83 83
 
84 84
             $joinColumns = $association->isOwningSide()
85 85
                 ? $joinTable->getJoinColumns()
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             }
101 101
         }
102 102
 
103
-        return '(' . $sql . ')';
103
+        return '('.$sql.')';
104 104
     }
105 105
 
106 106
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -323,8 +323,8 @@  discard block
 block discarded – undo
323 323
 
324 324
         // FIXME: Order with composite keys might not be correct
325 325
         $sql = 'SELECT ' . $columnName
326
-             . ' FROM '  . $tableName
327
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
326
+                . ' FROM '  . $tableName
327
+                . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
328 328
 
329 329
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
330 330
         $versionType = $versionProperty->getType();
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
         }
458 458
 
459 459
         $sql = 'UPDATE ' . $quotedTableName
460
-             . ' SET ' . implode(', ', $set)
461
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
460
+                . ' SET ' . implode(', ', $set)
461
+                . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
462 462
 
463 463
         $result = $this->conn->executeUpdate($sql, $params, $types);
464 464
 
@@ -1626,9 +1626,9 @@  discard block
 block discarded – undo
1626 1626
         $lock  = $this->getLockTablesSql($lockMode);
1627 1627
         $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1628 1628
         $sql = 'SELECT 1 '
1629
-             . $lock
1630
-             . $where
1631
-             . $lockSql;
1629
+                . $lock
1630
+                . $where
1631
+                . $lockSql;
1632 1632
 
1633 1633
         list($params, $types) = $this->expandParameters($criteria);
1634 1634
 
@@ -2107,8 +2107,8 @@  discard block
 block discarded – undo
2107 2107
         $alias = $this->getSQLTableAlias($this->class->getTableName());
2108 2108
 
2109 2109
         $sql = 'SELECT 1 '
2110
-             . $this->getLockTablesSql(null)
2111
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2110
+                . $this->getLockTablesSql(null)
2111
+                . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2112 2112
 
2113 2113
         list($params, $types) = $this->expandParameters($criteria);
2114 2114
 
@@ -2142,9 +2142,9 @@  discard block
 block discarded – undo
2142 2142
 
2143 2143
         // if one of the join columns is nullable, return left join
2144 2144
         foreach ($association->getJoinColumns() as $joinColumn) {
2145
-             if (! $joinColumn->isNullable()) {
2146
-                 continue;
2147
-             }
2145
+                if (! $joinColumn->isNullable()) {
2146
+                    continue;
2147
+                }
2148 2148
 
2149 2149
             return 'LEFT JOIN';
2150 2150
         }
Please login to merge, or discard this patch.
Spacing   +74 added lines, -74 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\Persisters\Entity;
6 6
 
@@ -300,14 +300,14 @@  discard block
 block discarded – undo
300 300
         $tableName      = $versionedClass->table->getQuotedQualifiedName($this->platform);
301 301
         $columnName     = $this->platform->quoteIdentifier($versionProperty->getColumnName());
302 302
         $identifier     = array_map(
303
-            function ($columnName) { return $this->platform->quoteIdentifier($columnName); },
303
+            function($columnName) { return $this->platform->quoteIdentifier($columnName); },
304 304
             array_keys($versionedClass->getIdentifierColumns($this->em))
305 305
         );
306 306
 
307 307
         // FIXME: Order with composite keys might not be correct
308
-        $sql = 'SELECT ' . $columnName
309
-             . ' FROM '  . $tableName
310
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
308
+        $sql = 'SELECT '.$columnName
309
+             . ' FROM '.$tableName
310
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
311 311
 
312 312
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
313 313
         $versionType = $versionProperty->getType();
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 
394 394
             if (($value = $identifier[$field]) !== null) {
395 395
                 // @todo guilhermeblanco Make sure we do not have flat association values.
396
-                if (! is_array($value)) {
396
+                if ( ! is_array($value)) {
397 397
                     $value = [$targetClass->identifier[0] => $value];
398 398
                 }
399 399
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
407 407
                 $targetField          = $targetClass->fieldNames[$referencedColumnName];
408 408
 
409
-                if (! $joinColumn->getType()) {
409
+                if ( ! $joinColumn->getType()) {
410 410
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
411 411
                 }
412 412
 
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
                         $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
475 475
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
476 476
 
477
-                        if (! $joinColumn->getType()) {
477
+                        if ( ! $joinColumn->getType()) {
478 478
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
479 479
                         }
480 480
 
@@ -501,18 +501,18 @@  discard block
 block discarded – undo
501 501
                 case Type::SMALLINT:
502 502
                 case Type::INTEGER:
503 503
                 case Type::BIGINT:
504
-                    $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';
504
+                    $set[] = $versionColumnName.' = '.$versionColumnName.' + 1';
505 505
                     break;
506 506
 
507 507
                 case Type::DATETIME:
508
-                    $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';
508
+                    $set[] = $versionColumnName.' = CURRENT_TIMESTAMP';
509 509
                     break;
510 510
             }
511 511
         }
512 512
 
513
-        $sql = 'UPDATE ' . $quotedTableName
514
-             . ' SET ' . implode(', ', $set)
515
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
513
+        $sql = 'UPDATE '.$quotedTableName
514
+             . ' SET '.implode(', ', $set)
515
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
516 516
 
517 517
         $result = $this->conn->executeUpdate($sql, $params, $types);
518 518
 
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
     protected function deleteJoinTableRecords($identifier)
532 532
     {
533 533
         foreach ($this->class->getDeclaredPropertiesIterator() as $association) {
534
-            if (! ($association instanceof ManyToManyAssociationMetadata)) {
534
+            if ( ! ($association instanceof ManyToManyAssociationMetadata)) {
535 535
                 continue;
536 536
             }
537 537
 
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
             $keys              = [];
545 545
 
546 546
             if ( ! $owningAssociation->isOwningSide()) {
547
-                $class       = $this->em->getClassMetadata($association->getTargetEntity());
547
+                $class = $this->em->getClassMetadata($association->getTargetEntity());
548 548
                 $owningAssociation = $class->getProperty($association->getMappedBy());
549 549
             }
550 550
 
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
             }
657 657
 
658 658
             // Only owning side of x-1 associations can have a FK column.
659
-            if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
659
+            if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
660 660
                 continue;
661 661
             }
662 662
 
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
                 /** @var JoinColumnMetadata $joinColumn */
677 677
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
678 678
 
679
-                if (! $joinColumn->getType()) {
679
+                if ( ! $joinColumn->getType()) {
680 680
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
681 681
                 }
682 682
 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
         $propertyName = $this->class->fieldNames[$columnName];
706 706
         $property     = $this->class->getProperty($propertyName);
707 707
 
708
-        if (! $property) {
708
+        if ( ! $property) {
709 709
             return null;
710 710
         }
711 711
 
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
             /** @var JoinColumnMetadata $joinColumn */
725 725
             $referencedColumnName = $joinColumn->getReferencedColumnName();
726 726
 
727
-            if (! $joinColumn->getType()) {
727
+            if ( ! $joinColumn->getType()) {
728 728
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
729 729
             }
730 730
 
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
         $criteria       = [];
1062 1062
         $parameters     = [];
1063 1063
 
1064
-        if (! $association->isOwningSide()) {
1064
+        if ( ! $association->isOwningSide()) {
1065 1065
             $class       = $this->em->getClassMetadata($association->getTargetEntity());
1066 1066
             $owningAssoc = $class->getProperty($association->getMappedBy());
1067 1067
         }
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
                 $value = $value[$targetClass->identifier[0]];
1090 1090
             }
1091 1091
 
1092
-            $criteria[$joinTableName . '.' . $quotedColumnName] = $value;
1092
+            $criteria[$joinTableName.'.'.$quotedColumnName] = $value;
1093 1093
             $parameters[] = [
1094 1094
                 'value' => $value,
1095 1095
                 'field' => $fieldName,
@@ -1140,11 +1140,11 @@  discard block
 block discarded – undo
1140 1140
 
1141 1141
         switch ($lockMode) {
1142 1142
             case LockMode::PESSIMISTIC_READ:
1143
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1143
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1144 1144
                 break;
1145 1145
 
1146 1146
             case LockMode::PESSIMISTIC_WRITE:
1147
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1147
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1148 1148
                 break;
1149 1149
         }
1150 1150
 
@@ -1155,14 +1155,14 @@  discard block
 block discarded – undo
1155 1155
 
1156 1156
         if ('' !== $filterSql) {
1157 1157
             $conditionSql = $conditionSql
1158
-                ? $conditionSql . ' AND ' . $filterSql
1158
+                ? $conditionSql.' AND '.$filterSql
1159 1159
                 : $filterSql;
1160 1160
         }
1161 1161
 
1162
-        $select = 'SELECT ' . $columnList;
1163
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1164
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1165
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1162
+        $select = 'SELECT '.$columnList;
1163
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1164
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1165
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1166 1166
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1167 1167
         $query  = $select
1168 1168
             . $lock
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
             . $where
1171 1171
             . $orderBySql;
1172 1172
 
1173
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1173
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1174 1174
     }
1175 1175
 
1176 1176
     /**
@@ -1189,13 +1189,13 @@  discard block
 block discarded – undo
1189 1189
 
1190 1190
         if ('' !== $filterSql) {
1191 1191
             $conditionSql = $conditionSql
1192
-                ? $conditionSql . ' AND ' . $filterSql
1192
+                ? $conditionSql.' AND '.$filterSql
1193 1193
                 : $filterSql;
1194 1194
         }
1195 1195
 
1196 1196
         $sql = 'SELECT COUNT(*) '
1197
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1198
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1197
+            . 'FROM '.$tableName.' '.$tableAlias
1198
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1199 1199
 
1200 1200
         return $sql;
1201 1201
     }
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
      */
1213 1213
     protected final function getOrderBySQL(array $orderBy, $baseTableAlias)
1214 1214
     {
1215
-        if (! $orderBy) {
1215
+        if ( ! $orderBy) {
1216 1216
             return '';
1217 1217
         }
1218 1218
 
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
         foreach ($orderBy as $fieldName => $orientation) {
1222 1222
             $orientation = strtoupper(trim($orientation));
1223 1223
 
1224
-            if (! in_array($orientation, ['ASC', 'DESC'])) {
1224
+            if ( ! in_array($orientation, ['ASC', 'DESC'])) {
1225 1225
                 throw ORMException::invalidOrientation($this->class->getClassName(), $fieldName);
1226 1226
             }
1227 1227
 
@@ -1231,11 +1231,11 @@  discard block
 block discarded – undo
1231 1231
                 $tableAlias = $this->getSQLTableAlias($property->getTableName());
1232 1232
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1233 1233
 
1234
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1234
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1235 1235
 
1236 1236
                 continue;
1237 1237
             } else if ($property instanceof AssociationMetadata) {
1238
-                if (! $property->isOwningSide()) {
1238
+                if ( ! $property->isOwningSide()) {
1239 1239
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $fieldName);
1240 1240
                 }
1241 1241
 
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
                     /* @var JoinColumnMetadata $joinColumn */
1249 1249
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1250 1250
 
1251
-                    $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation;
1251
+                    $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation;
1252 1252
                 }
1253 1253
 
1254 1254
                 continue;
@@ -1257,7 +1257,7 @@  discard block
 block discarded – undo
1257 1257
             throw ORMException::unrecognizedField($fieldName);
1258 1258
         }
1259 1259
 
1260
-        return ' ORDER BY ' . implode(', ', $orderByList);
1260
+        return ' ORDER BY '.implode(', ', $orderByList);
1261 1261
     }
1262 1262
 
1263 1263
     /**
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
 
1280 1280
 
1281 1281
         $this->currentPersisterContext->rsm->addEntityResult($this->class->getClassName(), 'r'); // r for root
1282
-        $this->currentPersisterContext->selectJoinSql    = '';
1282
+        $this->currentPersisterContext->selectJoinSql = '';
1283 1283
 
1284 1284
         $eagerAliasCounter = 0;
1285 1285
         $columnList        = [];
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
                         break; // now this is why you shouldn't use inheritance
1316 1316
                     }
1317 1317
 
1318
-                    $assocAlias = 'e' . ($eagerAliasCounter++);
1318
+                    $assocAlias = 'e'.($eagerAliasCounter++);
1319 1319
 
1320 1320
                     $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName);
1321 1321
 
@@ -1340,14 +1340,14 @@  discard block
 block discarded – undo
1340 1340
                         $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy());
1341 1341
                     }
1342 1342
 
1343
-                    if (! $property->isOwningSide()) {
1343
+                    if ( ! $property->isOwningSide()) {
1344 1344
                         $owningAssociation = $eagerEntity->getProperty($property->getMappedBy());
1345 1345
                     }
1346 1346
 
1347 1347
                     $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias);
1348 1348
                     $joinTableName  = $eagerEntity->table->getQuotedQualifiedName($this->platform);
1349 1349
 
1350
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property);
1350
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property);
1351 1351
 
1352 1352
                     $sourceClass      = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
1353 1353
                     $targetClass      = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
                         $joinCondition[] = $filterSql;
1370 1370
                     }
1371 1371
 
1372
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1372
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1373 1373
                     $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1374 1374
 
1375 1375
                     break;
@@ -1393,7 +1393,7 @@  discard block
 block discarded – undo
1393 1393
      */
1394 1394
     protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r')
1395 1395
     {
1396
-        if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1396
+        if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1397 1397
             return '';
1398 1398
         }
1399 1399
 
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
             $referencedColumnName = $joinColumn->getReferencedColumnName();
1409 1409
             $resultColumnName     = $this->getSQLColumnAlias();
1410 1410
 
1411
-            if (! $joinColumn->getType()) {
1411
+            if ( ! $joinColumn->getType()) {
1412 1412
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1413 1413
             }
1414 1414
 
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
         $owningAssociation = $association;
1441 1441
         $sourceTableAlias  = $this->getSQLTableAlias($this->class->getTableName());
1442 1442
 
1443
-        if (! $association->isOwningSide()) {
1443
+        if ( ! $association->isOwningSide()) {
1444 1444
             $targetEntity      = $this->em->getClassMetadata($association->getTargetEntity());
1445 1445
             $owningAssociation = $targetEntity->getProperty($association->getMappedBy());
1446 1446
         }
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
             );
1463 1463
         }
1464 1464
 
1465
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1465
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1466 1466
     }
1467 1467
 
1468 1468
     /**
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
                             $columnName           = $joinColumn->getColumnName();
1558 1558
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
1559 1559
 
1560
-                            if (! $joinColumn->getType()) {
1560
+                            if ( ! $joinColumn->getType()) {
1561 1561
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1562 1562
                             }
1563 1563
 
@@ -1596,7 +1596,7 @@  discard block
 block discarded – undo
1596 1596
 
1597 1597
         $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());
1598 1598
 
1599
-        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
1599
+        return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
1600 1600
     }
1601 1601
 
1602 1602
     /**
@@ -1610,14 +1610,14 @@  discard block
 block discarded – undo
1610 1610
     protected function getSQLTableAlias($tableName, $assocName = '')
1611 1611
     {
1612 1612
         if ($tableName) {
1613
-            $tableName .= '#' . $assocName;
1613
+            $tableName .= '#'.$assocName;
1614 1614
         }
1615 1615
 
1616 1616
         if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) {
1617 1617
             return $this->currentPersisterContext->sqlTableAliases[$tableName];
1618 1618
         }
1619 1619
 
1620
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1620
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1621 1621
 
1622 1622
         $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias;
1623 1623
 
@@ -1644,7 +1644,7 @@  discard block
 block discarded – undo
1644 1644
         }
1645 1645
 
1646 1646
         $lock  = $this->getLockTablesSql($lockMode);
1647
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1647
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1648 1648
         $sql = 'SELECT 1 '
1649 1649
              . $lock
1650 1650
              . $where
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
         $tableName = $this->class->table->getQuotedQualifiedName($this->platform);
1668 1668
 
1669 1669
         return $this->platform->appendLockHint(
1670
-            'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()),
1670
+            'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()),
1671 1671
             $lockMode
1672 1672
         );
1673 1673
     }
@@ -1720,19 +1720,19 @@  discard block
 block discarded – undo
1720 1720
 
1721 1721
             if (null !== $comparison) {
1722 1722
                 // special case null value handling
1723
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1724
-                    $selectedColumns[] = $column . ' IS NULL';
1723
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1724
+                    $selectedColumns[] = $column.' IS NULL';
1725 1725
 
1726 1726
                     continue;
1727 1727
                 }
1728 1728
 
1729 1729
                 if ($comparison === Comparison::NEQ && null === $value) {
1730
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1730
+                    $selectedColumns[] = $column.' IS NOT NULL';
1731 1731
 
1732 1732
                     continue;
1733 1733
                 }
1734 1734
 
1735
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1735
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1736 1736
 
1737 1737
                 continue;
1738 1738
             }
@@ -1778,7 +1778,7 @@  discard block
 block discarded – undo
1778 1778
         if (isset($this->class->fieldMappings[$field])) {
1779 1779
             $className = $this->class->fieldMappings[$field]['inherited'] ?? $this->class->name;
1780 1780
 
1781
-            return [$tableAlias . '.' . $columnName];
1781
+            return [$tableAlias.'.'.$columnName];
1782 1782
         }
1783 1783
 
1784 1784
         if ($property instanceof AssociationMetadata) {
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
 
1788 1788
             // Many-To-Many requires join table check for joinColumn
1789 1789
             if ($owningAssociation instanceof ManyToManyAssociationMetadata) {
1790
-                if (! $owningAssociation->isOwningSide()) {
1790
+                if ( ! $owningAssociation->isOwningSide()) {
1791 1791
                     $owningAssociation = $association;
1792 1792
                 }
1793 1793
 
@@ -1801,17 +1801,17 @@  discard block
 block discarded – undo
1801 1801
                 foreach ($joinColumns as $joinColumn) {
1802 1802
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1803 1803
 
1804
-                    $columns[] = $joinTableName . '.' . $quotedColumnName;
1804
+                    $columns[] = $joinTableName.'.'.$quotedColumnName;
1805 1805
                 }
1806 1806
 
1807 1807
             } else {
1808
-                if (! $owningAssociation->isOwningSide()) {
1808
+                if ( ! $owningAssociation->isOwningSide()) {
1809 1809
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $field);
1810 1810
                 }
1811 1811
 
1812 1812
                 $className = $association['inherited'] ?? $this->class->name;
1813 1813
 
1814
-                    $columns[] = $tableAlias . '.' . $quotedColumnName;
1814
+                    $columns[] = $tableAlias.'.'.$quotedColumnName;
1815 1815
                 }
1816 1816
             }
1817 1817
 
@@ -1924,7 +1924,7 @@  discard block
 block discarded – undo
1924 1924
                 $value = $value[$targetClass->identifier[0]];
1925 1925
             }
1926 1926
 
1927
-            $criteria[$tableAlias . "." . $quotedColumnName] = $value;
1927
+            $criteria[$tableAlias.".".$quotedColumnName] = $value;
1928 1928
             $parameters[] = [
1929 1929
                 'value' => $value,
1930 1930
                 'field' => $fieldName,
@@ -2011,7 +2011,7 @@  discard block
 block discarded – undo
2011 2011
             case ($property instanceof AssociationMetadata):
2012 2012
                 $class = $this->em->getClassMetadata($property->getTargetEntity());
2013 2013
 
2014
-                if (! $property->isOwningSide()) {
2014
+                if ( ! $property->isOwningSide()) {
2015 2015
                     $property = $class->getProperty($property->getMappedBy());
2016 2016
                     $class    = $this->em->getClassMetadata($property->getTargetEntity());
2017 2017
                 }
@@ -2025,7 +2025,7 @@  discard block
 block discarded – undo
2025 2025
                     /** @var JoinColumnMetadata $joinColumn */
2026 2026
                     $referencedColumnName = $joinColumn->getReferencedColumnName();
2027 2027
 
2028
-                    if (! $joinColumn->getType()) {
2028
+                    if ( ! $joinColumn->getType()) {
2029 2029
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
2030 2030
                     }
2031 2031
 
@@ -2040,7 +2040,7 @@  discard block
 block discarded – undo
2040 2040
         }
2041 2041
 
2042 2042
         if (is_array($value)) {
2043
-            return array_map(function ($type) {
2043
+            return array_map(function($type) {
2044 2044
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
2045 2045
             }, $types);
2046 2046
         }
@@ -2119,12 +2119,12 @@  discard block
 block discarded – undo
2119 2119
 
2120 2120
         $sql = 'SELECT 1 '
2121 2121
              . $this->getLockTablesSql(null)
2122
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2122
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2123 2123
 
2124 2124
         list($params, $types) = $this->expandParameters($criteria);
2125 2125
 
2126 2126
         if (null !== $extraConditions) {
2127
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2127
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2128 2128
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
2129 2129
 
2130 2130
             $params = array_merge($params, $criteriaParams);
@@ -2132,7 +2132,7 @@  discard block
 block discarded – undo
2132 2132
         }
2133 2133
 
2134 2134
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
2135
-            $sql .= ' AND ' . $filterSql;
2135
+            $sql .= ' AND '.$filterSql;
2136 2136
         }
2137 2137
 
2138 2138
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2147,13 +2147,13 @@  discard block
 block discarded – undo
2147 2147
      */
2148 2148
     protected function getJoinSQLForAssociation(AssociationMetadata $association)
2149 2149
     {
2150
-        if (! $association->isOwningSide()) {
2150
+        if ( ! $association->isOwningSide()) {
2151 2151
             return 'LEFT JOIN';
2152 2152
         }
2153 2153
 
2154 2154
         // if one of the join columns is nullable, return left join
2155 2155
         foreach ($association->getJoinColumns() as $joinColumn) {
2156
-             if (! $joinColumn->isNullable()) {
2156
+             if ( ! $joinColumn->isNullable()) {
2157 2157
                  continue;
2158 2158
              }
2159 2159
 
@@ -2170,7 +2170,7 @@  discard block
 block discarded – undo
2170 2170
      */
2171 2171
     public function getSQLColumnAlias()
2172 2172
     {
2173
-        return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++);
2173
+        return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++);
2174 2174
     }
2175 2175
 
2176 2176
     /**
@@ -2187,13 +2187,13 @@  discard block
 block discarded – undo
2187 2187
 
2188 2188
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2189 2189
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2190
-                $filterClauses[] = '(' . $filterExpr . ')';
2190
+                $filterClauses[] = '('.$filterExpr.')';
2191 2191
             }
2192 2192
         }
2193 2193
 
2194 2194
         $sql = implode(' AND ', $filterClauses);
2195 2195
 
2196
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2196
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2197 2197
     }
2198 2198
 
2199 2199
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
         return (bool) $persister->count($criteria);
146 146
     }
147 147
 
148
-     /**
149
-     * {@inheritdoc}
150
-     */
148
+        /**
149
+         * {@inheritdoc}
150
+         */
151 151
     public function contains(PersistentCollection $collection, $element)
152 152
     {
153 153
         if ( ! $this->isValidEntityState($element)) {
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 
266 266
         // 2) Build insert table records into temporary table
267 267
         $dql   = ' SELECT t0.' . implode(', t0.', $rootClass->getIdentifierFieldNames())
268
-               . ' FROM ' . $targetClass->getClassName() . ' t0 WHERE t0.' . $association->getMappedBy() . ' = :owner';
268
+                . ' FROM ' . $targetClass->getClassName() . ' t0 WHERE t0.' . $association->getMappedBy() . ' = :owner';
269 269
         $query = $this->em->createQuery($dql)->setParameter('owner', $collection->getOwner());
270 270
 
271 271
         $statement  = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ') ' . $query->getSQL();
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 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\Persisters\Collection;
6 6
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         // the entire collection with a new would trigger this operation.
31 31
         $association = $collection->getMapping();
32 32
 
33
-        if (! $association->isOrphanRemoval()) {
33
+        if ( ! $association->isOrphanRemoval()) {
34 34
             // Handling non-orphan removal should never happen, as @OneToMany
35 35
             // can only be inverse side. For owning side one to many, it is
36 36
             // required to have a join table, which would classify as a ManyToManyPersister.
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $association = $collection->getMapping();
64 64
 
65
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
65
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
66 66
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
67 67
         }
68 68
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $association = $collection->getMapping();
113 113
 
114
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
114
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
115 115
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
116 116
         }
117 117
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         // only works with single id identifier entities. Will throw an
121 121
         // exception in Entity Persisters if that is not the case for the
122 122
         // 'mappedBy' field.
123
-        $criteria  = [
123
+        $criteria = [
124 124
             $association->getMappedBy()  => $collection->getOwner(),
125 125
             $association->getIndexedBy() => $key,
126 126
         ];
@@ -157,12 +157,12 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $association = $collection->getMapping();
159 159
 
160
-        if (! $association->isOrphanRemoval()) {
160
+        if ( ! $association->isOrphanRemoval()) {
161 161
             // no-op: this is not the owning side, therefore no operations should be applied
162 162
             return false;
163 163
         }
164 164
 
165
-        if (! $this->isValidEntityState($element)) {
165
+        if ( ! $this->isValidEntityState($element)) {
166 166
             return false;
167 167
         }
168 168
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         }
203 203
 
204 204
         $tableName = $targetClass->table->getQuotedQualifiedName($this->platform);
205
-        $statement = 'DELETE FROM ' . $tableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
205
+        $statement = 'DELETE FROM '.$tableName.' WHERE '.implode(' = ? AND ', $columns).' = ?';
206 206
 
207 207
         return $this->conn->executeUpdate($statement, $parameters);
208 208
     }
@@ -241,17 +241,17 @@  discard block
 block discarded – undo
241 241
             ];
242 242
         }
243 243
 
244
-        $statement = $this->platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable
245
-            . ' (' . $this->platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
244
+        $statement = $this->platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable
245
+            . ' ('.$this->platform->getColumnDeclarationListSQL($columnDefinitions).')';
246 246
 
247 247
         $this->conn->executeUpdate($statement);
248 248
 
249 249
         // 2) Build insert table records into temporary table
250
-        $dql   = ' SELECT t0.' . implode(', t0.', $rootClass->getIdentifierFieldNames())
251
-               . ' FROM ' . $targetClass->getClassName() . ' t0 WHERE t0.' . $association->getMappedBy() . ' = :owner';
250
+        $dql   = ' SELECT t0.'.implode(', t0.', $rootClass->getIdentifierFieldNames())
251
+               . ' FROM '.$targetClass->getClassName().' t0 WHERE t0.'.$association->getMappedBy().' = :owner';
252 252
         $query = $this->em->createQuery($dql)->setParameter('owner', $collection->getOwner());
253 253
 
254
-        $statement  = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ') ' . $query->getSQL();
254
+        $statement  = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.') '.$query->getSQL();
255 255
         $parameters = array_values($sourcePersister->getIdentifier($collection->getOwner()));
256 256
         $numDeleted = $this->conn->executeUpdate($statement, $parameters);
257 257
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         // 4) Delete records on each table in the hierarchy
267 267
         $hierarchyClasses = array_merge(
268 268
             array_map(
269
-                function ($className) { return $this->em->getClassMetadata($className); },
269
+                function($className) { return $this->em->getClassMetadata($className); },
270 270
                 array_reverse($targetClass->getSubClasses())
271 271
             ),
272 272
             [$targetClass],
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -213,8 +213,8 @@
 block discarded – undo
213 213
         $this->metadataCache = [];
214 214
 
215 215
         $this->em
216
-             ->getEventManager()
217
-             ->removeEventListener([Events::onClear], $this);
216
+                ->getEventManager()
217
+                ->removeEventListener([Events::onClear], $this);
218 218
     }
219 219
 
220 220
     /**
Please login to merge, or discard this 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
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     {
148 148
         $row = $this->stmt->fetch(PDO::FETCH_ASSOC);
149 149
 
150
-        if (! $row) {
150
+        if ( ! $row) {
151 151
             $this->cleanup();
152 152
 
153 153
             return false;
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 
279 279
                     // If there are field name collisions in the child class, then we need
280 280
                     // to only hydrate if we are looking at the correct discriminator value
281
-                    if(
281
+                    if (
282 282
                         isset($cacheKeyInfo['discriminatorColumn']) && 
283 283
                         isset($data[$cacheKeyInfo['discriminatorColumn']]) &&
284 284
                         // Note: loose comparison required. See https://github.com/doctrine/doctrine2/pull/6304#issuecomment-323294442
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                         : $value;
300 300
 
301 301
                     if ($cacheKeyInfo['isIdentifier'] && $value !== null) {
302
-                        $id[$dqlAlias] .= '|' . $value;
302
+                        $id[$dqlAlias] .= '|'.$value;
303 303
                         $nonemptyComponents[$dqlAlias] = true;
304 304
                     }
305 305
                     break;
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
             if ( ! isset($cacheKeyInfo['isScalar'])) {
338 338
                 $dqlAlias  = $cacheKeyInfo['dqlAlias'];
339 339
                 $type      = $cacheKeyInfo['type'];
340
-                $fieldName = $dqlAlias . '_' . $fieldName;
340
+                $fieldName = $dqlAlias.'_'.$fieldName;
341 341
                 $value     = $type
342 342
                     ? $type->convertToPHPValue($value, $this->platform)
343 343
                     : $value;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/EntityGenerator.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1343,14 +1343,14 @@
 block discarded – undo
1343 1343
         }
1344 1344
 
1345 1345
         $replacements = [
1346
-          '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1347
-          '<methodTypeHint>'    => $methodTypeHint,
1348
-          '<variableType>'      => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''),
1349
-          '<variableName>'      => $variableName,
1350
-          '<methodName>'        => $methodName,
1351
-          '<fieldName>'         => $fieldName,
1352
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '',
1353
-          '<entity>'            => $this->getClassName($metadata)
1346
+            '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1347
+            '<methodTypeHint>'    => $methodTypeHint,
1348
+            '<variableType>'      => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''),
1349
+            '<variableName>'      => $variableName,
1350
+            '<methodName>'        => $methodName,
1351
+            '<fieldName>'         => $fieldName,
1352
+            '<variableDefault>'   => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '',
1353
+            '<entity>'            => $this->getClassName($metadata)
1354 1354
         ];
1355 1355
 
1356 1356
         $method = str_replace(
Please login to merge, or discard this patch.
Spacing   +138 added lines, -138 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\Tools;
6 6
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      */
330 330
     public function writeEntityClass(ClassMetadata $metadata, $outputDirectory)
331 331
     {
332
-        $path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->getClassName()) . $this->extension;
332
+        $path = $outputDirectory.'/'.str_replace('\\', DIRECTORY_SEPARATOR, $metadata->getClassName()).$this->extension;
333 333
         $dir = dirname($path);
334 334
 
335 335
         if ( ! is_dir($dir)) {
@@ -345,8 +345,8 @@  discard block
 block discarded – undo
345 345
         }
346 346
 
347 347
         if ($this->backupExisting && file_exists($path)) {
348
-            $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~";
349
-            if (!copy($path, $backupPath)) {
348
+            $backupPath = dirname($path).DIRECTORY_SEPARATOR.basename($path)."~";
349
+            if ( ! copy($path, $backupPath)) {
350 350
                 throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed.");
351 351
             }
352 352
         }
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
         $body = str_replace('<spaces>', $this->spaces, $body);
409 409
         $last = strrpos($currentCode, '}');
410 410
 
411
-        return substr($currentCode, 0, $last) . $body . ($body ? "\n" : '') . "}\n";
411
+        return substr($currentCode, 0, $last).$body.($body ? "\n" : '')."}\n";
412 412
     }
413 413
 
414 414
     /**
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
     public function setFieldVisibility($visibility)
473 473
     {
474 474
         if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) {
475
-            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility);
475
+            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility);
476 476
         }
477 477
 
478 478
         $this->fieldVisibility = $visibility;
@@ -569,11 +569,11 @@  discard block
 block discarded – undo
569 569
      */
570 570
     protected function generateEntityNamespace(ClassMetadata $metadata)
571 571
     {
572
-        if (! $this->hasNamespace($metadata)) {
572
+        if ( ! $this->hasNamespace($metadata)) {
573 573
             return '';
574 574
         }
575 575
 
576
-        return 'namespace ' . $this->getNamespace($metadata) .';';
576
+        return 'namespace '.$this->getNamespace($metadata).';';
577 577
     }
578 578
 
579 579
     /**
@@ -595,8 +595,8 @@  discard block
 block discarded – undo
595 595
      */
596 596
     protected function generateEntityClassName(ClassMetadata $metadata)
597 597
     {
598
-        return 'class ' . $this->getClassName($metadata) .
599
-            ($this->extendsClass() ? ' extends ' . $this->getClassToExtendName() : null);
598
+        return 'class '.$this->getClassName($metadata).
599
+            ($this->extendsClass() ? ' extends '.$this->getClassToExtendName() : null);
600 600
     }
601 601
 
602 602
     /**
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
         $optionalFields = [];
682 682
 
683 683
         foreach ($metadata->getDeclaredPropertiesIterator() as $property) {
684
-            if (! $property->isNullable()) {
684
+            if ( ! $property->isNullable()) {
685 685
                 $requiredFields[] = $property;
686 686
 
687 687
                 continue;
@@ -710,13 +710,13 @@  discard block
 block discarded – undo
710 710
             $fieldName  = $property->getName();
711 711
             $fieldType  = $property->getTypeName();
712 712
             $mappedType = $this->getType($fieldType);
713
-            $param      = '$' . $fieldName;
713
+            $param      = '$'.$fieldName;
714 714
 
715
-            $paramTypes[] = $mappedType . ($property->isNullable() ? '|null' : '');
715
+            $paramTypes[] = $mappedType.($property->isNullable() ? '|null' : '');
716 716
             $paramVariables[] = $param;
717 717
 
718 718
             if ($fieldType === 'datetime') {
719
-                $param = $mappedType . ' ' . $param;
719
+                $param = $mappedType.' '.$param;
720 720
             }
721 721
 
722 722
             if ($property->isNullable()) {
@@ -725,13 +725,13 @@  discard block
 block discarded – undo
725 725
 
726 726
             $params[] = $param;
727 727
 
728
-            $fields[] = '$this->' . $fieldName . ' = $' . $fieldName . ';';
728
+            $fields[] = '$this->'.$fieldName.' = $'.$fieldName.';';
729 729
         }
730 730
 
731 731
         $maxParamTypeLength = max(array_map('strlen', $paramTypes));
732 732
         $paramTags = array_map(
733
-            function ($type, $variable) use ($maxParamTypeLength) {
734
-                return '@param ' . $type . str_repeat(' ', $maxParamTypeLength - strlen($type) + 1) . $variable;
733
+            function($type, $variable) use ($maxParamTypeLength) {
734
+                return '@param '.$type.str_repeat(' ', $maxParamTypeLength - strlen($type) + 1).$variable;
735 735
             },
736 736
             $paramTypes,
737 737
             $paramVariables
@@ -739,8 +739,8 @@  discard block
 block discarded – undo
739 739
 
740 740
         // Generate multi line constructor if the signature exceeds 120 characters.
741 741
         if (array_sum(array_map('strlen', $params)) + count($params) * 2 + 29 > 120) {
742
-            $delimiter = "\n" . $this->spaces;
743
-            $params = $delimiter . implode(',' . $delimiter, $params) . "\n";
742
+            $delimiter = "\n".$this->spaces;
743
+            $params = $delimiter.implode(','.$delimiter, $params)."\n";
744 744
         } else {
745 745
             $params = implode(', ', $params);
746 746
         }
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
         $replacements = [
749 749
             '<paramTags>' => implode("\n * ", $paramTags),
750 750
             '<params>'    => $params,
751
-            '<fields>'    => implode("\n" . $this->spaces, $fields),
751
+            '<fields>'    => implode("\n".$this->spaces, $fields),
752 752
         ];
753 753
 
754 754
         $constructor = str_replace(
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
 
794 794
             if ($inClass) {
795 795
                 $inClass = false;
796
-                $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1];
796
+                $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1];
797 797
                 $this->staticReflection[$lastSeenClass]['properties'] = [];
798 798
                 $this->staticReflection[$lastSeenClass]['methods'] = [];
799 799
             }
@@ -801,16 +801,16 @@  discard block
 block discarded – undo
801 801
             if (T_NAMESPACE === $token[0]) {
802 802
                 $lastSeenNamespace = '';
803 803
                 $inNamespace = true;
804
-            } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i-1][0]) {
804
+            } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i - 1][0]) {
805 805
                 $inClass = true;
806 806
             } elseif (T_FUNCTION === $token[0]) {
807
-                if (T_STRING === $tokens[$i+2][0]) {
808
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]);
809
-                } elseif ($tokens[$i+2] == '&' && T_STRING === $tokens[$i+3][0]) {
810
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]);
807
+                if (T_STRING === $tokens[$i + 2][0]) {
808
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]);
809
+                } elseif ($tokens[$i + 2] == '&' && T_STRING === $tokens[$i + 3][0]) {
810
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]);
811 811
                 }
812
-            } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i+2][0]) {
813
-                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1);
812
+            } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i + 2][0]) {
813
+                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1);
814 814
             }
815 815
         }
816 816
     }
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
      */
824 824
     protected function hasProperty($property, ClassMetadata $metadata)
825 825
     {
826
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->getClassName()))) {
826
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->getClassName()))) {
827 827
             // don't generate property if its already on the base class.
828 828
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->getClassName());
829 829
 
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
      */
854 854
     protected function hasMethod($method, ClassMetadata $metadata)
855 855
     {
856
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->getClassName()))) {
856
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->getClassName()))) {
857 857
             // don't generate method if its already on the base class.
858 858
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->getClassName());
859 859
 
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
      */
885 885
     protected function getTraits(ClassMetadata $metadata)
886 886
     {
887
-        if (! ($metadata->getReflectionClass() !== null || class_exists($metadata->getClassName()))) {
887
+        if ( ! ($metadata->getReflectionClass() !== null || class_exists($metadata->getClassName()))) {
888 888
             return [];
889 889
         }
890 890
 
@@ -933,7 +933,7 @@  discard block
 block discarded – undo
933 933
     {
934 934
         $refl = new \ReflectionClass($this->getClassToExtend());
935 935
 
936
-        return '\\' . $refl->getName();
936
+        return '\\'.$refl->getName();
937 937
     }
938 938
 
939 939
     /**
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
     {
967 967
         $lines = [];
968 968
         $lines[] = '/**';
969
-        $lines[] = ' * ' . $this->getClassName($metadata);
969
+        $lines[] = ' * '.$this->getClassName($metadata);
970 970
 
971 971
         if ($this->generateAnnotations) {
972 972
             $lines[] = ' *';
@@ -982,12 +982,12 @@  discard block
 block discarded – undo
982 982
 
983 983
             foreach ($methods as $method) {
984 984
                 if ($code = $this->$method($metadata)) {
985
-                    $lines[] = ' * ' . $code;
985
+                    $lines[] = ' * '.$code;
986 986
                 }
987 987
             }
988 988
 
989 989
             if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
990
-                $lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks';
990
+                $lines[] = ' * @'.$this->annotationsPrefix.'HasLifecycleCallbacks';
991 991
             }
992 992
         }
993 993
 
@@ -1003,17 +1003,17 @@  discard block
 block discarded – undo
1003 1003
      */
1004 1004
     protected function generateEntityAnnotation(ClassMetadata $metadata)
1005 1005
     {
1006
-        $prefix = '@' . $this->annotationsPrefix;
1006
+        $prefix = '@'.$this->annotationsPrefix;
1007 1007
 
1008 1008
         if ($metadata->isEmbeddedClass) {
1009
-            return $prefix . 'Embeddable';
1009
+            return $prefix.'Embeddable';
1010 1010
         }
1011 1011
 
1012 1012
         $customRepository = $metadata->getCustomRepositoryClassName()
1013
-            ? '(repositoryClass="' . $metadata->getCustomRepositoryClassName() . '")'
1013
+            ? '(repositoryClass="'.$metadata->getCustomRepositoryClassName().'")'
1014 1014
             : '';
1015 1015
 
1016
-        return $prefix . ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity') . $customRepository;
1016
+        return $prefix.($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity').$customRepository;
1017 1017
     }
1018 1018
 
1019 1019
     /**
@@ -1030,28 +1030,28 @@  discard block
 block discarded – undo
1030 1030
         $table = [];
1031 1031
 
1032 1032
         if ($metadata->table->getSchema()) {
1033
-            $table[] = 'schema="' . $metadata->table->getSchema() . '"';
1033
+            $table[] = 'schema="'.$metadata->table->getSchema().'"';
1034 1034
         }
1035 1035
 
1036 1036
         if ($metadata->table->getName()) {
1037
-            $table[] = 'name="' . $metadata->table->getName() . '"';
1037
+            $table[] = 'name="'.$metadata->table->getName().'"';
1038 1038
         }
1039 1039
 
1040 1040
         if ($metadata->table->getOptions()) {
1041
-            $table[] = 'options={' . $this->exportTableOptions($metadata->table->getOptions()) . '}';
1041
+            $table[] = 'options={'.$this->exportTableOptions($metadata->table->getOptions()).'}';
1042 1042
         }
1043 1043
 
1044 1044
         if ($metadata->table->getUniqueConstraints()) {
1045 1045
             $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table->getUniqueConstraints());
1046
-            $table[] = 'uniqueConstraints={' . $constraints . '}';
1046
+            $table[] = 'uniqueConstraints={'.$constraints.'}';
1047 1047
         }
1048 1048
 
1049 1049
         if ($metadata->table->getIndexes()) {
1050 1050
             $constraints = $this->generateTableConstraints('Index', $metadata->table->getIndexes());
1051
-            $table[] = 'indexes={' . $constraints . '}';
1051
+            $table[] = 'indexes={'.$constraints.'}';
1052 1052
         }
1053 1053
 
1054
-        return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
1054
+        return '@'.$this->annotationsPrefix.'Table('.implode(', ', $table).')';
1055 1055
     }
1056 1056
 
1057 1057
     /**
@@ -1068,10 +1068,10 @@  discard block
 block discarded – undo
1068 1068
             $columns = [];
1069 1069
 
1070 1070
             foreach ($constraint['columns'] as $column) {
1071
-                $columns[] = '"' . $column . '"';
1071
+                $columns[] = '"'.$column.'"';
1072 1072
             }
1073 1073
 
1074
-            $annotations[] = '@' . $this->annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})';
1074
+            $annotations[] = '@'.$this->annotationsPrefix.$constraintName.'(name="'.$name.'", columns={'.implode(', ', $columns).'})';
1075 1075
         }
1076 1076
 
1077 1077
         return implode(', ', $annotations);
@@ -1085,7 +1085,7 @@  discard block
 block discarded – undo
1085 1085
     protected function generateInheritanceAnnotation(ClassMetadata $metadata)
1086 1086
     {
1087 1087
         if ($metadata->inheritanceType !== InheritanceType::NONE) {
1088
-            return '@' . $this->annotationsPrefix . 'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1088
+            return '@'.$this->annotationsPrefix.'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1089 1089
         }
1090 1090
     }
1091 1091
 
@@ -1106,7 +1106,7 @@  discard block
 block discarded – undo
1106 1106
                 $discrColumn->getLength()
1107 1107
             );
1108 1108
 
1109
-            return '@' . $this->annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')';
1109
+            return '@'.$this->annotationsPrefix.'DiscriminatorColumn('.$columnDefinition.')';
1110 1110
         }
1111 1111
     }
1112 1112
 
@@ -1121,10 +1121,10 @@  discard block
 block discarded – undo
1121 1121
             $inheritanceClassMap = [];
1122 1122
 
1123 1123
             foreach ($metadata->discriminatorMap as $type => $class) {
1124
-                $inheritanceClassMap[] .= '"' . $type . '" = "' . $class . '"';
1124
+                $inheritanceClassMap[] .= '"'.$type.'" = "'.$class.'"';
1125 1125
             }
1126 1126
 
1127
-            return '@' . $this->annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})';
1127
+            return '@'.$this->annotationsPrefix.'DiscriminatorMap({'.implode(', ', $inheritanceClassMap).'})';
1128 1128
         }
1129 1129
     }
1130 1130
 
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
 
1156 1156
         foreach ($metadata->getDeclaredPropertiesIterator() as $fieldName => $property) {
1157 1157
             if ($property instanceof FieldMetadata) {
1158
-                $nullable  = $property->isNullable() ? 'null' : null;
1158
+                $nullable = $property->isNullable() ? 'null' : null;
1159 1159
 
1160 1160
                 if ($code = $this->generateEntityStubMethod($metadata, 'get', $fieldName, $property->getTypeName(), $nullable)) {
1161 1161
                     $methods[] = $code;
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
         ;
1212 1212
 
1213 1213
         foreach ($joinColumns as $joinColumn) {
1214
-            if (! $joinColumn->isNullable()) {
1214
+            if ( ! $joinColumn->isNullable()) {
1215 1215
                 return false;
1216 1216
             }
1217 1217
         }
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
 
1261 1261
             if ($property instanceof FieldMetadata) {
1262 1262
                 $options      = $property->getOptions();
1263
-                $defaultValue = isset($options['default']) ? ' = ' . var_export($options['default'], true) : null;
1263
+                $defaultValue = isset($options['default']) ? ' = '.var_export($options['default'], true) : null;
1264 1264
 
1265 1265
                 $lines[] = $this->generateFieldMappingPropertyDocBlock($property, $metadata);
1266 1266
             } else {
@@ -1269,7 +1269,7 @@  discard block
 block discarded – undo
1269 1269
                 $lines[] = $this->generateAssociationMappingPropertyDocBlock($property, $metadata);
1270 1270
             }
1271 1271
 
1272
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldName . $defaultValue . ";\n";
1272
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldName.$defaultValue.";\n";
1273 1273
         }
1274 1274
 
1275 1275
         return implode("\n", $lines);
@@ -1307,7 +1307,7 @@  discard block
 block discarded – undo
1307 1307
      */
1308 1308
     protected function generateEntityStubMethod(ClassMetadata $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null)
1309 1309
     {
1310
-        $methodName = $type . Inflector::classify($fieldName);
1310
+        $methodName = $type.Inflector::classify($fieldName);
1311 1311
         $variableName = Inflector::camelize($fieldName);
1312 1312
 
1313 1313
         if (in_array($type, ["add", "remove"])) {
@@ -1328,18 +1328,18 @@  discard block
 block discarded – undo
1328 1328
         $variableType   = $typeHint ? $this->getType($typeHint) : null;
1329 1329
 
1330 1330
         if ($typeHint && ! isset($types[$typeHint])) {
1331
-            $variableType   =  '\\' . ltrim($variableType, '\\');
1332
-            $methodTypeHint =  '\\' . $typeHint . ' ';
1331
+            $variableType   = '\\'.ltrim($variableType, '\\');
1332
+            $methodTypeHint = '\\'.$typeHint.' ';
1333 1333
         }
1334 1334
 
1335 1335
         $replacements = [
1336
-          '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1336
+          '<description>'       => ucfirst($type).' '.$variableName.'.',
1337 1337
           '<methodTypeHint>'    => $methodTypeHint,
1338
-          '<variableType>'      => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''),
1338
+          '<variableType>'      => $variableType.(null !== $defaultValue ? ('|'.$defaultValue) : ''),
1339 1339
           '<variableName>'      => $variableName,
1340 1340
           '<methodName>'        => $methodName,
1341 1341
           '<fieldName>'         => $fieldName,
1342
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '',
1342
+          '<variableDefault>'   => ($defaultValue !== null) ? (' = '.$defaultValue) : '',
1343 1343
           '<entity>'            => $this->getClassName($metadata)
1344 1344
         ];
1345 1345
 
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
         $this->staticReflection[$metadata->getClassName()]['methods'][] = $methodName;
1369 1369
 
1370 1370
         $replacements = [
1371
-            '<name>'        => $this->annotationsPrefix . ucfirst($name),
1371
+            '<name>'        => $this->annotationsPrefix.ucfirst($name),
1372 1372
             '<methodName>'  => $methodName,
1373 1373
         ];
1374 1374
 
@@ -1388,25 +1388,25 @@  discard block
 block discarded – undo
1388 1388
      */
1389 1389
     protected function generateIdentifierAnnotation(Property $metadata)
1390 1390
     {
1391
-        $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1391
+        $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1392 1392
 
1393 1393
         if ($metadata instanceof FieldMetadata) {
1394 1394
             if ($generatorType = $this->getIdGeneratorTypeString($metadata->getValueGenerator()->getType())) {
1395
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1395
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1396 1396
             }
1397 1397
 
1398 1398
             if ($metadata->getValueGenerator()->getType()) {
1399 1399
                 $generator = [];
1400 1400
 
1401 1401
                 if (isset($metadata->getValueGenerator()->getDefinition()['sequenceName'])) {
1402
-                    $generator[] = 'sequenceName="' . $metadata->getValueGenerator()->getDefinition()['sequenceName'] . '"';
1402
+                    $generator[] = 'sequenceName="'.$metadata->getValueGenerator()->getDefinition()['sequenceName'].'"';
1403 1403
                 }
1404 1404
 
1405 1405
                 if (isset($metadata->getValueGenerator()->getDefinition()['allocationSize'])) {
1406
-                    $generator[] = 'allocationSize=' . $metadata->getValueGenerator()->getDefinition()['allocationSize'];
1406
+                    $generator[] = 'allocationSize='.$metadata->getValueGenerator()->getDefinition()['allocationSize'];
1407 1407
                 }
1408 1408
 
1409
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'SequenceGenerator(' . implode(', ', $generator) . ')';
1409
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'SequenceGenerator('.implode(', ', $generator).')';
1410 1410
             }
1411 1411
         }
1412 1412
 
@@ -1422,34 +1422,34 @@  discard block
 block discarded – undo
1422 1422
     {
1423 1423
         $lines            = [];
1424 1424
         $joinTableAnnot   = [];
1425
-        $joinTableAnnot[] = 'name="' . $joinTable->getName() . '"';
1425
+        $joinTableAnnot[] = 'name="'.$joinTable->getName().'"';
1426 1426
 
1427
-        if (! empty($joinTable->getSchema())) {
1428
-            $joinTableAnnot[] = 'schema="' . $joinTable->getSchema() . '"';
1427
+        if ( ! empty($joinTable->getSchema())) {
1428
+            $joinTableAnnot[] = 'schema="'.$joinTable->getSchema().'"';
1429 1429
         }
1430 1430
 
1431
-        $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinTable(' . implode(', ', $joinTableAnnot) . ',';
1432
-        $lines[] = $this->spaces . ' *   joinColumns={';
1431
+        $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinTable('.implode(', ', $joinTableAnnot).',';
1432
+        $lines[] = $this->spaces.' *   joinColumns={';
1433 1433
 
1434 1434
         $joinColumnsLines = [];
1435 1435
 
1436 1436
         foreach ($joinTable->getJoinColumns() as $joinColumn) {
1437
-            $joinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1437
+            $joinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1438 1438
         }
1439 1439
 
1440
-        $lines[] = implode(",". PHP_EOL, $joinColumnsLines);
1441
-        $lines[] = $this->spaces . ' *   },';
1442
-        $lines[] = $this->spaces . ' *   inverseJoinColumns={';
1440
+        $lines[] = implode(",".PHP_EOL, $joinColumnsLines);
1441
+        $lines[] = $this->spaces.' *   },';
1442
+        $lines[] = $this->spaces.' *   inverseJoinColumns={';
1443 1443
 
1444 1444
         $inverseJoinColumnsLines = [];
1445 1445
 
1446 1446
         foreach ($joinTable->getInverseJoinColumns() as $joinColumn) {
1447
-            $inverseJoinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1447
+            $inverseJoinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1448 1448
         }
1449 1449
 
1450
-        $lines[] = implode(",". PHP_EOL, $inverseJoinColumnsLines);
1451
-        $lines[] = $this->spaces . ' *   }';
1452
-        $lines[] = $this->spaces . ' * )';
1450
+        $lines[] = implode(",".PHP_EOL, $inverseJoinColumnsLines);
1451
+        $lines[] = $this->spaces.' *   }';
1452
+        $lines[] = $this->spaces.' * )';
1453 1453
 
1454 1454
         return implode(PHP_EOL, $lines);
1455 1455
     }
@@ -1463,23 +1463,23 @@  discard block
 block discarded – undo
1463 1463
     {
1464 1464
         $joinColumnAnnot = [];
1465 1465
 
1466
-        $joinColumnAnnot[] = 'name="' . $joinColumn->getColumnName() . '"';
1467
-        $joinColumnAnnot[] = 'referencedColumnName="' . $joinColumn->getReferencedColumnName() . '"';
1466
+        $joinColumnAnnot[] = 'name="'.$joinColumn->getColumnName().'"';
1467
+        $joinColumnAnnot[] = 'referencedColumnName="'.$joinColumn->getReferencedColumnName().'"';
1468 1468
 
1469 1469
         if ($joinColumn->isUnique()) {
1470 1470
             $joinColumnAnnot[] = 'unique=true';
1471 1471
         }
1472 1472
 
1473
-        if (!$joinColumn->isNullable()) {
1473
+        if ( ! $joinColumn->isNullable()) {
1474 1474
             $joinColumnAnnot[] = 'nullable=false';
1475 1475
         }
1476 1476
 
1477
-        if (!empty($joinColumn->getOnDelete())) {
1478
-            $joinColumnAnnot[] = 'onDelete="' . $joinColumn->getOnDelete() . '"';
1477
+        if ( ! empty($joinColumn->getOnDelete())) {
1478
+            $joinColumnAnnot[] = 'onDelete="'.$joinColumn->getOnDelete().'"';
1479 1479
         }
1480 1480
 
1481 1481
         if ($joinColumn->getColumnDefinition()) {
1482
-            $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn->getColumnDefinition() . '"';
1482
+            $joinColumnAnnot[] = 'columnDefinition="'.$joinColumn->getColumnDefinition().'"';
1483 1483
         }
1484 1484
 
1485 1485
         $options = [];
@@ -1494,7 +1494,7 @@  discard block
 block discarded – undo
1494 1494
             $joinColumnAnnot[] = 'options={'.implode(',', $options).'}';
1495 1495
         }
1496 1496
 
1497
-        return '@' . $this->annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')';
1497
+        return '@'.$this->annotationsPrefix.'JoinColumn('.implode(', ', $joinColumnAnnot).')';
1498 1498
     }
1499 1499
 
1500 1500
     /**
@@ -1506,16 +1506,16 @@  discard block
 block discarded – undo
1506 1506
     protected function generateAssociationMappingPropertyDocBlock(AssociationMetadata $association, ClassMetadata $metadata)
1507 1507
     {
1508 1508
         $lines = [];
1509
-        $lines[] = $this->spaces . '/**';
1509
+        $lines[] = $this->spaces.'/**';
1510 1510
 
1511 1511
         if ($association instanceof ToManyAssociationMetadata) {
1512
-            $lines[] = $this->spaces . ' * @var \Doctrine\Common\Collections\Collection';
1512
+            $lines[] = $this->spaces.' * @var \Doctrine\Common\Collections\Collection';
1513 1513
         } else {
1514
-            $lines[] = $this->spaces . ' * @var \\' . ltrim($association->getTargetEntity(), '\\');
1514
+            $lines[] = $this->spaces.' * @var \\'.ltrim($association->getTargetEntity(), '\\');
1515 1515
         }
1516 1516
 
1517 1517
         if ($this->generateAnnotations) {
1518
-            $lines[] = $this->spaces . ' *';
1518
+            $lines[] = $this->spaces.' *';
1519 1519
 
1520 1520
             if ($association->isPrimaryKey()) {
1521 1521
                 $lines[] = $this->generateIdentifierAnnotation($association);
@@ -1535,18 +1535,18 @@  discard block
 block discarded – undo
1535 1535
 
1536 1536
             $typeOptions = [];
1537 1537
 
1538
-            $typeOptions[] = 'targetEntity="' . $association->getTargetEntity() . '"';
1538
+            $typeOptions[] = 'targetEntity="'.$association->getTargetEntity().'"';
1539 1539
 
1540 1540
             if ($association->getMappedBy()) {
1541
-                $typeOptions[] = 'mappedBy="' . $association->getMappedBy() . '"';
1541
+                $typeOptions[] = 'mappedBy="'.$association->getMappedBy().'"';
1542 1542
             }
1543 1543
 
1544 1544
             if ($association->getInversedBy()) {
1545
-                $typeOptions[] = 'inversedBy="' . $association->getInversedBy() . '"';
1545
+                $typeOptions[] = 'inversedBy="'.$association->getInversedBy().'"';
1546 1546
             }
1547 1547
 
1548 1548
             if ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy()) {
1549
-                $typeOptions[] = 'indexBy="' . $association->getIndexedBy() . '"';
1549
+                $typeOptions[] = 'indexBy="'.$association->getIndexedBy().'"';
1550 1550
             }
1551 1551
 
1552 1552
             if ($association->isOrphanRemoval()) {
@@ -1566,28 +1566,28 @@  discard block
 block discarded – undo
1566 1566
                     $cascades = ['"all"'];
1567 1567
                 }
1568 1568
 
1569
-                $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
1569
+                $typeOptions[] = 'cascade={'.implode(',', $cascades).'}';
1570 1570
             }
1571 1571
 
1572 1572
             if ($association->getFetchMode() !== FetchMode::LAZY) {
1573
-                $typeOptions[] = 'fetch="' . $association->getFetchMode() . '"';
1573
+                $typeOptions[] = 'fetch="'.$association->getFetchMode().'"';
1574 1574
             }
1575 1575
 
1576
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')';
1576
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.''.$type.'('.implode(', ', $typeOptions).')';
1577 1577
 
1578 1578
             if ($association instanceof ToOneAssociationMetadata && $association->getJoinColumns()) {
1579
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinColumns({';
1579
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinColumns({';
1580 1580
 
1581 1581
                 $joinColumnsLines = [];
1582 1582
 
1583 1583
                 foreach ($association->getJoinColumns() as $joinColumn) {
1584 1584
                     if ($joinColumnAnnot = $this->generateJoinColumnAnnotation($joinColumn)) {
1585
-                        $joinColumnsLines[] = $this->spaces . ' *   ' . $joinColumnAnnot;
1585
+                        $joinColumnsLines[] = $this->spaces.' *   '.$joinColumnAnnot;
1586 1586
                     }
1587 1587
                 }
1588 1588
 
1589 1589
                 $lines[] = implode(",\n", $joinColumnsLines);
1590
-                $lines[] = $this->spaces . ' * })';
1590
+                $lines[] = $this->spaces.' * })';
1591 1591
             }
1592 1592
 
1593 1593
             if ($association instanceof ToManyAssociationMetadata) {
@@ -1596,20 +1596,20 @@  discard block
 block discarded – undo
1596 1596
                 }
1597 1597
 
1598 1598
                 if ($association->getOrderBy()) {
1599
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'OrderBy({';
1599
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'OrderBy({';
1600 1600
                     $orderBy = [];
1601 1601
 
1602 1602
                     foreach ($association->getOrderBy() as $name => $direction) {
1603
-                        $orderBy[] = $this->spaces . ' *     "' . $name . '"="' . $direction . '"';
1603
+                        $orderBy[] = $this->spaces.' *     "'.$name.'"="'.$direction.'"';
1604 1604
                     }
1605 1605
 
1606
-                    $lines[] = implode(',' . PHP_EOL, $orderBy);
1607
-                    $lines[] = $this->spaces . ' * })';
1606
+                    $lines[] = implode(','.PHP_EOL, $orderBy);
1607
+                    $lines[] = $this->spaces.' * })';
1608 1608
                 }
1609 1609
             }
1610 1610
         }
1611 1611
 
1612
-        $lines[] = $this->spaces . ' */';
1612
+        $lines[] = $this->spaces.' */';
1613 1613
 
1614 1614
         return implode("\n", $lines);
1615 1615
     }
@@ -1626,49 +1626,49 @@  discard block
 block discarded – undo
1626 1626
 
1627 1627
         $lines = [];
1628 1628
 
1629
-        $lines[] = $this->spaces . '/**';
1630
-        $lines[] = $this->spaces . ' * @var '
1629
+        $lines[] = $this->spaces.'/**';
1630
+        $lines[] = $this->spaces.' * @var '
1631 1631
             . $this->getType($fieldType)
1632 1632
             . ($propertyMetadata->isNullable() ? '|null' : '');
1633 1633
 
1634 1634
         if ($this->generateAnnotations) {
1635 1635
             $column  = [];
1636
-            $lines[] = $this->spaces . ' *';
1636
+            $lines[] = $this->spaces.' *';
1637 1637
 
1638 1638
             if ($propertyMetadata->getColumnName()) {
1639
-                $column[] = 'name="' . $propertyMetadata->getColumnName() . '"';
1639
+                $column[] = 'name="'.$propertyMetadata->getColumnName().'"';
1640 1640
             }
1641 1641
 
1642
-            $column[] = 'type="' . $fieldType . '"';
1642
+            $column[] = 'type="'.$fieldType.'"';
1643 1643
 
1644 1644
             if (is_int($propertyMetadata->getLength())) {
1645
-                $column[] = 'length=' . $propertyMetadata->getLength();
1645
+                $column[] = 'length='.$propertyMetadata->getLength();
1646 1646
             }
1647 1647
 
1648 1648
             if (is_int($propertyMetadata->getPrecision())) {
1649
-                $column[] = 'precision=' .  $propertyMetadata->getPrecision();
1649
+                $column[] = 'precision='.$propertyMetadata->getPrecision();
1650 1650
             }
1651 1651
 
1652 1652
             if (is_int($propertyMetadata->getScale())) {
1653
-                $column[] = 'scale=' .  $propertyMetadata->getScale();
1653
+                $column[] = 'scale='.$propertyMetadata->getScale();
1654 1654
             }
1655 1655
 
1656 1656
             if ($propertyMetadata->isNullable()) {
1657
-                $column[] = 'nullable=' .  var_export($propertyMetadata->isNullable(), true);
1657
+                $column[] = 'nullable='.var_export($propertyMetadata->isNullable(), true);
1658 1658
             }
1659 1659
 
1660 1660
             if ($propertyMetadata->isUnique()) {
1661
-                $column[] = 'unique=' . var_export($propertyMetadata->isUnique(), true);
1661
+                $column[] = 'unique='.var_export($propertyMetadata->isUnique(), true);
1662 1662
             }
1663 1663
 
1664 1664
             if ($propertyMetadata->getColumnDefinition()) {
1665
-                $column[] = 'columnDefinition="' . $propertyMetadata->getColumnDefinition() . '"';
1665
+                $column[] = 'columnDefinition="'.$propertyMetadata->getColumnDefinition().'"';
1666 1666
             }
1667 1667
 
1668 1668
             $options = [];
1669 1669
 
1670 1670
             if (isset($fieldMapping['options']['default']) && $fieldMapping['options']['default']) {
1671
-                $options[] = '"default"="' . $fieldMapping['options']['default'] .'"';
1671
+                $options[] = '"default"="'.$fieldMapping['options']['default'].'"';
1672 1672
             }
1673 1673
 
1674 1674
             if (isset($fieldMapping['options']['unsigned']) && $fieldMapping['options']['unsigned']) {
@@ -1680,33 +1680,33 @@  discard block
 block discarded – undo
1680 1680
             }
1681 1681
 
1682 1682
             if (isset($fieldMapping['options']['comment']) && $fieldMapping['options']['comment']) {
1683
-                $options[] = '"comment"="' . $fieldMapping['options']['comment'] .'"';
1683
+                $options[] = '"comment"="'.$fieldMapping['options']['comment'].'"';
1684 1684
             }
1685 1685
 
1686 1686
             if (isset($fieldMapping['options']['collation']) && $fieldMapping['options']['collation']) {
1687
-                $options[] = '"collation"="' . $fieldMapping['options']['collation'] .'"';
1687
+                $options[] = '"collation"="'.$fieldMapping['options']['collation'].'"';
1688 1688
             }
1689 1689
 
1690 1690
             if (isset($fieldMapping['options']['check']) && $fieldMapping['options']['check']) {
1691
-                $options[] = '"check"="' . $fieldMapping['options']['check'] .'"';
1691
+                $options[] = '"check"="'.$fieldMapping['options']['check'].'"';
1692 1692
             }
1693 1693
 
1694 1694
             if ($options) {
1695 1695
                 $column[] = 'options={'.implode(',', $options).'}';
1696 1696
             }
1697 1697
 
1698
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Column(' . implode(', ', $column) . ')';
1698
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Column('.implode(', ', $column).')';
1699 1699
 
1700 1700
             if ($propertyMetadata->isPrimaryKey()) {
1701 1701
                 $lines[] = $this->generateIdentifierAnnotation($propertyMetadata);
1702 1702
             }
1703 1703
 
1704 1704
             if ($metadata->isVersioned() && $metadata->versionProperty->getName() === $propertyMetadata->getName()) {
1705
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Version';
1705
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Version';
1706 1706
             }
1707 1707
         }
1708 1708
 
1709
-        $lines[] = $this->spaces . ' */';
1709
+        $lines[] = $this->spaces.' */';
1710 1710
 
1711 1711
         return implode("\n", $lines);
1712 1712
     }
@@ -1719,27 +1719,27 @@  discard block
 block discarded – undo
1719 1719
     protected function generateEmbeddedPropertyDocBlock(array $embeddedClass)
1720 1720
     {
1721 1721
         $lines = [];
1722
-        $lines[] = $this->spaces . '/**';
1723
-        $lines[] = $this->spaces . ' * @var \\' . ltrim($embeddedClass['class'], '\\');
1722
+        $lines[] = $this->spaces.'/**';
1723
+        $lines[] = $this->spaces.' * @var \\'.ltrim($embeddedClass['class'], '\\');
1724 1724
 
1725 1725
         if ($this->generateAnnotations) {
1726
-            $lines[] = $this->spaces . ' *';
1726
+            $lines[] = $this->spaces.' *';
1727 1727
 
1728
-            $embedded = ['class="' . $embeddedClass['class'] . '"'];
1728
+            $embedded = ['class="'.$embeddedClass['class'].'"'];
1729 1729
 
1730 1730
             if (isset($embeddedClass['columnPrefix'])) {
1731 1731
                 if (is_string($embeddedClass['columnPrefix'])) {
1732
-                    $embedded[] = 'columnPrefix="' . $embeddedClass['columnPrefix'] . '"';
1732
+                    $embedded[] = 'columnPrefix="'.$embeddedClass['columnPrefix'].'"';
1733 1733
                 } else {
1734
-                    $embedded[] = 'columnPrefix=' . var_export($embeddedClass['columnPrefix'], true);
1734
+                    $embedded[] = 'columnPrefix='.var_export($embeddedClass['columnPrefix'], true);
1735 1735
                 }
1736 1736
             }
1737 1737
 
1738
-            $lines[] = $this->spaces . ' * @' .
1739
-                $this->annotationsPrefix . 'Embedded(' . implode(', ', $embedded) . ')';
1738
+            $lines[] = $this->spaces.' * @'.
1739
+                $this->annotationsPrefix.'Embedded('.implode(', ', $embedded).')';
1740 1740
         }
1741 1741
 
1742
-        $lines[] = $this->spaces . ' */';
1742
+        $lines[] = $this->spaces.' */';
1743 1743
 
1744 1744
         return implode("\n", $lines);
1745 1745
     }
@@ -1753,13 +1753,13 @@  discard block
 block discarded – undo
1753 1753
         $processedClasses = [];
1754 1754
         foreach ($metadata->entityListeners as $event => $eventListeners) {
1755 1755
             foreach ($eventListeners as $eventListener) {
1756
-                $processedClasses[] = '"' . $eventListener['class'] . '"';
1756
+                $processedClasses[] = '"'.$eventListener['class'].'"';
1757 1757
             }
1758 1758
         }
1759 1759
 
1760 1760
         return \sprintf(
1761 1761
             '%s%s({%s})',
1762
-            '@' . $this->annotationsPrefix,
1762
+            '@'.$this->annotationsPrefix,
1763 1763
             'EntityListeners',
1764 1764
             \implode(',', \array_unique($processedClasses))
1765 1765
         );
@@ -1777,7 +1777,7 @@  discard block
 block discarded – undo
1777 1777
 
1778 1778
         foreach ($lines as $key => $value) {
1779 1779
             if ( ! empty($value)) {
1780
-                $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key];
1780
+                $lines[$key] = str_repeat($this->spaces, $num).$lines[$key];
1781 1781
             }
1782 1782
         }
1783 1783
 
@@ -1845,8 +1845,8 @@  discard block
 block discarded – undo
1845 1845
 
1846 1846
         foreach ($options as $name => $option) {
1847 1847
             $optionValue = is_array($option)
1848
-                ? '{' . $this->exportTableOptions($option) . '}'
1849
-                : '"' . (string) $option . '"'
1848
+                ? '{'.$this->exportTableOptions($option).'}'
1849
+                : '"'.(string) $option.'"'
1850 1850
             ;
1851 1851
 
1852 1852
             $optionsStr[] = sprintf('"%s"=%s', $name, $optionValue);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -298,7 +298,7 @@
 block discarded – undo
298 298
 
299 299
             if ($property instanceof FieldMetadata) {
300 300
                 $output = array_merge($output, $this->formatColumn($property));
301
-            }  else if ($property instanceof AssociationMetadata) {
301
+            } else if ($property instanceof AssociationMetadata) {
302 302
                 // @todo guilhermeblanco Fix me! We are trying to iterate through an AssociationMetadata instance
303 303
                 foreach ($property as $field => $value) {
304 304
                     $output[] = $this->formatField(sprintf('    %s', $field), $this->formatValue($value));
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
     protected function configure()
43 43
     {
44 44
         $this->setName('orm:mapping:describe')
45
-             ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
46
-             ->setDescription('Display information about mapped objects')
47
-             ->setHelp(<<<EOT
45
+                ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
46
+                ->setDescription('Display information about mapped objects')
47
+                ->setHelp(<<<EOT
48 48
 The %command.full_name% command describes the metadata for the given full or partial entity class name.
49 49
 
50 50
     <info>%command.full_name%</info> My\Namespace\Entity\MyEntity
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     <info>%command.full_name%</info> MyEntity
55 55
 EOT
56
-             );
56
+                );
57 57
     }
58 58
 
59 59
     /**
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
     private function getMappedEntities(EntityManagerInterface $entityManager)
135 135
     {
136 136
         $entityClassNames = $entityManager->getConfiguration()
137
-                                          ->getMetadataDriverImpl()
138
-                                          ->getAllClassNames();
137
+                                            ->getMetadataDriverImpl()
138
+                                            ->getAllClassNames();
139 139
 
140 140
         if ( ! $entityClassNames) {
141 141
             throw new \InvalidArgumentException(
Please login to merge, or discard this 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\Tools\Console\Command;
6 6
 
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 
164 164
         $matches = array_filter(
165 165
             $this->getMappedEntities($entityManager),
166
-            function ($mappedEntity) use ($entityName) {
167
-                return preg_match('{' . preg_quote($entityName) . '}', $mappedEntity);
166
+            function($mappedEntity) use ($entityName) {
167
+                return preg_match('{'.preg_quote($entityName).'}', $mappedEntity);
168 168
             }
169 169
         );
170 170
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
             $output[] = $this->formatField(
223 223
                 sprintf('  %s', $parentClass->getParent()),
224
-                ($parentClass->isRootEntity() ? '(Root) ' : '') . $this->formatValue($attributes)
224
+                ($parentClass->isRootEntity() ? '(Root) ' : '').$this->formatValue($attributes)
225 225
             );
226 226
         }
227 227
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         }
247 247
 
248 248
         if (is_bool($value)) {
249
-            return '<comment>' . ($value ? 'True' : 'False') . '</comment>';
249
+            return '<comment>'.($value ? 'True' : 'False').'</comment>';
250 250
         }
251 251
 
252 252
         if (empty($value)) {
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 
325 325
             if ($property instanceof FieldMetadata) {
326 326
                 $output = array_merge($output, $this->formatColumn($property));
327
-            }  else if ($property instanceof AssociationMetadata) {
327
+            } else if ($property instanceof AssociationMetadata) {
328 328
                 // @todo guilhermeblanco Fix me! We are trying to iterate through an AssociationMetadata instance
329 329
                 foreach ($property as $field => $value) {
330 330
                     $output[] = $this->formatField(sprintf('    %s', $field), $this->formatValue($value));
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -742,9 +742,9 @@
 block discarded – undo
742 742
         );
743 743
     }
744 744
 
745
-     /**
746
-     * {@inheritdoc}
747
-     */
745
+        /**
746
+         * {@inheritdoc}
747
+         */
748 748
     protected function getHash()
749 749
     {
750 750
         return sha1(parent::getHash(). '-'. $this->firstResult . '-' . $this->maxResults);
Please login to merge, or discard this 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;
6 6
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * A query object is in CLEAN state when it has NO unparsed/unprocessed DQL parts.
28 28
      */
29
-    const STATE_CLEAN  = 1;
29
+    const STATE_CLEAN = 1;
30 30
 
31 31
     /**
32 32
      * A query object is in state DIRTY when it has DQL parts that have not yet been
@@ -717,11 +717,11 @@  discard block
 block discarded – undo
717 717
             ->getName();
718 718
 
719 719
         return md5(
720
-            $this->getDQL() . serialize($this->hints) .
721
-            '&platform=' . $platform .
722
-            ($this->em->hasFilters() ? $this->em->getFilters()->getHash() : '') .
723
-            '&firstResult=' . $this->firstResult . '&maxResult=' . $this->maxResults .
724
-            '&hydrationMode=' . $this->hydrationMode . '&types=' . serialize($this->parsedTypes) . 'DOCTRINE_QUERY_CACHE_SALT'
720
+            $this->getDQL().serialize($this->hints).
721
+            '&platform='.$platform.
722
+            ($this->em->hasFilters() ? $this->em->getFilters()->getHash() : '').
723
+            '&firstResult='.$this->firstResult.'&maxResult='.$this->maxResults.
724
+            '&hydrationMode='.$this->hydrationMode.'&types='.serialize($this->parsedTypes).'DOCTRINE_QUERY_CACHE_SALT'
725 725
         );
726 726
     }
727 727
 
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
      */
731 731
     protected function getHash()
732 732
     {
733
-        return sha1(parent::getHash(). '-'. $this->firstResult . '-' . $this->maxResults);
733
+        return sha1(parent::getHash().'-'.$this->firstResult.'-'.$this->maxResults);
734 734
     }
735 735
 
736 736
     /**
Please login to merge, or discard this patch.
Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
         $ownerId   = $this->uow->getEntityIdentifier($collection->getOwner());
91 91
         $key       = new CollectionCacheKey($this->sourceEntity->getRootClassName(), $fieldName, $ownerId);
92 92
 
93
-       // Invalidate non initialized collections OR ordered collection
93
+        // Invalidate non initialized collections OR ordered collection
94 94
         if (($isDirty && ! $isInitialized) ||
95 95
             ($this->association instanceof ToManyAssociationMetadata && $this->association->getOrderBy())) {
96 96
             $this->persister->update($collection);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 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\Cache\Persister\Collection;
7 7
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/ConfigurationTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM;
6 6
 
Please login to merge, or discard this patch.