Completed
Pull Request — master (#7413)
by Michael
10:40
created
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
 
306 306
         // FIXME: Order with composite keys might not be correct
307 307
         $sql = 'SELECT ' . $columnName
308
-             . ' FROM ' . $tableName
309
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
308
+                . ' FROM ' . $tableName
309
+                . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
310 310
 
311 311
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
312 312
         $versionType = $versionProperty->getType();
@@ -519,8 +519,8 @@  discard block
 block discarded – undo
519 519
         }
520 520
 
521 521
         $sql = 'UPDATE ' . $quotedTableName
522
-             . ' SET ' . implode(', ', $set)
523
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
522
+                . ' SET ' . implode(', ', $set)
523
+                . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
524 524
 
525 525
         $result = $this->conn->executeUpdate($sql, $params, $types);
526 526
 
@@ -1641,9 +1641,9 @@  discard block
 block discarded – undo
1641 1641
         $lock  = $this->getLockTablesSql($lockMode);
1642 1642
         $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1643 1643
         $sql   = 'SELECT 1 '
1644
-             . $lock
1645
-             . $where
1646
-             . $lockSql;
1644
+                . $lock
1645
+                . $where
1646
+                . $lockSql;
1647 1647
 
1648 1648
         [$params, $types] = $this->expandParameters($criteria);
1649 1649
 
@@ -2112,8 +2112,8 @@  discard block
 block discarded – undo
2112 2112
         $alias = $this->getSQLTableAlias($this->class->getTableName());
2113 2113
 
2114 2114
         $sql = 'SELECT 1 '
2115
-             . $this->getLockTablesSql(null)
2116
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2115
+                . $this->getLockTablesSql(null)
2116
+                . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2117 2117
 
2118 2118
         [$params, $types] = $this->expandParameters($criteria);
2119 2119
 
Please login to merge, or discard this patch.
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -297,16 +297,16 @@  discard block
 block discarded – undo
297 297
         $tableName      = $versionedClass->table->getQuotedQualifiedName($this->platform);
298 298
         $columnName     = $this->platform->quoteIdentifier($versionProperty->getColumnName());
299 299
         $identifier     = array_map(
300
-            function ($columnName) {
300
+            function($columnName) {
301 301
                 return $this->platform->quoteIdentifier($columnName);
302 302
             },
303 303
             array_keys($versionedClass->getIdentifierColumns($this->em))
304 304
         );
305 305
 
306 306
         // FIXME: Order with composite keys might not be correct
307
-        $sql = 'SELECT ' . $columnName
308
-             . ' FROM ' . $tableName
309
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
307
+        $sql = 'SELECT '.$columnName
308
+             . ' FROM '.$tableName
309
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
310 310
 
311 311
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
312 312
         $versionType = $versionProperty->getType();
@@ -345,13 +345,13 @@  discard block
 block discarded – undo
345 345
         $tableName  = $this->class->getTableName();
346 346
         $updateData = $this->prepareUpdateData($entity);
347 347
 
348
-        if (! isset($updateData[$tableName])) {
348
+        if ( ! isset($updateData[$tableName])) {
349 349
             return;
350 350
         }
351 351
 
352 352
         $data = $updateData[$tableName];
353 353
 
354
-        if (! $data) {
354
+        if ( ! $data) {
355 355
             return;
356 356
         }
357 357
 
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
             if ($value !== null) {
405 405
                 // @todo guilhermeblanco Make sure we do not have flat association values.
406
-                if (! is_array($value)) {
406
+                if ( ! is_array($value)) {
407 407
                     $value = [$targetClass->identifier[0] => $value];
408 408
                 }
409 409
 
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
417 417
                 $targetField          = $targetClass->fieldNames[$referencedColumnName];
418 418
 
419
-                if (! $joinColumn->getType()) {
419
+                if ( ! $joinColumn->getType()) {
420 420
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
421 421
                 }
422 422
 
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
                         $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
483 483
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
484 484
 
485
-                        if (! $joinColumn->getType()) {
485
+                        if ( ! $joinColumn->getType()) {
486 486
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
487 487
                         }
488 488
 
@@ -509,18 +509,18 @@  discard block
 block discarded – undo
509 509
                 case Type::SMALLINT:
510 510
                 case Type::INTEGER:
511 511
                 case Type::BIGINT:
512
-                    $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';
512
+                    $set[] = $versionColumnName.' = '.$versionColumnName.' + 1';
513 513
                     break;
514 514
 
515 515
                 case Type::DATETIME:
516
-                    $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';
516
+                    $set[] = $versionColumnName.' = CURRENT_TIMESTAMP';
517 517
                     break;
518 518
             }
519 519
         }
520 520
 
521
-        $sql = 'UPDATE ' . $quotedTableName
522
-             . ' SET ' . implode(', ', $set)
523
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
521
+        $sql = 'UPDATE '.$quotedTableName
522
+             . ' SET '.implode(', ', $set)
523
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
524 524
 
525 525
         $result = $this->conn->executeUpdate($sql, $params, $types);
526 526
 
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
     protected function deleteJoinTableRecords($identifier)
538 538
     {
539 539
         foreach ($this->class->getDeclaredPropertiesIterator() as $association) {
540
-            if (! ($association instanceof ManyToManyAssociationMetadata)) {
540
+            if ( ! ($association instanceof ManyToManyAssociationMetadata)) {
541 541
                 continue;
542 542
             }
543 543
 
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
             $otherKeys         = [];
550 550
             $keys              = [];
551 551
 
552
-            if (! $owningAssociation->isOwningSide()) {
552
+            if ( ! $owningAssociation->isOwningSide()) {
553 553
                 $class             = $this->em->getClassMetadata($association->getTargetEntity());
554 554
                 $owningAssociation = $class->getProperty($association->getMappedBy());
555 555
             }
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
             }
660 660
 
661 661
             // Only owning side of x-1 associations can have a FK column.
662
-            if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
662
+            if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
663 663
                 continue;
664 664
             }
665 665
 
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
                 /** @var JoinColumnMetadata $joinColumn */
680 680
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
681 681
 
682
-                if (! $joinColumn->getType()) {
682
+                if ( ! $joinColumn->getType()) {
683 683
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
684 684
                 }
685 685
 
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
         $propertyName = $this->class->fieldNames[$columnName];
707 707
         $property     = $this->class->getProperty($propertyName);
708 708
 
709
-        if (! $property) {
709
+        if ( ! $property) {
710 710
             return null;
711 711
         }
712 712
 
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
             /** @var JoinColumnMetadata $joinColumn */
726 726
             $referencedColumnName = $joinColumn->getReferencedColumnName();
727 727
 
728
-            if (! $joinColumn->getType()) {
728
+            if ( ! $joinColumn->getType()) {
729 729
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
730 730
             }
731 731
 
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
             $sourceKeyColumn = $joinColumn->getReferencedColumnName();
831 831
             $targetKeyColumn = $joinColumn->getColumnName();
832 832
 
833
-            if (! isset($sourceClass->fieldNames[$sourceKeyColumn])) {
833
+            if ( ! isset($sourceClass->fieldNames[$sourceKeyColumn])) {
834 834
                 throw MappingException::joinColumnMustPointToMappedField(
835 835
                     $sourceClass->getClassName(),
836 836
                     $sourceKeyColumn
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
         $criteria    = [];
1058 1058
         $parameters  = [];
1059 1059
 
1060
-        if (! $association->isOwningSide()) {
1060
+        if ( ! $association->isOwningSide()) {
1061 1061
             $class       = $this->em->getClassMetadata($association->getTargetEntity());
1062 1062
             $owningAssoc = $class->getProperty($association->getMappedBy());
1063 1063
         }
@@ -1085,7 +1085,7 @@  discard block
 block discarded – undo
1085 1085
                 $value = $value[$targetClass->identifier[0]];
1086 1086
             }
1087 1087
 
1088
-            $criteria[$joinTableName . '.' . $quotedColumnName] = $value;
1088
+            $criteria[$joinTableName.'.'.$quotedColumnName] = $value;
1089 1089
             $parameters[]                                       = [
1090 1090
                 'value' => $value,
1091 1091
                 'field' => $fieldName,
@@ -1135,11 +1135,11 @@  discard block
 block discarded – undo
1135 1135
 
1136 1136
         switch ($lockMode) {
1137 1137
             case LockMode::PESSIMISTIC_READ:
1138
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1138
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1139 1139
                 break;
1140 1140
 
1141 1141
             case LockMode::PESSIMISTIC_WRITE:
1142
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1142
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1143 1143
                 break;
1144 1144
         }
1145 1145
 
@@ -1150,14 +1150,14 @@  discard block
 block discarded – undo
1150 1150
 
1151 1151
         if ($filterSql !== '') {
1152 1152
             $conditionSql = $conditionSql
1153
-                ? $conditionSql . ' AND ' . $filterSql
1153
+                ? $conditionSql.' AND '.$filterSql
1154 1154
                 : $filterSql;
1155 1155
         }
1156 1156
 
1157
-        $select = 'SELECT ' . $columnList;
1158
-        $from   = ' FROM ' . $tableName . ' ' . $tableAlias;
1159
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1160
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1157
+        $select = 'SELECT '.$columnList;
1158
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1159
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1160
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1161 1161
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1162 1162
         $query  = $select
1163 1163
             . $lock
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
             . $where
1166 1166
             . $orderBySql;
1167 1167
 
1168
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1168
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1169 1169
     }
1170 1170
 
1171 1171
     /**
@@ -1184,13 +1184,13 @@  discard block
 block discarded – undo
1184 1184
 
1185 1185
         if ($filterSql !== '') {
1186 1186
             $conditionSql = $conditionSql
1187
-                ? $conditionSql . ' AND ' . $filterSql
1187
+                ? $conditionSql.' AND '.$filterSql
1188 1188
                 : $filterSql;
1189 1189
         }
1190 1190
 
1191 1191
         $sql = 'SELECT COUNT(*) '
1192
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1193
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1192
+            . 'FROM '.$tableName.' '.$tableAlias
1193
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1194 1194
 
1195 1195
         return $sql;
1196 1196
     }
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
      */
1208 1208
     final protected function getOrderBySQL(array $orderBy, $baseTableAlias)
1209 1209
     {
1210
-        if (! $orderBy) {
1210
+        if ( ! $orderBy) {
1211 1211
             return '';
1212 1212
         }
1213 1213
 
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
         foreach ($orderBy as $fieldName => $orientation) {
1217 1217
             $orientation = strtoupper(trim($orientation));
1218 1218
 
1219
-            if (! in_array($orientation, ['ASC', 'DESC'], true)) {
1219
+            if ( ! in_array($orientation, ['ASC', 'DESC'], true)) {
1220 1220
                 throw InvalidOrientation::fromClassNameAndField($this->class->getClassName(), $fieldName);
1221 1221
             }
1222 1222
 
@@ -1226,11 +1226,11 @@  discard block
 block discarded – undo
1226 1226
                 $tableAlias = $this->getSQLTableAlias($property->getTableName());
1227 1227
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1228 1228
 
1229
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1229
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1230 1230
 
1231 1231
                 continue;
1232 1232
             } elseif ($property instanceof AssociationMetadata) {
1233
-                if (! $property->isOwningSide()) {
1233
+                if ( ! $property->isOwningSide()) {
1234 1234
                     throw InvalidFindByCall::fromInverseSideUsage(
1235 1235
                         $this->class->getClassName(),
1236 1236
                         $fieldName
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
                     /** @var JoinColumnMetadata $joinColumn */
1247 1247
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1248 1248
 
1249
-                    $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation;
1249
+                    $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation;
1250 1250
                 }
1251 1251
 
1252 1252
                 continue;
@@ -1255,7 +1255,7 @@  discard block
 block discarded – undo
1255 1255
             throw UnrecognizedField::byName($fieldName);
1256 1256
         }
1257 1257
 
1258
-        return ' ORDER BY ' . implode(', ', $orderByList);
1258
+        return ' ORDER BY '.implode(', ', $orderByList);
1259 1259
     }
1260 1260
 
1261 1261
     /**
@@ -1297,7 +1297,7 @@  discard block
 block discarded – undo
1297 1297
                     $isAssocToOneInverseSide = $property instanceof ToOneAssociationMetadata && ! $property->isOwningSide();
1298 1298
                     $isAssocFromOneEager     = ! $property instanceof ManyToManyAssociationMetadata && $property->getFetchMode() === FetchMode::EAGER;
1299 1299
 
1300
-                    if (! ($isAssocFromOneEager || $isAssocToOneInverseSide)) {
1300
+                    if ( ! ($isAssocFromOneEager || $isAssocToOneInverseSide)) {
1301 1301
                         break;
1302 1302
                     }
1303 1303
 
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
                         break; // now this is why you shouldn't use inheritance
1313 1313
                     }
1314 1314
 
1315
-                    $assocAlias = 'e' . ($eagerAliasCounter++);
1315
+                    $assocAlias = 'e'.($eagerAliasCounter++);
1316 1316
 
1317 1317
                     $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName);
1318 1318
 
@@ -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());
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
                         $joinCondition[] = $filterSql;
1372 1372
                     }
1373 1373
 
1374
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1374
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1375 1375
                     $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1376 1376
 
1377 1377
                     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
 
@@ -1438,7 +1438,7 @@  discard block
 block discarded – undo
1438 1438
         $owningAssociation = $association;
1439 1439
         $sourceTableAlias  = $this->getSQLTableAlias($this->class->getTableName());
1440 1440
 
1441
-        if (! $association->isOwningSide()) {
1441
+        if ( ! $association->isOwningSide()) {
1442 1442
             $targetEntity      = $this->em->getClassMetadata($association->getTargetEntity());
1443 1443
             $owningAssociation = $targetEntity->getProperty($association->getMappedBy());
1444 1444
         }
@@ -1459,7 +1459,7 @@  discard block
 block discarded – undo
1459 1459
             );
1460 1460
         }
1461 1461
 
1462
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1462
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1463 1463
     }
1464 1464
 
1465 1465
     /**
@@ -1553,7 +1553,7 @@  discard block
 block discarded – undo
1553 1553
                             $columnName           = $joinColumn->getColumnName();
1554 1554
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
1555 1555
 
1556
-                            if (! $joinColumn->getType()) {
1556
+                            if ( ! $joinColumn->getType()) {
1557 1557
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1558 1558
                             }
1559 1559
 
@@ -1592,7 +1592,7 @@  discard block
 block discarded – undo
1592 1592
 
1593 1593
         $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());
1594 1594
 
1595
-        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
1595
+        return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
1596 1596
     }
1597 1597
 
1598 1598
     /**
@@ -1606,14 +1606,14 @@  discard block
 block discarded – undo
1606 1606
     protected function getSQLTableAlias($tableName, $assocName = '')
1607 1607
     {
1608 1608
         if ($tableName) {
1609
-            $tableName .= '#' . $assocName;
1609
+            $tableName .= '#'.$assocName;
1610 1610
         }
1611 1611
 
1612 1612
         if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) {
1613 1613
             return $this->currentPersisterContext->sqlTableAliases[$tableName];
1614 1614
         }
1615 1615
 
1616
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1616
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1617 1617
 
1618 1618
         $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias;
1619 1619
 
@@ -1639,7 +1639,7 @@  discard block
 block discarded – undo
1639 1639
         }
1640 1640
 
1641 1641
         $lock  = $this->getLockTablesSql($lockMode);
1642
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1642
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1643 1643
         $sql   = 'SELECT 1 '
1644 1644
              . $lock
1645 1645
              . $where
@@ -1662,7 +1662,7 @@  discard block
 block discarded – undo
1662 1662
         $tableName = $this->class->table->getQuotedQualifiedName($this->platform);
1663 1663
 
1664 1664
         return $this->platform->appendLockHint(
1665
-            'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()),
1665
+            'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()),
1666 1666
             $lockMode
1667 1667
         );
1668 1668
     }
@@ -1712,19 +1712,19 @@  discard block
 block discarded – undo
1712 1712
 
1713 1713
             if ($comparison !== null) {
1714 1714
                 // special case null value handling
1715
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value ===null) {
1716
-                    $selectedColumns[] = $column . ' IS NULL';
1715
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value === null) {
1716
+                    $selectedColumns[] = $column.' IS NULL';
1717 1717
 
1718 1718
                     continue;
1719 1719
                 }
1720 1720
 
1721 1721
                 if ($comparison === Comparison::NEQ && $value === null) {
1722
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1722
+                    $selectedColumns[] = $column.' IS NOT NULL';
1723 1723
 
1724 1724
                     continue;
1725 1725
                 }
1726 1726
 
1727
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1727
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1728 1728
 
1729 1729
                 continue;
1730 1730
             }
@@ -1772,7 +1772,7 @@  discard block
 block discarded – undo
1772 1772
             $tableAlias = $this->getSQLTableAlias($property->getTableName());
1773 1773
             $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1774 1774
 
1775
-            return [$tableAlias . '.' . $columnName];
1775
+            return [$tableAlias.'.'.$columnName];
1776 1776
         }
1777 1777
 
1778 1778
         if ($property instanceof AssociationMetadata) {
@@ -1781,7 +1781,7 @@  discard block
 block discarded – undo
1781 1781
 
1782 1782
             // Many-To-Many requires join table check for joinColumn
1783 1783
             if ($owningAssociation instanceof ManyToManyAssociationMetadata) {
1784
-                if (! $owningAssociation->isOwningSide()) {
1784
+                if ( ! $owningAssociation->isOwningSide()) {
1785 1785
                     $owningAssociation = $association;
1786 1786
                 }
1787 1787
 
@@ -1794,10 +1794,10 @@  discard block
 block discarded – undo
1794 1794
                 foreach ($joinColumns as $joinColumn) {
1795 1795
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1796 1796
 
1797
-                    $columns[] = $joinTableName . '.' . $quotedColumnName;
1797
+                    $columns[] = $joinTableName.'.'.$quotedColumnName;
1798 1798
                 }
1799 1799
             } else {
1800
-                if (! $owningAssociation->isOwningSide()) {
1800
+                if ( ! $owningAssociation->isOwningSide()) {
1801 1801
                     throw InvalidFindByCall::fromInverseSideUsage(
1802 1802
                         $this->class->getClassName(),
1803 1803
                         $field
@@ -1812,7 +1812,7 @@  discard block
 block discarded – undo
1812 1812
                 foreach ($owningAssociation->getJoinColumns() as $joinColumn) {
1813 1813
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1814 1814
 
1815
-                    $columns[] = $tableAlias . '.' . $quotedColumnName;
1815
+                    $columns[] = $tableAlias.'.'.$quotedColumnName;
1816 1816
                 }
1817 1817
             }
1818 1818
 
@@ -1921,7 +1921,7 @@  discard block
 block discarded – undo
1921 1921
                 $value = $value[$targetClass->identifier[0]];
1922 1922
             }
1923 1923
 
1924
-            $criteria[$tableAlias . '.' . $quotedColumnName] = $value;
1924
+            $criteria[$tableAlias.'.'.$quotedColumnName] = $value;
1925 1925
             $parameters[]                                    = [
1926 1926
                 'value' => $value,
1927 1927
                 'field' => $fieldName,
@@ -2006,7 +2006,7 @@  discard block
 block discarded – undo
2006 2006
             case $property instanceof AssociationMetadata:
2007 2007
                 $class = $this->em->getClassMetadata($property->getTargetEntity());
2008 2008
 
2009
-                if (! $property->isOwningSide()) {
2009
+                if ( ! $property->isOwningSide()) {
2010 2010
                     $property = $class->getProperty($property->getMappedBy());
2011 2011
                     $class    = $this->em->getClassMetadata($property->getTargetEntity());
2012 2012
                 }
@@ -2019,7 +2019,7 @@  discard block
 block discarded – undo
2019 2019
                     /** @var JoinColumnMetadata $joinColumn */
2020 2020
                     $referencedColumnName = $joinColumn->getReferencedColumnName();
2021 2021
 
2022
-                    if (! $joinColumn->getType()) {
2022
+                    if ( ! $joinColumn->getType()) {
2023 2023
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
2024 2024
                     }
2025 2025
 
@@ -2034,7 +2034,7 @@  discard block
 block discarded – undo
2034 2034
         }
2035 2035
 
2036 2036
         if (is_array($value)) {
2037
-            return array_map(static function ($type) {
2037
+            return array_map(static function($type) {
2038 2038
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
2039 2039
             }, $types);
2040 2040
         }
@@ -2091,7 +2091,7 @@  discard block
 block discarded – undo
2091 2091
      */
2092 2092
     private function getIndividualValue($value)
2093 2093
     {
2094
-        if (! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
2094
+        if ( ! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
2095 2095
             return $value;
2096 2096
         }
2097 2097
 
@@ -2105,7 +2105,7 @@  discard block
 block discarded – undo
2105 2105
     {
2106 2106
         $criteria = $this->getIdentifier($entity);
2107 2107
 
2108
-        if (! $criteria) {
2108
+        if ( ! $criteria) {
2109 2109
             return false;
2110 2110
         }
2111 2111
 
@@ -2113,12 +2113,12 @@  discard block
 block discarded – undo
2113 2113
 
2114 2114
         $sql = 'SELECT 1 '
2115 2115
              . $this->getLockTablesSql(null)
2116
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2116
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2117 2117
 
2118 2118
         [$params, $types] = $this->expandParameters($criteria);
2119 2119
 
2120 2120
         if ($extraConditions !== null) {
2121
-            $sql                             .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2121
+            $sql                             .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2122 2122
             [$criteriaParams, $criteriaTypes] = $this->expandCriteriaParameters($extraConditions);
2123 2123
 
2124 2124
             $params = array_merge($params, $criteriaParams);
@@ -2128,7 +2128,7 @@  discard block
 block discarded – undo
2128 2128
         $filterSql = $this->generateFilterConditionSQL($this->class, $alias);
2129 2129
 
2130 2130
         if ($filterSql) {
2131
-            $sql .= ' AND ' . $filterSql;
2131
+            $sql .= ' AND '.$filterSql;
2132 2132
         }
2133 2133
 
2134 2134
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2141,13 +2141,13 @@  discard block
 block discarded – undo
2141 2141
      */
2142 2142
     protected function getJoinSQLForAssociation(AssociationMetadata $association)
2143 2143
     {
2144
-        if (! $association->isOwningSide()) {
2144
+        if ( ! $association->isOwningSide()) {
2145 2145
             return 'LEFT JOIN';
2146 2146
         }
2147 2147
 
2148 2148
         // if one of the join columns is nullable, return left join
2149 2149
         foreach ($association->getJoinColumns() as $joinColumn) {
2150
-            if (! $joinColumn->isNullable()) {
2150
+            if ( ! $joinColumn->isNullable()) {
2151 2151
                 continue;
2152 2152
             }
2153 2153
 
@@ -2164,7 +2164,7 @@  discard block
 block discarded – undo
2164 2164
      */
2165 2165
     public function getSQLColumnAlias()
2166 2166
     {
2167
-        return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++);
2167
+        return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++);
2168 2168
     }
2169 2169
 
2170 2170
     /**
@@ -2183,13 +2183,13 @@  discard block
 block discarded – undo
2183 2183
             $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias);
2184 2184
 
2185 2185
             if ($filterExpr !== '') {
2186
-                $filterClauses[] = '(' . $filterExpr . ')';
2186
+                $filterClauses[] = '('.$filterExpr.')';
2187 2187
             }
2188 2188
         }
2189 2189
 
2190 2190
         $sql = implode(' AND ', $filterClauses);
2191 2191
 
2192
-        return $sql ? '(' . $sql . ')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL"
2192
+        return $sql ? '('.$sql.')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL"
2193 2193
     }
2194 2194
 
2195 2195
     /**
Please login to merge, or discard this patch.