Failed Conditions
Pull Request — master (#7898)
by Guilherme
63:09
created
lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
45 45
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
46 46
 
47
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);
47
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform);
48 48
 
49 49
         // Append subclass columns
50 50
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $conditionSql .= ' AND ';
115 115
         }
116 116
 
117
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
117
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
118 118
     }
119 119
 
120 120
     /**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $conditionSql .= ' AND ';
129 129
         }
130 130
 
131
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
131
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
132 132
     }
133 133
 
134 134
     /**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
         return sprintf(
157 157
             '%s IN (%s)',
158
-            $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform),
158
+            $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform),
159 159
             implode(', ', $values)
160 160
         );
161 161
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             }
108 108
 
109 109
             foreach ($data as $columnName => $value) {
110
-                if (! is_array($id) || ! isset($id[$columnName])) {
110
+                if ( ! is_array($id) || ! isset($id[$columnName])) {
111 111
                     $type = $this->columns[$columnName]->getType();
112 112
 
113 113
                     $stmt->bindValue($paramIndex++, $value, $type);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     {
132 132
         $updateData = $this->prepareUpdateData($entity);
133 133
 
134
-        if (! $updateData) {
134
+        if ( ! $updateData) {
135 135
             return;
136 136
         }
137 137
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             $versionedClass = $this->class->versionProperty->getDeclaringClass();
150 150
             $versionedTable = $versionedClass->getTableName();
151 151
 
152
-            if (! isset($updateData[$versionedTable])) {
152
+            if ( ! isset($updateData[$versionedTable])) {
153 153
                 $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform);
154 154
 
155 155
                 $this->updateTable($entity, $tableName, [], true);
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 
231 231
         if ($filterSql) {
232 232
             $conditionSql .= $conditionSql
233
-                ? ' AND ' . $filterSql
233
+                ? ' AND '.$filterSql
234 234
                 : $filterSql;
235 235
         }
236 236
 
@@ -238,26 +238,26 @@  discard block
 block discarded – undo
238 238
 
239 239
         switch ($lockMode) {
240 240
             case LockMode::PESSIMISTIC_READ:
241
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
241
+                $lockSql = ' '.$this->platform->getReadLockSQL();
242 242
                 break;
243 243
 
244 244
             case LockMode::PESSIMISTIC_WRITE:
245
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
245
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
246 246
                 break;
247 247
         }
248 248
 
249 249
         $tableName  = $this->class->table->getQuotedQualifiedName($this->platform);
250
-        $from       = ' FROM ' . $tableName . ' ' . $baseTableAlias;
251
-        $where      = $conditionSql !== '' ? ' WHERE ' . $conditionSql : '';
250
+        $from       = ' FROM '.$tableName.' '.$baseTableAlias;
251
+        $where      = $conditionSql !== '' ? ' WHERE '.$conditionSql : '';
252 252
         $lock       = $this->platform->appendLockHint($from, $lockMode);
253 253
         $columnList = $this->getSelectColumnsSQL();
254
-        $query      = 'SELECT ' . $columnList
254
+        $query      = 'SELECT '.$columnList
255 255
                     . $lock
256 256
                     . $joinSql
257 257
                     . $where
258 258
                     . $orderBySql;
259 259
 
260
-        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql;
260
+        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql;
261 261
     }
262 262
 
263 263
     /**
@@ -279,14 +279,14 @@  discard block
 block discarded – undo
279 279
 
280 280
         if ($filterSql !== '') {
281 281
             $conditionSql = $conditionSql
282
-                ? $conditionSql . ' AND ' . $filterSql
282
+                ? $conditionSql.' AND '.$filterSql
283 283
                 : $filterSql;
284 284
         }
285 285
 
286 286
         return 'SELECT COUNT(*) '
287
-            . 'FROM ' . $tableName . ' ' . $baseTableAlias
287
+            . 'FROM '.$tableName.' '.$baseTableAlias
288 288
             . $joinSql
289
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
289
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
290 290
     }
291 291
 
292 292
     /**
@@ -305,18 +305,18 @@  discard block
 block discarded – undo
305 305
             $conditions = [];
306 306
             $tableName  = $parentClass->table->getQuotedQualifiedName($this->platform);
307 307
             $tableAlias = $this->getSQLTableAlias($parentClass->getTableName());
308
-            $joinSql   .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
308
+            $joinSql   .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
309 309
 
310 310
             foreach ($identifierColumns as $idColumn) {
311 311
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
312 312
 
313
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
313
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
314 314
             }
315 315
 
316 316
             $joinSql .= implode(' AND ', $conditions);
317 317
         }
318 318
 
319
-        return parent::getLockTablesSql($lockMode) . $joinSql;
319
+        return parent::getLockTablesSql($lockMode).$joinSql;
320 320
     }
321 321
 
322 322
     /**
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
                 continue;
344 344
             }
345 345
 
346
-            if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
346
+            if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
347 347
                 continue;
348 348
             }
349 349
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
365 365
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
366 366
 
367
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);
367
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform);
368 368
 
369 369
         // sub tables
370 370
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -481,12 +481,12 @@  discard block
 block discarded – undo
481 481
             $conditions = [];
482 482
             $tableName  = $parentClass->table->getQuotedQualifiedName($this->platform);
483 483
             $tableAlias = $this->getSQLTableAlias($parentClass->getTableName());
484
-            $joinSql   .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
484
+            $joinSql   .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
485 485
 
486 486
             foreach ($identifierColumns as $idColumn) {
487 487
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
488 488
 
489
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
489
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
490 490
             }
491 491
 
492 492
             $joinSql .= implode(' AND ', $conditions);
@@ -498,12 +498,12 @@  discard block
 block discarded – undo
498 498
             $subClass   = $this->em->getClassMetadata($subClassName);
499 499
             $tableName  = $subClass->table->getQuotedQualifiedName($this->platform);
500 500
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName());
501
-            $joinSql   .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
501
+            $joinSql   .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
502 502
 
503 503
             foreach ($identifierColumns as $idColumn) {
504 504
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
505 505
 
506
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
506
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
507 507
             }
508 508
 
509 509
             $joinSql .= implode(' AND ', $conditions);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 1 patch
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -295,16 +295,16 @@  discard block
 block discarded – undo
295 295
         $tableName      = $versionedClass->table->getQuotedQualifiedName($this->platform);
296 296
         $columnName     = $this->platform->quoteIdentifier($versionProperty->getColumnName());
297 297
         $identifier     = array_map(
298
-            function ($columnName) {
298
+            function($columnName) {
299 299
                 return $this->platform->quoteIdentifier($columnName);
300 300
             },
301 301
             array_keys($versionedClass->getIdentifierColumns($this->em))
302 302
         );
303 303
 
304 304
         // FIXME: Order with composite keys might not be correct
305
-        $sql = 'SELECT ' . $columnName
306
-             . ' FROM ' . $tableName
307
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
305
+        $sql = 'SELECT '.$columnName
306
+             . ' FROM '.$tableName
307
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
308 308
 
309 309
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
310 310
         $versionType = $versionProperty->getType();
@@ -343,13 +343,13 @@  discard block
 block discarded – undo
343 343
         $tableName  = $this->class->getTableName();
344 344
         $updateData = $this->prepareUpdateData($entity);
345 345
 
346
-        if (! isset($updateData[$tableName])) {
346
+        if ( ! isset($updateData[$tableName])) {
347 347
             return;
348 348
         }
349 349
 
350 350
         $data = $updateData[$tableName];
351 351
 
352
-        if (! $data) {
352
+        if ( ! $data) {
353 353
             return;
354 354
         }
355 355
 
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 
402 402
             if ($value !== null) {
403 403
                 // @todo guilhermeblanco Make sure we do not have flat association values.
404
-                if (! is_array($value)) {
404
+                if ( ! is_array($value)) {
405 405
                     $value = [$targetClass->identifier[0] => $value];
406 406
                 }
407 407
 
@@ -498,18 +498,18 @@  discard block
 block discarded – undo
498 498
                 case Type::SMALLINT:
499 499
                 case Type::INTEGER:
500 500
                 case Type::BIGINT:
501
-                    $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';
501
+                    $set[] = $versionColumnName.' = '.$versionColumnName.' + 1';
502 502
                     break;
503 503
 
504 504
                 case Type::DATETIME:
505
-                    $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';
505
+                    $set[] = $versionColumnName.' = CURRENT_TIMESTAMP';
506 506
                     break;
507 507
             }
508 508
         }
509 509
 
510
-        $sql = 'UPDATE ' . $quotedTableName
511
-             . ' SET ' . implode(', ', $set)
512
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
510
+        $sql = 'UPDATE '.$quotedTableName
511
+             . ' SET '.implode(', ', $set)
512
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
513 513
 
514 514
         $result = $this->conn->executeUpdate($sql, $params, $types);
515 515
 
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
     protected function deleteJoinTableRecords($identifier)
527 527
     {
528 528
         foreach ($this->class->getPropertiesIterator() as $association) {
529
-            if (! ($association instanceof ManyToManyAssociationMetadata)) {
529
+            if ( ! ($association instanceof ManyToManyAssociationMetadata)) {
530 530
                 continue;
531 531
             }
532 532
 
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
             $otherKeys         = [];
539 539
             $keys              = [];
540 540
 
541
-            if (! $owningAssociation->isOwningSide()) {
541
+            if ( ! $owningAssociation->isOwningSide()) {
542 542
                 $class             = $this->em->getClassMetadata($association->getTargetEntity());
543 543
                 $owningAssociation = $class->getProperty($association->getMappedBy());
544 544
             }
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
             }
649 649
 
650 650
             // Only owning side of x-1 associations can have a FK column.
651
-            if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
651
+            if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
652 652
                 continue;
653 653
             }
654 654
 
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
         $propertyName = $this->class->fieldNames[$columnName];
692 692
         $property     = $this->class->getProperty($propertyName);
693 693
 
694
-        if (! $property) {
694
+        if ( ! $property) {
695 695
             return null;
696 696
         }
697 697
 
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
             $sourceKeyColumn = $joinColumn->getReferencedColumnName();
812 812
             $targetKeyColumn = $joinColumn->getColumnName();
813 813
 
814
-            if (! isset($sourceClass->fieldNames[$sourceKeyColumn])) {
814
+            if ( ! isset($sourceClass->fieldNames[$sourceKeyColumn])) {
815 815
                 throw MappingException::joinColumnMustPointToMappedField(
816 816
                     $sourceClass->getClassName(),
817 817
                     $sourceKeyColumn
@@ -1038,7 +1038,7 @@  discard block
 block discarded – undo
1038 1038
         $criteria    = [];
1039 1039
         $parameters  = [];
1040 1040
 
1041
-        if (! $association->isOwningSide()) {
1041
+        if ( ! $association->isOwningSide()) {
1042 1042
             $class       = $this->em->getClassMetadata($association->getTargetEntity());
1043 1043
             $owningAssoc = $class->getProperty($association->getMappedBy());
1044 1044
         }
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
                 $value = $value[$targetClass->identifier[0]];
1067 1067
             }
1068 1068
 
1069
-            $criteria[$joinTableName . '.' . $quotedColumnName] = $value;
1069
+            $criteria[$joinTableName.'.'.$quotedColumnName] = $value;
1070 1070
             $parameters[]                                       = [
1071 1071
                 'value' => $value,
1072 1072
                 'field' => $fieldName,
@@ -1116,11 +1116,11 @@  discard block
 block discarded – undo
1116 1116
 
1117 1117
         switch ($lockMode) {
1118 1118
             case LockMode::PESSIMISTIC_READ:
1119
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1119
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1120 1120
                 break;
1121 1121
 
1122 1122
             case LockMode::PESSIMISTIC_WRITE:
1123
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1123
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1124 1124
                 break;
1125 1125
         }
1126 1126
 
@@ -1131,14 +1131,14 @@  discard block
 block discarded – undo
1131 1131
 
1132 1132
         if ($filterSql !== '') {
1133 1133
             $conditionSql = $conditionSql
1134
-                ? $conditionSql . ' AND ' . $filterSql
1134
+                ? $conditionSql.' AND '.$filterSql
1135 1135
                 : $filterSql;
1136 1136
         }
1137 1137
 
1138
-        $select = 'SELECT ' . $columnList;
1139
-        $from   = ' FROM ' . $tableName . ' ' . $tableAlias;
1140
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1141
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1138
+        $select = 'SELECT '.$columnList;
1139
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1140
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1141
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1142 1142
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1143 1143
         $query  = $select
1144 1144
             . $lock
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
             . $where
1147 1147
             . $orderBySql;
1148 1148
 
1149
-        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql;
1149
+        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql;
1150 1150
     }
1151 1151
 
1152 1152
     /**
@@ -1165,13 +1165,13 @@  discard block
 block discarded – undo
1165 1165
 
1166 1166
         if ($filterSql !== '') {
1167 1167
             $conditionSql = $conditionSql
1168
-                ? $conditionSql . ' AND ' . $filterSql
1168
+                ? $conditionSql.' AND '.$filterSql
1169 1169
                 : $filterSql;
1170 1170
         }
1171 1171
 
1172 1172
         return 'SELECT COUNT(*) '
1173
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1174
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1173
+            . 'FROM '.$tableName.' '.$tableAlias
1174
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1175 1175
     }
1176 1176
 
1177 1177
     /**
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
      */
1187 1187
     final protected function getOrderBySQL(array $orderBy, $baseTableAlias)
1188 1188
     {
1189
-        if (! $orderBy) {
1189
+        if ( ! $orderBy) {
1190 1190
             return '';
1191 1191
         }
1192 1192
 
@@ -1195,7 +1195,7 @@  discard block
 block discarded – undo
1195 1195
         foreach ($orderBy as $fieldName => $orientation) {
1196 1196
             $orientation = strtoupper(trim($orientation));
1197 1197
 
1198
-            if (! in_array($orientation, ['ASC', 'DESC'], true)) {
1198
+            if ( ! in_array($orientation, ['ASC', 'DESC'], true)) {
1199 1199
                 throw InvalidOrientation::fromClassNameAndField($this->class->getClassName(), $fieldName);
1200 1200
             }
1201 1201
 
@@ -1205,11 +1205,11 @@  discard block
 block discarded – undo
1205 1205
                 $tableAlias = $this->getSQLTableAlias($property->getTableName());
1206 1206
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1207 1207
 
1208
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1208
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1209 1209
 
1210 1210
                 continue;
1211 1211
             } elseif ($property instanceof AssociationMetadata) {
1212
-                if (! $property->isOwningSide()) {
1212
+                if ( ! $property->isOwningSide()) {
1213 1213
                     throw InvalidFindByCall::fromInverseSideUsage(
1214 1214
                         $this->class->getClassName(),
1215 1215
                         $fieldName
@@ -1225,7 +1225,7 @@  discard block
 block discarded – undo
1225 1225
                     /** @var JoinColumnMetadata $joinColumn */
1226 1226
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1227 1227
 
1228
-                    $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation;
1228
+                    $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation;
1229 1229
                 }
1230 1230
 
1231 1231
                 continue;
@@ -1234,7 +1234,7 @@  discard block
 block discarded – undo
1234 1234
             throw UnrecognizedField::byName($fieldName);
1235 1235
         }
1236 1236
 
1237
-        return ' ORDER BY ' . implode(', ', $orderByList);
1237
+        return ' ORDER BY '.implode(', ', $orderByList);
1238 1238
     }
1239 1239
 
1240 1240
     /**
@@ -1276,7 +1276,7 @@  discard block
 block discarded – undo
1276 1276
                     $isAssocToOneInverseSide = $property instanceof ToOneAssociationMetadata && ! $property->isOwningSide();
1277 1277
                     $isAssocFromOneEager     = ! $property instanceof ManyToManyAssociationMetadata && $property->getFetchMode() === FetchMode::EAGER;
1278 1278
 
1279
-                    if (! ($isAssocFromOneEager || $isAssocToOneInverseSide)) {
1279
+                    if ( ! ($isAssocFromOneEager || $isAssocToOneInverseSide)) {
1280 1280
                         break;
1281 1281
                     }
1282 1282
 
@@ -1291,7 +1291,7 @@  discard block
 block discarded – undo
1291 1291
                         break; // now this is why you shouldn't use inheritance
1292 1292
                     }
1293 1293
 
1294
-                    $assocAlias = 'e' . ($eagerAliasCounter++);
1294
+                    $assocAlias = 'e'.($eagerAliasCounter++);
1295 1295
 
1296 1296
                     $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName);
1297 1297
 
@@ -1319,14 +1319,14 @@  discard block
 block discarded – undo
1319 1319
                         $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy());
1320 1320
                     }
1321 1321
 
1322
-                    if (! $property->isOwningSide()) {
1322
+                    if ( ! $property->isOwningSide()) {
1323 1323
                         $owningAssociation = $eagerEntity->getProperty($property->getMappedBy());
1324 1324
                     }
1325 1325
 
1326 1326
                     $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias);
1327 1327
                     $joinTableName  = $eagerEntity->table->getQuotedQualifiedName($this->platform);
1328 1328
 
1329
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property);
1329
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property);
1330 1330
 
1331 1331
                     $sourceClass      = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
1332 1332
                     $targetClass      = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
@@ -1350,7 +1350,7 @@  discard block
 block discarded – undo
1350 1350
                         $joinCondition[] = $filterSql;
1351 1351
                     }
1352 1352
 
1353
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1353
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1354 1354
                     $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1355 1355
 
1356 1356
                     break;
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
      */
1373 1373
     protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r')
1374 1374
     {
1375
-        if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1375
+        if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1376 1376
             return '';
1377 1377
         }
1378 1378
 
@@ -1412,7 +1412,7 @@  discard block
 block discarded – undo
1412 1412
         $owningAssociation = $association;
1413 1413
         $sourceTableAlias  = $this->getSQLTableAlias($this->class->getTableName());
1414 1414
 
1415
-        if (! $association->isOwningSide()) {
1415
+        if ( ! $association->isOwningSide()) {
1416 1416
             $targetEntity      = $this->em->getClassMetadata($association->getTargetEntity());
1417 1417
             $owningAssociation = $targetEntity->getProperty($association->getMappedBy());
1418 1418
         }
@@ -1433,7 +1433,7 @@  discard block
 block discarded – undo
1433 1433
             );
1434 1434
         }
1435 1435
 
1436
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1436
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1437 1437
     }
1438 1438
 
1439 1439
     /**
@@ -1497,7 +1497,7 @@  discard block
 block discarded – undo
1497 1497
                     break;
1498 1498
 
1499 1499
                 case $property instanceof FieldMetadata:
1500
-                    if ((! $property->hasValueGenerator() || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY)
1500
+                    if (( ! $property->hasValueGenerator() || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY)
1501 1501
                         || $this->class->identifier[0] !== $name) {
1502 1502
                         $columnName = $property->getColumnName();
1503 1503
 
@@ -1554,7 +1554,7 @@  discard block
 block discarded – undo
1554 1554
 
1555 1555
         $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());
1556 1556
 
1557
-        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
1557
+        return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
1558 1558
     }
1559 1559
 
1560 1560
     /**
@@ -1568,14 +1568,14 @@  discard block
 block discarded – undo
1568 1568
     protected function getSQLTableAlias($tableName, $assocName = '')
1569 1569
     {
1570 1570
         if ($tableName) {
1571
-            $tableName .= '#' . $assocName;
1571
+            $tableName .= '#'.$assocName;
1572 1572
         }
1573 1573
 
1574 1574
         if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) {
1575 1575
             return $this->currentPersisterContext->sqlTableAliases[$tableName];
1576 1576
         }
1577 1577
 
1578
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1578
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1579 1579
 
1580 1580
         $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias;
1581 1581
 
@@ -1601,7 +1601,7 @@  discard block
 block discarded – undo
1601 1601
         }
1602 1602
 
1603 1603
         $lock  = $this->getLockTablesSql($lockMode);
1604
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1604
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1605 1605
         $sql   = 'SELECT 1 '
1606 1606
              . $lock
1607 1607
              . $where
@@ -1624,7 +1624,7 @@  discard block
 block discarded – undo
1624 1624
         $tableName = $this->class->table->getQuotedQualifiedName($this->platform);
1625 1625
 
1626 1626
         return $this->platform->appendLockHint(
1627
-            'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()),
1627
+            'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()),
1628 1628
             $lockMode
1629 1629
         );
1630 1630
     }
@@ -1674,19 +1674,19 @@  discard block
 block discarded – undo
1674 1674
 
1675 1675
             if ($comparison !== null) {
1676 1676
                 // special case null value handling
1677
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value ===null) {
1678
-                    $selectedColumns[] = $column . ' IS NULL';
1677
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value === null) {
1678
+                    $selectedColumns[] = $column.' IS NULL';
1679 1679
 
1680 1680
                     continue;
1681 1681
                 }
1682 1682
 
1683 1683
                 if ($comparison === Comparison::NEQ && $value === null) {
1684
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1684
+                    $selectedColumns[] = $column.' IS NOT NULL';
1685 1685
 
1686 1686
                     continue;
1687 1687
                 }
1688 1688
 
1689
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1689
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1690 1690
 
1691 1691
                 continue;
1692 1692
             }
@@ -1734,7 +1734,7 @@  discard block
 block discarded – undo
1734 1734
             $tableAlias = $this->getSQLTableAlias($property->getTableName());
1735 1735
             $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1736 1736
 
1737
-            return [$tableAlias . '.' . $columnName];
1737
+            return [$tableAlias.'.'.$columnName];
1738 1738
         }
1739 1739
 
1740 1740
         if ($property instanceof AssociationMetadata) {
@@ -1743,7 +1743,7 @@  discard block
 block discarded – undo
1743 1743
 
1744 1744
             // Many-To-Many requires join table check for joinColumn
1745 1745
             if ($owningAssociation instanceof ManyToManyAssociationMetadata) {
1746
-                if (! $owningAssociation->isOwningSide()) {
1746
+                if ( ! $owningAssociation->isOwningSide()) {
1747 1747
                     $owningAssociation = $association;
1748 1748
                 }
1749 1749
 
@@ -1756,10 +1756,10 @@  discard block
 block discarded – undo
1756 1756
                 foreach ($joinColumns as $joinColumn) {
1757 1757
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1758 1758
 
1759
-                    $columns[] = $joinTableName . '.' . $quotedColumnName;
1759
+                    $columns[] = $joinTableName.'.'.$quotedColumnName;
1760 1760
                 }
1761 1761
             } else {
1762
-                if (! $owningAssociation->isOwningSide()) {
1762
+                if ( ! $owningAssociation->isOwningSide()) {
1763 1763
                     throw InvalidFindByCall::fromInverseSideUsage(
1764 1764
                         $this->class->getClassName(),
1765 1765
                         $field
@@ -1774,7 +1774,7 @@  discard block
 block discarded – undo
1774 1774
                 foreach ($owningAssociation->getJoinColumns() as $joinColumn) {
1775 1775
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1776 1776
 
1777
-                    $columns[] = $tableAlias . '.' . $quotedColumnName;
1777
+                    $columns[] = $tableAlias.'.'.$quotedColumnName;
1778 1778
                 }
1779 1779
             }
1780 1780
 
@@ -1882,7 +1882,7 @@  discard block
 block discarded – undo
1882 1882
                 $value = $value[$targetClass->identifier[0]];
1883 1883
             }
1884 1884
 
1885
-            $criteria[$tableAlias . '.' . $quotedColumnName] = $value;
1885
+            $criteria[$tableAlias.'.'.$quotedColumnName] = $value;
1886 1886
             $parameters[]                                    = [
1887 1887
                 'value' => $value,
1888 1888
                 'field' => $fieldName,
@@ -1967,7 +1967,7 @@  discard block
 block discarded – undo
1967 1967
             case $property instanceof AssociationMetadata:
1968 1968
                 $class = $this->em->getClassMetadata($property->getTargetEntity());
1969 1969
 
1970
-                if (! $property->isOwningSide()) {
1970
+                if ( ! $property->isOwningSide()) {
1971 1971
                     $property = $class->getProperty($property->getMappedBy());
1972 1972
                     $class    = $this->em->getClassMetadata($property->getTargetEntity());
1973 1973
                 }
@@ -1989,7 +1989,7 @@  discard block
 block discarded – undo
1989 1989
         }
1990 1990
 
1991 1991
         if (is_array($value)) {
1992
-            return array_map(static function ($type) {
1992
+            return array_map(static function($type) {
1993 1993
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
1994 1994
             }, $types);
1995 1995
         }
@@ -2046,7 +2046,7 @@  discard block
 block discarded – undo
2046 2046
      */
2047 2047
     private function getIndividualValue($value)
2048 2048
     {
2049
-        if (! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
2049
+        if ( ! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
2050 2050
             return $value;
2051 2051
         }
2052 2052
 
@@ -2060,7 +2060,7 @@  discard block
 block discarded – undo
2060 2060
     {
2061 2061
         $criteria = $this->getIdentifier($entity);
2062 2062
 
2063
-        if (! $criteria) {
2063
+        if ( ! $criteria) {
2064 2064
             return false;
2065 2065
         }
2066 2066
 
@@ -2068,12 +2068,12 @@  discard block
 block discarded – undo
2068 2068
 
2069 2069
         $sql = 'SELECT 1 '
2070 2070
              . $this->getLockTablesSql(null)
2071
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2071
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2072 2072
 
2073 2073
         [$params, $types] = $this->expandParameters($criteria);
2074 2074
 
2075 2075
         if ($extraConditions !== null) {
2076
-            $sql                             .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2076
+            $sql                             .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2077 2077
             [$criteriaParams, $criteriaTypes] = $this->expandCriteriaParameters($extraConditions);
2078 2078
 
2079 2079
             $params = array_merge($params, $criteriaParams);
@@ -2083,7 +2083,7 @@  discard block
 block discarded – undo
2083 2083
         $filterSql = $this->generateFilterConditionSQL($this->class, $alias);
2084 2084
 
2085 2085
         if ($filterSql) {
2086
-            $sql .= ' AND ' . $filterSql;
2086
+            $sql .= ' AND '.$filterSql;
2087 2087
         }
2088 2088
 
2089 2089
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2096,13 +2096,13 @@  discard block
 block discarded – undo
2096 2096
      */
2097 2097
     protected function getJoinSQLForAssociation(AssociationMetadata $association)
2098 2098
     {
2099
-        if (! $association->isOwningSide()) {
2099
+        if ( ! $association->isOwningSide()) {
2100 2100
             return 'LEFT JOIN';
2101 2101
         }
2102 2102
 
2103 2103
         // if one of the join columns is nullable, return left join
2104 2104
         foreach ($association->getJoinColumns() as $joinColumn) {
2105
-            if (! $joinColumn->isNullable()) {
2105
+            if ( ! $joinColumn->isNullable()) {
2106 2106
                 continue;
2107 2107
             }
2108 2108
 
@@ -2119,7 +2119,7 @@  discard block
 block discarded – undo
2119 2119
      */
2120 2120
     public function getSQLColumnAlias()
2121 2121
     {
2122
-        return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++);
2122
+        return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++);
2123 2123
     }
2124 2124
 
2125 2125
     /**
@@ -2138,13 +2138,13 @@  discard block
 block discarded – undo
2138 2138
             $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias);
2139 2139
 
2140 2140
             if ($filterExpr !== '') {
2141
-                $filterClauses[] = '(' . $filterExpr . ')';
2141
+                $filterClauses[] = '('.$filterExpr.')';
2142 2142
             }
2143 2143
         }
2144 2144
 
2145 2145
         $sql = implode(' AND ', $filterClauses);
2146 2146
 
2147
-        return $sql ? '(' . $sql . ')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL"
2147
+        return $sql ? '('.$sql.')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL"
2148 2148
     }
2149 2149
 
2150 2150
     /**
Please login to merge, or discard this patch.