Failed Conditions
Push — develop ( c19264...352830 )
by Guilherme
65:34
created
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 1 patch
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * <http://www.doctrine-project.org>.
18 18
  */
19 19
 
20
-declare(strict_types=1);
20
+declare(strict_types = 1);
21 21
 
22 22
 namespace Doctrine\ORM\Persisters\Entity;
23 23
 
@@ -317,14 +317,14 @@  discard block
 block discarded – undo
317 317
         $tableName      = $versionedClass->table->getQuotedQualifiedName($this->platform);
318 318
         $columnName     = $this->platform->quoteIdentifier($versionProperty->getColumnName());
319 319
         $identifier     = array_map(
320
-            function ($columnName) { return $this->platform->quoteIdentifier($columnName); },
320
+            function($columnName) { return $this->platform->quoteIdentifier($columnName); },
321 321
             array_keys($versionedClass->getIdentifierColumns($this->em))
322 322
         );
323 323
 
324 324
         // FIXME: Order with composite keys might not be correct
325
-        $sql = 'SELECT ' . $columnName
326
-             . ' FROM '  . $tableName
327
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
325
+        $sql = 'SELECT '.$columnName
326
+             . ' FROM '.$tableName
327
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
328 328
 
329 329
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
330 330
         $versionType = $versionProperty->getType();
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 
411 411
             if (($value = $identifier[$field]) !== null) {
412 412
                 // @todo guilhermeblanco Make sure we do not have flat association values.
413
-                if (! is_array($value)) {
413
+                if ( ! is_array($value)) {
414 414
                     $value = [$targetClass->identifier[0] => $value];
415 415
                 }
416 416
 
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
                 $quotedJoinColumnName = $this->platform->quoteIdentifier($joinColumnName);
424 424
                 $targetField          = $targetClass->fieldNames[$referencedColumnName];
425 425
 
426
-                if (! $joinColumn->getType()) {
426
+                if ( ! $joinColumn->getType()) {
427 427
                     $joinColumn->setType(
428 428
                         PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)
429 429
                     );
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
             $type             = $column->getType();
466 466
             $placeholder      = $type->convertToDatabaseValueSQL('?', $this->platform);
467 467
 
468
-            $set[]    = $quotedColumnName . ' = ' . $placeholder;
468
+            $set[]    = $quotedColumnName.' = '.$placeholder;
469 469
             $params[] = $value;
470 470
             $types[]  = $type;
471 471
         }
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
                 /** @var JoinColumnMetadata $joinColumn */
492 492
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
493 493
 
494
-                if (! $joinColumn->getType()) {
494
+                if ( ! $joinColumn->getType()) {
495 495
                     $targetClass = $this->em->getClassMetadata($property->getTargetEntity());
496 496
 
497 497
                     $joinColumn->setType(
@@ -520,18 +520,18 @@  discard block
 block discarded – undo
520 520
                 case Type::SMALLINT:
521 521
                 case Type::INTEGER:
522 522
                 case Type::BIGINT:
523
-                    $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';
523
+                    $set[] = $versionColumnName.' = '.$versionColumnName.' + 1';
524 524
                     break;
525 525
 
526 526
                 case Type::DATETIME:
527
-                    $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';
527
+                    $set[] = $versionColumnName.' = CURRENT_TIMESTAMP';
528 528
                     break;
529 529
             }
530 530
         }
531 531
 
532
-        $sql = 'UPDATE ' . $quotedTableName
533
-             . ' SET ' . implode(', ', $set)
534
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
532
+        $sql = 'UPDATE '.$quotedTableName
533
+             . ' SET '.implode(', ', $set)
534
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
535 535
 
536 536
         $result = $this->conn->executeUpdate($sql, $params, $types);
537 537
 
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
     protected function deleteJoinTableRecords($identifier)
551 551
     {
552 552
         foreach ($this->class->getProperties() as $association) {
553
-            if (! ($association instanceof ManyToManyAssociationMetadata)) {
553
+            if ( ! ($association instanceof ManyToManyAssociationMetadata)) {
554 554
                 continue;
555 555
             }
556 556
 
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
             $keys              = [];
564 564
 
565 565
             if ( ! $owningAssociation->isOwningSide()) {
566
-                $class       = $this->em->getClassMetadata($association->getTargetEntity());
566
+                $class = $this->em->getClassMetadata($association->getTargetEntity());
567 567
                 $owningAssociation = $class->getProperty($association->getMappedBy());
568 568
             }
569 569
 
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
             }
676 676
 
677 677
             // Only owning side of x-1 associations can have a FK column.
678
-            if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
678
+            if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
679 679
                 continue;
680 680
             }
681 681
 
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
                 /** @var JoinColumnMetadata $joinColumn */
696 696
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
697 697
 
698
-                if (! $joinColumn->getType()) {
698
+                if ( ! $joinColumn->getType()) {
699 699
                     $targetClass = $this->em->getClassMetadata($property->getTargetEntity());
700 700
 
701 701
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
         $propertyName = $this->class->fieldNames[$columnName];
727 727
         $property     = $this->class->getProperty($propertyName);
728 728
 
729
-        if (! $property) {
729
+        if ( ! $property) {
730 730
             return null;
731 731
         }
732 732
 
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
             /** @var JoinColumnMetadata $joinColumn */
745 745
             $referencedColumnName = $joinColumn->getReferencedColumnName();
746 746
 
747
-            if (! $joinColumn->getType()) {
747
+            if ( ! $joinColumn->getType()) {
748 748
                 $targetClass = $this->em->getClassMetadata($property->getTargetEntity());
749 749
 
750 750
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
             // unset the old value and set the new sql aliased value here. By definition
864 864
             // unset($identifier[$targetKeyColumn] works here with how UnitOfWork::createEntity() calls this method.
865 865
             // @todo guilhermeblanco In master we have: $identifier[$targetClass->getFieldForColumn($targetKeyColumn)] =
866
-            $identifier[$targetTableAlias . "." . $targetKeyColumn] = $value;
866
+            $identifier[$targetTableAlias.".".$targetKeyColumn] = $value;
867 867
 
868 868
             unset($identifier[$targetKeyColumn]);
869 869
         }
@@ -1083,7 +1083,7 @@  discard block
 block discarded – undo
1083 1083
         $criteria       = [];
1084 1084
         $parameters     = [];
1085 1085
 
1086
-        if (! $association->isOwningSide()) {
1086
+        if ( ! $association->isOwningSide()) {
1087 1087
             $class       = $this->em->getClassMetadata($association->getTargetEntity());
1088 1088
             $owningAssoc = $class->getProperty($association->getMappedBy());
1089 1089
         }
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
                 $value = $value[$targetClass->identifier[0]];
1112 1112
             }
1113 1113
 
1114
-            $criteria[$joinTableName . '.' . $quotedColumnName] = $value;
1114
+            $criteria[$joinTableName.'.'.$quotedColumnName] = $value;
1115 1115
             $parameters[] = [
1116 1116
                 'value' => $value,
1117 1117
                 'field' => $fieldName,
@@ -1162,11 +1162,11 @@  discard block
 block discarded – undo
1162 1162
 
1163 1163
         switch ($lockMode) {
1164 1164
             case LockMode::PESSIMISTIC_READ:
1165
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1165
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1166 1166
                 break;
1167 1167
 
1168 1168
             case LockMode::PESSIMISTIC_WRITE:
1169
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1169
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1170 1170
                 break;
1171 1171
         }
1172 1172
 
@@ -1177,14 +1177,14 @@  discard block
 block discarded – undo
1177 1177
 
1178 1178
         if ('' !== $filterSql) {
1179 1179
             $conditionSql = $conditionSql
1180
-                ? $conditionSql . ' AND ' . $filterSql
1180
+                ? $conditionSql.' AND '.$filterSql
1181 1181
                 : $filterSql;
1182 1182
         }
1183 1183
 
1184
-        $select = 'SELECT ' . $columnList;
1185
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1186
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1187
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1184
+        $select = 'SELECT '.$columnList;
1185
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1186
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1187
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1188 1188
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1189 1189
         $query  = $select
1190 1190
             . $lock
@@ -1192,7 +1192,7 @@  discard block
 block discarded – undo
1192 1192
             . $where
1193 1193
             . $orderBySql;
1194 1194
 
1195
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1195
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1196 1196
     }
1197 1197
 
1198 1198
     /**
@@ -1211,13 +1211,13 @@  discard block
 block discarded – undo
1211 1211
 
1212 1212
         if ('' !== $filterSql) {
1213 1213
             $conditionSql = $conditionSql
1214
-                ? $conditionSql . ' AND ' . $filterSql
1214
+                ? $conditionSql.' AND '.$filterSql
1215 1215
                 : $filterSql;
1216 1216
         }
1217 1217
 
1218 1218
         $sql = 'SELECT COUNT(*) '
1219
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1220
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1219
+            . 'FROM '.$tableName.' '.$tableAlias
1220
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1221 1221
 
1222 1222
         return $sql;
1223 1223
     }
@@ -1234,7 +1234,7 @@  discard block
 block discarded – undo
1234 1234
      */
1235 1235
     protected final function getOrderBySQL(array $orderBy, $baseTableAlias)
1236 1236
     {
1237
-        if (! $orderBy) {
1237
+        if ( ! $orderBy) {
1238 1238
             return '';
1239 1239
         }
1240 1240
 
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
         foreach ($orderBy as $fieldName => $orientation) {
1244 1244
             $orientation = strtoupper(trim($orientation));
1245 1245
 
1246
-            if (! in_array($orientation, ['ASC', 'DESC'])) {
1246
+            if ( ! in_array($orientation, ['ASC', 'DESC'])) {
1247 1247
                 throw ORMException::invalidOrientation($this->class->getClassName(), $fieldName);
1248 1248
             }
1249 1249
 
@@ -1253,11 +1253,11 @@  discard block
 block discarded – undo
1253 1253
                 $tableAlias = $this->getSQLTableAlias($property->getTableName());
1254 1254
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1255 1255
 
1256
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1256
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1257 1257
 
1258 1258
                 continue;
1259 1259
             } else if ($property instanceof AssociationMetadata) {
1260
-                if (! $property->isOwningSide()) {
1260
+                if ( ! $property->isOwningSide()) {
1261 1261
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $fieldName);
1262 1262
                 }
1263 1263
 
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
                     /* @var JoinColumnMetadata $joinColumn */
1271 1271
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1272 1272
 
1273
-                    $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation;
1273
+                    $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation;
1274 1274
                 }
1275 1275
 
1276 1276
                 continue;
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
             throw ORMException::unrecognizedField($fieldName);
1280 1280
         }
1281 1281
 
1282
-        return ' ORDER BY ' . implode(', ', $orderByList);
1282
+        return ' ORDER BY '.implode(', ', $orderByList);
1283 1283
     }
1284 1284
 
1285 1285
     /**
@@ -1301,7 +1301,7 @@  discard block
 block discarded – undo
1301 1301
 
1302 1302
 
1303 1303
         $this->currentPersisterContext->rsm->addEntityResult($this->class->getClassName(), 'r'); // r for root
1304
-        $this->currentPersisterContext->selectJoinSql    = '';
1304
+        $this->currentPersisterContext->selectJoinSql = '';
1305 1305
 
1306 1306
         $eagerAliasCounter = 0;
1307 1307
         $columnList        = [];
@@ -1337,7 +1337,7 @@  discard block
 block discarded – undo
1337 1337
                         break; // now this is why you shouldn't use inheritance
1338 1338
                     }
1339 1339
 
1340
-                    $assocAlias = 'e' . ($eagerAliasCounter++);
1340
+                    $assocAlias = 'e'.($eagerAliasCounter++);
1341 1341
 
1342 1342
                     $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName);
1343 1343
 
@@ -1361,14 +1361,14 @@  discard block
 block discarded – undo
1361 1361
                         $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy());
1362 1362
                     }
1363 1363
 
1364
-                    if (! $property->isOwningSide()) {
1364
+                    if ( ! $property->isOwningSide()) {
1365 1365
                         $owningAssociation = $eagerEntity->getProperty($property->getMappedBy());
1366 1366
                     }
1367 1367
 
1368 1368
                     $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias);
1369 1369
                     $joinTableName  = $eagerEntity->table->getQuotedQualifiedName($this->platform);
1370 1370
 
1371
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property);
1371
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property);
1372 1372
 
1373 1373
                     $sourceClass      = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
1374 1374
                     $targetClass      = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
                         $joinCondition[] = $filterSql;
1391 1391
                     }
1392 1392
 
1393
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1393
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1394 1394
                     $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1395 1395
 
1396 1396
                     break;
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
      */
1415 1415
     protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r')
1416 1416
     {
1417
-        if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1417
+        if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1418 1418
             return '';
1419 1419
         }
1420 1420
 
@@ -1427,7 +1427,7 @@  discard block
 block discarded – undo
1427 1427
             $quotedColumnName = $this->platform->quoteIdentifier($columnName);
1428 1428
             $resultColumnName = $this->getSQLColumnAlias();
1429 1429
 
1430
-            if (! $joinColumn->getType()) {
1430
+            if ( ! $joinColumn->getType()) {
1431 1431
                 $joinColumn->setType(
1432 1432
                     PersisterHelper::getTypeOfColumn($joinColumn->getReferencedColumnName(), $targetClass, $this->em)
1433 1433
                 );
@@ -1461,7 +1461,7 @@  discard block
 block discarded – undo
1461 1461
         $owningAssociation = $association;
1462 1462
         $sourceTableAlias  = $this->getSQLTableAlias($this->class->getTableName());
1463 1463
 
1464
-        if (! $association->isOwningSide()) {
1464
+        if ( ! $association->isOwningSide()) {
1465 1465
             $targetEntity      = $this->em->getClassMetadata($association->getTargetEntity());
1466 1466
             $owningAssociation = $targetEntity->getProperty($association->getMappedBy());
1467 1467
         }
@@ -1483,7 +1483,7 @@  discard block
 block discarded – undo
1483 1483
             );
1484 1484
         }
1485 1485
 
1486
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1486
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1487 1487
     }
1488 1488
 
1489 1489
     /**
@@ -1577,7 +1577,7 @@  discard block
 block discarded – undo
1577 1577
                             $columnName           = $joinColumn->getColumnName();
1578 1578
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
1579 1579
 
1580
-                            if (! $joinColumn->getType()) {
1580
+                            if ( ! $joinColumn->getType()) {
1581 1581
                                 $joinColumn->setType(
1582 1582
                                     PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)
1583 1583
                                 );
@@ -1618,7 +1618,7 @@  discard block
 block discarded – undo
1618 1618
 
1619 1619
         $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());
1620 1620
 
1621
-        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
1621
+        return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
1622 1622
     }
1623 1623
 
1624 1624
     /**
@@ -1632,14 +1632,14 @@  discard block
 block discarded – undo
1632 1632
     protected function getSQLTableAlias($tableName, $assocName = '')
1633 1633
     {
1634 1634
         if ($tableName) {
1635
-            $tableName .= '#' . $assocName;
1635
+            $tableName .= '#'.$assocName;
1636 1636
         }
1637 1637
 
1638 1638
         if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) {
1639 1639
             return $this->currentPersisterContext->sqlTableAliases[$tableName];
1640 1640
         }
1641 1641
 
1642
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1642
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1643 1643
 
1644 1644
         $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias;
1645 1645
 
@@ -1666,7 +1666,7 @@  discard block
 block discarded – undo
1666 1666
         }
1667 1667
 
1668 1668
         $lock  = $this->getLockTablesSql($lockMode);
1669
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1669
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1670 1670
         $sql = 'SELECT 1 '
1671 1671
              . $lock
1672 1672
              . $where
@@ -1689,7 +1689,7 @@  discard block
 block discarded – undo
1689 1689
         $tableName = $this->class->table->getQuotedQualifiedName($this->platform);
1690 1690
 
1691 1691
         return $this->platform->appendLockHint(
1692
-            'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()),
1692
+            'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()),
1693 1693
             $lockMode
1694 1694
         );
1695 1695
     }
@@ -1742,19 +1742,19 @@  discard block
 block discarded – undo
1742 1742
 
1743 1743
             if (null !== $comparison) {
1744 1744
                 // special case null value handling
1745
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1746
-                    $selectedColumns[] = $column . ' IS NULL';
1745
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1746
+                    $selectedColumns[] = $column.' IS NULL';
1747 1747
 
1748 1748
                     continue;
1749 1749
                 }
1750 1750
 
1751 1751
                 if ($comparison === Comparison::NEQ && null === $value) {
1752
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1752
+                    $selectedColumns[] = $column.' IS NOT NULL';
1753 1753
 
1754 1754
                     continue;
1755 1755
                 }
1756 1756
 
1757
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1757
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1758 1758
 
1759 1759
                 continue;
1760 1760
             }
@@ -1803,7 +1803,7 @@  discard block
 block discarded – undo
1803 1803
             $tableAlias = $this->getSQLTableAlias($property->getTableName());
1804 1804
             $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1805 1805
 
1806
-            return [$tableAlias . '.' . $columnName];
1806
+            return [$tableAlias.'.'.$columnName];
1807 1807
         }
1808 1808
 
1809 1809
         if ($property instanceof AssociationMetadata) {
@@ -1812,7 +1812,7 @@  discard block
 block discarded – undo
1812 1812
 
1813 1813
             // Many-To-Many requires join table check for joinColumn
1814 1814
             if ($owningAssociation instanceof ManyToManyAssociationMetadata) {
1815
-                if (! $owningAssociation->isOwningSide()) {
1815
+                if ( ! $owningAssociation->isOwningSide()) {
1816 1816
                     $owningAssociation = $association;
1817 1817
                 }
1818 1818
 
@@ -1826,15 +1826,15 @@  discard block
 block discarded – undo
1826 1826
                 foreach ($joinColumns as $joinColumn) {
1827 1827
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1828 1828
 
1829
-                    $columns[] = $joinTableName . '.' . $quotedColumnName;
1829
+                    $columns[] = $joinTableName.'.'.$quotedColumnName;
1830 1830
                 }
1831 1831
 
1832 1832
             } else {
1833
-                if (! $owningAssociation->isOwningSide()) {
1833
+                if ( ! $owningAssociation->isOwningSide()) {
1834 1834
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $field);
1835 1835
                 }
1836 1836
 
1837
-                $class      = $this->class->isInheritedProperty($field)
1837
+                $class = $this->class->isInheritedProperty($field)
1838 1838
                     ? $owningAssociation->getDeclaringClass()
1839 1839
                     : $this->class
1840 1840
                 ;
@@ -1843,7 +1843,7 @@  discard block
 block discarded – undo
1843 1843
                 foreach ($owningAssociation->getJoinColumns() as $joinColumn) {
1844 1844
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1845 1845
 
1846
-                    $columns[] = $tableAlias . '.' . $quotedColumnName;
1846
+                    $columns[] = $tableAlias.'.'.$quotedColumnName;
1847 1847
                 }
1848 1848
             }
1849 1849
 
@@ -1956,7 +1956,7 @@  discard block
 block discarded – undo
1956 1956
                 $value = $value[$targetClass->identifier[0]];
1957 1957
             }
1958 1958
 
1959
-            $criteria[$tableAlias . "." . $quotedColumnName] = $value;
1959
+            $criteria[$tableAlias.".".$quotedColumnName] = $value;
1960 1960
             $parameters[] = [
1961 1961
                 'value' => $value,
1962 1962
                 'field' => $fieldName,
@@ -2043,7 +2043,7 @@  discard block
 block discarded – undo
2043 2043
             case ($property instanceof AssociationMetadata):
2044 2044
                 $class = $this->em->getClassMetadata($property->getTargetEntity());
2045 2045
 
2046
-                if (! $property->isOwningSide()) {
2046
+                if ( ! $property->isOwningSide()) {
2047 2047
                     $property = $class->getProperty($property->getMappedBy());
2048 2048
                     $class    = $this->em->getClassMetadata($property->getTargetEntity());
2049 2049
                 }
@@ -2054,7 +2054,7 @@  discard block
 block discarded – undo
2054 2054
                 ;
2055 2055
 
2056 2056
                 foreach ($joinColumns as $joinColumn) {
2057
-                    if (! $joinColumn->getType()) {
2057
+                    if ( ! $joinColumn->getType()) {
2058 2058
                         $joinColumn->setType(
2059 2059
                             PersisterHelper::getTypeOfColumn($joinColumn->getReferencedColumnName(), $class, $this->em)
2060 2060
                         );
@@ -2071,7 +2071,7 @@  discard block
 block discarded – undo
2071 2071
         }
2072 2072
 
2073 2073
         if (is_array($value)) {
2074
-            return array_map(function ($type) {
2074
+            return array_map(function($type) {
2075 2075
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
2076 2076
             }, $types);
2077 2077
         }
@@ -2150,12 +2150,12 @@  discard block
 block discarded – undo
2150 2150
 
2151 2151
         $sql = 'SELECT 1 '
2152 2152
              . $this->getLockTablesSql(null)
2153
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2153
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2154 2154
 
2155 2155
         list($params, $types) = $this->expandParameters($criteria);
2156 2156
 
2157 2157
         if (null !== $extraConditions) {
2158
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2158
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2159 2159
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
2160 2160
 
2161 2161
             $params = array_merge($params, $criteriaParams);
@@ -2163,7 +2163,7 @@  discard block
 block discarded – undo
2163 2163
         }
2164 2164
 
2165 2165
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
2166
-            $sql .= ' AND ' . $filterSql;
2166
+            $sql .= ' AND '.$filterSql;
2167 2167
         }
2168 2168
 
2169 2169
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2178,13 +2178,13 @@  discard block
 block discarded – undo
2178 2178
      */
2179 2179
     protected function getJoinSQLForAssociation(AssociationMetadata $association)
2180 2180
     {
2181
-        if (! $association->isOwningSide()) {
2181
+        if ( ! $association->isOwningSide()) {
2182 2182
             return 'LEFT JOIN';
2183 2183
         }
2184 2184
 
2185 2185
         // if one of the join columns is nullable, return left join
2186 2186
         foreach ($association->getJoinColumns() as $joinColumn) {
2187
-             if (! $joinColumn->isNullable()) {
2187
+             if ( ! $joinColumn->isNullable()) {
2188 2188
                  continue;
2189 2189
              }
2190 2190
 
@@ -2201,7 +2201,7 @@  discard block
 block discarded – undo
2201 2201
      */
2202 2202
     public function getSQLColumnAlias()
2203 2203
     {
2204
-        return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++);
2204
+        return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++);
2205 2205
     }
2206 2206
 
2207 2207
     /**
@@ -2218,13 +2218,13 @@  discard block
 block discarded – undo
2218 2218
 
2219 2219
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2220 2220
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2221
-                $filterClauses[] = '(' . $filterExpr . ')';
2221
+                $filterClauses[] = '('.$filterExpr.')';
2222 2222
             }
2223 2223
         }
2224 2224
 
2225 2225
         $sql = implode(' AND ', $filterClauses);
2226 2226
 
2227
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2227
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2228 2228
     }
2229 2229
 
2230 2230
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Utility/IdentifierFlattener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
  * <http://www.doctrine-project.org>.
18 18
  */
19 19
 
20
-declare(strict_types=1);
20
+declare(strict_types = 1);
21 21
 
22 22
 namespace Doctrine\ORM\Utility;
23 23
 
Please login to merge, or discard this patch.