Failed Conditions
Pull Request — master (#7898)
by Guilherme
63:09
created
tests/Doctrine/Tests/ORM/Cache/FileLockRegionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     protected function createRegion()
61 61
     {
62
-        $this->directory = sys_get_temp_dir() . '/doctrine_lock_' . uniqid();
62
+        $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid();
63 63
 
64 64
         $region = new DefaultRegion('concurren_region_test', $this->cache);
65 65
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $reflectionDirectory->setAccessible(true);
263 263
         $reflectionDirectory->setValue($region, str_repeat('a', 10000));
264 264
 
265
-        set_error_handler(static function () {
265
+        set_error_handler(static function() {
266 266
         }, E_WARNING);
267 267
         self::assertTrue($region->evictAll());
268 268
         restore_error_handler();
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     {
276 276
         $path = $path ?: $this->directory;
277 277
 
278
-        if (! is_dir($path)) {
278
+        if ( ! is_dir($path)) {
279 279
             return;
280 280
         }
281 281
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/PersistentCollectionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             ->expects(self::once())
174 174
             ->method('loadCollection')
175 175
             ->with($this->collection)
176
-            ->willReturnCallback(static function (PersistentCollection $persistentCollection) use ($persistedElement) : void {
176
+            ->willReturnCallback(static function(PersistentCollection $persistentCollection) use ($persistedElement) : void {
177 177
                 $persistentCollection->unwrap()->add($persistedElement);
178 178
             });
179 179
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             ->expects(self::once())
211 211
             ->method('loadCollection')
212 212
             ->with($this->collection)
213
-            ->willReturnCallback(static function (PersistentCollection $persistentCollection) use (
213
+            ->willReturnCallback(static function(PersistentCollection $persistentCollection) use (
214 214
                 $persistedElement,
215 215
                 $newElementThatIsAlsoPersisted
216 216
             ) : void {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             ->expects(self::once())
253 253
             ->method('loadCollection')
254 254
             ->with($this->collection)
255
-            ->willReturnCallback(static function (PersistentCollection $persistentCollection) use (
255
+            ->willReturnCallback(static function(PersistentCollection $persistentCollection) use (
256 256
                 $persistedElement,
257 257
                 $newElementThatIsAlsoPersisted
258 258
             ) : void {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/CMS/CmsComment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,6 +35,6 @@
 block discarded – undo
35 35
 
36 36
     public function __toString()
37 37
     {
38
-        return self::class . '[id=' . $this->id . ']';
38
+        return self::class.'[id='.$this->id.']';
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/TestInit.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,20 +15,20 @@
 block discarded – undo
15 15
 error_reporting(E_ALL | E_STRICT);
16 16
 date_default_timezone_set('UTC');
17 17
 
18
-if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) {
18
+if (file_exists(__DIR__.'/../../../vendor/autoload.php')) {
19 19
     // dependencies were installed via composer - this is the main project
20
-    require __DIR__ . '/../../../vendor/autoload.php';
21
-} elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) {
20
+    require __DIR__.'/../../../vendor/autoload.php';
21
+} elseif (file_exists(__DIR__.'/../../../../../autoload.php')) {
22 22
     // installed as a dependency in `vendor`
23
-    require __DIR__ . '/../../../../../autoload.php';
23
+    require __DIR__.'/../../../../../autoload.php';
24 24
 } else {
25 25
     throw new Exception('Can\'t find autoload.php. Did you install dependencies via composer?');
26 26
 }
27 27
 
28
-if (! file_exists(__DIR__ . '/Proxies') && ! mkdir(__DIR__ . '/Proxies')) {
29
-    throw new Exception('Could not create ' . __DIR__ . '/Proxies Folder.');
28
+if ( ! file_exists(__DIR__.'/Proxies') && ! mkdir(__DIR__.'/Proxies')) {
29
+    throw new Exception('Could not create '.__DIR__.'/Proxies Folder.');
30 30
 }
31 31
 
32
-if (! file_exists(__DIR__ . '/ORM/Proxy/generated') && ! mkdir(__DIR__ . '/ORM/Proxy/generated')) {
33
-    throw new Exception('Could not create ' . __DIR__ . '/ORM/Proxy/generated Folder.');
32
+if ( ! file_exists(__DIR__.'/ORM/Proxy/generated') && ! mkdir(__DIR__.'/ORM/Proxy/generated')) {
33
+    throw new Exception('Could not create '.__DIR__.'/ORM/Proxy/generated Folder.');
34 34
 }
Please login to merge, or discard this patch.
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   +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.
lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
                 // It's a joined result
86 86
 
87 87
                 $parent = $this->rsm->parentAliasMap[$dqlAlias];
88
-                $path   = $parent . '.' . $dqlAlias;
88
+                $path   = $parent.'.'.$dqlAlias;
89 89
 
90 90
                 // missing parent data, skipping as RIGHT JOIN hydration is not supported.
91
-                if (! isset($nonemptyComponents[$parent])) {
91
+                if ( ! isset($nonemptyComponents[$parent])) {
92 92
                     continue;
93 93
                 }
94 94
 
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
                 if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) {
98 98
                     $first = reset($this->resultPointers);
99 99
                     // TODO: Exception if $key === null ?
100
-                    $baseElement =& $this->resultPointers[$parent][key($first)];
100
+                    $baseElement = & $this->resultPointers[$parent][key($first)];
101 101
                 } elseif (isset($this->resultPointers[$parent])) {
102
-                    $baseElement =& $this->resultPointers[$parent];
102
+                    $baseElement = & $this->resultPointers[$parent];
103 103
                 } else {
104 104
                     unset($this->resultPointers[$dqlAlias]); // Ticket #1228
105 105
 
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
                 $relation      = $parentClass->getProperty($relationAlias);
112 112
 
113 113
                 // Check the type of the relation (many or single-valued)
114
-                if (! $relation instanceof ToOneAssociationMetadata) {
114
+                if ( ! $relation instanceof ToOneAssociationMetadata) {
115 115
                     $oneToOne = false;
116 116
 
117
-                    if (! isset($baseElement[$relationAlias])) {
117
+                    if ( ! isset($baseElement[$relationAlias])) {
118 118
                         $baseElement[$relationAlias] = [];
119 119
                     }
120 120
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         $index        = $indexExists ? $this->identifierMap[$path][$id[$parent]][$id[$dqlAlias]] : false;
124 124
                         $indexIsValid = $index !== false ? isset($baseElement[$relationAlias][$index]) : false;
125 125
 
126
-                        if (! $indexExists || ! $indexIsValid) {
126
+                        if ( ! $indexExists || ! $indexIsValid) {
127 127
                             $element = $data;
128 128
 
129 129
                             if (isset($this->rsm->indexByMap[$dqlAlias])) {
@@ -140,16 +140,16 @@  discard block
 block discarded – undo
140 140
                 } else {
141 141
                     $oneToOne = true;
142 142
 
143
-                    if (! isset($nonemptyComponents[$dqlAlias]) &&
143
+                    if ( ! isset($nonemptyComponents[$dqlAlias]) &&
144 144
                         ( ! isset($baseElement[$relationAlias]))
145 145
                     ) {
146 146
                         $baseElement[$relationAlias] = null;
147
-                    } elseif (! isset($baseElement[$relationAlias])) {
147
+                    } elseif ( ! isset($baseElement[$relationAlias])) {
148 148
                         $baseElement[$relationAlias] = $data;
149 149
                     }
150 150
                 }
151 151
 
152
-                $coll =& $baseElement[$relationAlias];
152
+                $coll = & $baseElement[$relationAlias];
153 153
 
154 154
                 if (is_array($coll)) {
155 155
                     $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 $entityKey                    = $this->rsm->entityMappings[$dqlAlias] ?: 0;
162 162
 
163 163
                 // if this row has a NULL value for the root result id then make it a null result.
164
-                if (! isset($nonemptyComponents[$dqlAlias])) {
164
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
165 165
                     $result[] = $this->rsm->isMixed
166 166
                         ? [$entityKey => null]
167 167
                         : null;
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
             }
199 199
         }
200 200
 
201
-        if (! isset($resultKey)) {
201
+        if ( ! isset($resultKey)) {
202 202
             $this->resultCounter++;
203 203
         }
204 204
 
205 205
         // Append scalar values to mixed result sets
206 206
         if (isset($rowData['scalars'])) {
207
-            if (! isset($resultKey)) {
207
+            if ( ! isset($resultKey)) {
208 208
                 // this only ever happens when no object is fetched (scalar result only)
209 209
                 $resultKey = isset($this->rsm->indexByMap['scalars'])
210 210
                     ? $row[$this->rsm->indexByMap['scalars']]
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
         // Append new object to mixed result sets
220 220
         if (isset($rowData['newObjects'])) {
221
-            if (! isset($resultKey)) {
221
+            if ( ! isset($resultKey)) {
222 222
                 $resultKey = $this->resultCounter - 1;
223 223
             }
224 224
 
@@ -259,22 +259,22 @@  discard block
 block discarded – undo
259 259
         }
260 260
 
261 261
         if ($oneToOne) {
262
-            $this->resultPointers[$dqlAlias] =& $coll;
262
+            $this->resultPointers[$dqlAlias] = & $coll;
263 263
 
264 264
             return;
265 265
         }
266 266
 
267 267
         if ($index !== false) {
268
-            $this->resultPointers[$dqlAlias] =& $coll[$index];
268
+            $this->resultPointers[$dqlAlias] = & $coll[$index];
269 269
 
270 270
             return;
271 271
         }
272 272
 
273
-        if (! $coll) {
273
+        if ( ! $coll) {
274 274
             return;
275 275
         }
276 276
 
277 277
         end($coll);
278
-        $this->resultPointers[$dqlAlias] =& $coll[key($coll)];
278
+        $this->resultPointers[$dqlAlias] = & $coll[key($coll)];
279 279
     }
280 280
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmFunctionalTestCase.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
         $conn = static::$sharedConn;
347 347
 
348 348
         // In case test is skipped, tearDown is called, but no setup may have run
349
-        if (! $conn) {
349
+        if ( ! $conn) {
350 350
             return;
351 351
         }
352 352
 
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
         }
421 421
 
422 422
         if (isset($this->usedModelSets['directorytree'])) {
423
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('file'));
423
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('file'));
424 424
             // MySQL doesn't know deferred deletions therefore only executing the second query gives errors.
425 425
             $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL');
426 426
             $conn->executeUpdate('DELETE FROM Directory');
@@ -513,12 +513,12 @@  discard block
 block discarded – undo
513 513
                 )
514 514
             );
515 515
 
516
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups'));
517
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-group'));
518
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-phone'));
519
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-user'));
520
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-address'));
521
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city'));
516
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups'));
517
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-group'));
518
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-phone'));
519
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-user'));
520
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-address'));
521
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city'));
522 522
         }
523 523
 
524 524
         if (isset($this->usedModelSets['vct_onetoone'])) {
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
         $classes = [];
631 631
 
632 632
         foreach ($classNames as $className) {
633
-            if (! isset(static::$entityTablesCreated[$className])) {
633
+            if ( ! isset(static::$entityTablesCreated[$className])) {
634 634
                 static::$entityTablesCreated[$className] = true;
635 635
                 $classes[]                               = $this->em->getClassMetadata($className);
636 636
             }
@@ -649,25 +649,25 @@  discard block
 block discarded – undo
649 649
     {
650 650
         $this->setUpDBALTypes();
651 651
 
652
-        if (! isset(static::$sharedConn)) {
652
+        if ( ! isset(static::$sharedConn)) {
653 653
             static::$sharedConn = TestUtil::getConnection();
654 654
         }
655 655
 
656 656
         if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) {
657 657
             if (in_array(static::$sharedConn->getDatabasePlatform()->getName(), ['mysql', 'postgresql'], true)) {
658
-                static::$sharedConn->executeQuery('SELECT 1 /*' . static::class . '*/');
658
+                static::$sharedConn->executeQuery('SELECT 1 /*'.static::class.'*/');
659 659
             } elseif (static::$sharedConn->getDatabasePlatform()->getName() === 'oracle') {
660
-                static::$sharedConn->executeQuery('SELECT 1 /*' . static::class . '*/ FROM dual');
660
+                static::$sharedConn->executeQuery('SELECT 1 /*'.static::class.'*/ FROM dual');
661 661
             }
662 662
         }
663 663
 
664
-        if (! $this->em) {
664
+        if ( ! $this->em) {
665 665
             $this->em         = $this->getEntityManager();
666 666
             $this->schemaTool = new SchemaTool($this->em);
667 667
         }
668 668
 
669 669
         foreach ($this->usedModelSets as $setName => $bool) {
670
-            if (! isset(static::$tablesCreated[$setName])) {
670
+            if ( ! isset(static::$tablesCreated[$setName])) {
671 671
                 $this->setUpEntitySchema(static::$modelSets[$setName]);
672 672
 
673 673
                 static::$tablesCreated[$setName] = true;
@@ -742,8 +742,8 @@  discard block
 block discarded – undo
742 742
 
743 743
         $config->setMetadataDriverImpl(
744 744
             $mappingDriver ?? $config->newDefaultAnnotationDriver([
745
-                realpath(__DIR__ . '/Models/Cache'),
746
-                realpath(__DIR__ . '/Models/GeoNames'),
745
+                realpath(__DIR__.'/Models/Cache'),
746
+                realpath(__DIR__.'/Models/GeoNames'),
747 747
             ])
748 748
         );
749 749
 
@@ -791,13 +791,13 @@  discard block
 block discarded – undo
791 791
 
792 792
             foreach ($last25queries as $i => $query) {
793 793
                 $params = array_map(
794
-                    static function ($p) {
794
+                    static function($p) {
795 795
                         return is_object($p) ? get_class($p) : var_export($p, true);
796 796
                     },
797 797
                     $query['params'] ?: []
798 798
                 );
799 799
 
800
-                $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . implode(', ', $params) . PHP_EOL;
800
+                $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(', ', $params).PHP_EOL;
801 801
             }
802 802
 
803 803
             $trace    = $e->getTrace();
@@ -810,11 +810,11 @@  discard block
 block discarded – undo
810 810
                         break;
811 811
                     }
812 812
 
813
-                    $traceMsg .= $part['file'] . ':' . $part['line'] . PHP_EOL;
813
+                    $traceMsg .= $part['file'].':'.$part['line'].PHP_EOL;
814 814
                 }
815 815
             }
816 816
 
817
-            $message = '[' . get_class($e) . '] ' . $e->getMessage() . PHP_EOL . PHP_EOL . 'With queries:' . PHP_EOL . $queries . PHP_EOL . 'Trace:' . PHP_EOL . $traceMsg;
817
+            $message = '['.get_class($e).'] '.$e->getMessage().PHP_EOL.PHP_EOL.'With queries:'.PHP_EOL.$queries.PHP_EOL.'Trace:'.PHP_EOL.$traceMsg;
818 818
 
819 819
             throw new Exception($message, (int) $e->getCode(), $e);
820 820
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
     protected function configure()
34 34
     {
35 35
         $this->setName('orm:run-dql')
36
-             ->setDescription('Executes arbitrary DQL directly from the command line')
37
-             ->addArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.')
38
-             ->addOption('hydrate', null, InputOption::VALUE_REQUIRED, 'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.', 'object')
39
-             ->addOption('first-result', null, InputOption::VALUE_REQUIRED, 'The first result in the result set.')
40
-             ->addOption('max-result', null, InputOption::VALUE_REQUIRED, 'The maximum number of results in the result set.')
41
-             ->addOption('show-sql', null, InputOption::VALUE_NONE, 'Dump generated SQL instead of executing query')
42
-             ->setHelp('Executes arbitrary DQL directly from the command line.');
36
+                ->setDescription('Executes arbitrary DQL directly from the command line')
37
+                ->addArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.')
38
+                ->addOption('hydrate', null, InputOption::VALUE_REQUIRED, 'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.', 'object')
39
+                ->addOption('first-result', null, InputOption::VALUE_REQUIRED, 'The first result in the result set.')
40
+                ->addOption('max-result', null, InputOption::VALUE_REQUIRED, 'The maximum number of results in the result set.')
41
+                ->addOption('show-sql', null, InputOption::VALUE_NONE, 'Dump generated SQL instead of executing query')
42
+                ->setHelp('Executes arbitrary DQL directly from the command line.');
43 43
     }
44 44
 
45 45
     /**
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
         }
59 59
 
60 60
         $hydrationModeName = $input->getOption('hydrate');
61
-        $hydrationMode     = 'Doctrine\ORM\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $hydrationModeName));
61
+        $hydrationMode     = 'Doctrine\ORM\Query::HYDRATE_'.strtoupper(str_replace('-', '_', $hydrationModeName));
62 62
 
63
-        if (! defined($hydrationMode)) {
63
+        if ( ! defined($hydrationMode)) {
64 64
             throw new RuntimeException(sprintf(
65 65
                 "Hydration mode '%s' does not exist. It should be either: object. array, scalar or single-scalar.",
66 66
                 $hydrationModeName
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $firstResult = $input->getOption('first-result');
72 72
 
73 73
         if ($firstResult !== null) {
74
-            if (! is_numeric($firstResult)) {
74
+            if ( ! is_numeric($firstResult)) {
75 75
                 throw new LogicException("Option 'first-result' must contain an integer value");
76 76
             }
77 77
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $maxResult = $input->getOption('max-result');
82 82
 
83 83
         if ($maxResult !== null) {
84
-            if (! is_numeric($maxResult)) {
84
+            if ( ! is_numeric($maxResult)) {
85 85
                 throw new LogicException("Option 'max-result' must contain an integer value");
86 86
             }
87 87
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
         $resultSet = $query->execute([], constant($hydrationMode));
97 97
 
98
-        $dumper = new CliDumper(static function (string $payload) use ($output) : void {
98
+        $dumper = new CliDumper(static function(string $payload) use ($output) : void {
99 99
             $output->write($payload);
100 100
         });
101 101
         $dumper->dump((new VarCloner())->cloneVar($resultSet));
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Setup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         $cache = self::createCacheInstance($isDevMode, $cache);
88 88
 
89
-        if (! $cache instanceof CacheProvider) {
89
+        if ( ! $cache instanceof CacheProvider) {
90 90
             return $cache;
91 91
         }
92 92
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             $namespace .= ':';
97 97
         }
98 98
 
99
-        $cache->setNamespace($namespace . 'dc2_' . md5($proxyDir) . '_'); // to avoid collisions
99
+        $cache->setNamespace($namespace.'dc2_'.md5($proxyDir).'_'); // to avoid collisions
100 100
 
101 101
         return $cache;
102 102
     }
Please login to merge, or discard this patch.