Completed
Pull Request — master (#7413)
by Michael
14:14
created
lib/Doctrine/ORM/QueryBuilder.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1353,9 +1353,9 @@  discard block
 block discarded – undo
1353 1353
     private function getDQLForDelete()
1354 1354
     {
1355 1355
         return 'DELETE'
1356
-              . $this->getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', '])
1357
-              . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE '])
1358
-              . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']);
1356
+                . $this->getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', '])
1357
+                . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE '])
1358
+                . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']);
1359 1359
     }
1360 1360
 
1361 1361
     /**
@@ -1364,10 +1364,10 @@  discard block
 block discarded – undo
1364 1364
     private function getDQLForUpdate()
1365 1365
     {
1366 1366
         return 'UPDATE'
1367
-              . $this->getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', '])
1368
-              . $this->getReducedDQLQueryPart('set', ['pre' => ' SET ', 'separator' => ', '])
1369
-              . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE '])
1370
-              . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']);
1367
+                . $this->getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', '])
1368
+                . $this->getReducedDQLQueryPart('set', ['pre' => ' SET ', 'separator' => ', '])
1369
+                . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE '])
1370
+                . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']);
1371 1371
     }
1372 1372
 
1373 1373
     /**
@@ -1376,8 +1376,8 @@  discard block
 block discarded – undo
1376 1376
     private function getDQLForSelect()
1377 1377
     {
1378 1378
         $dql = 'SELECT'
1379
-             . ($this->dqlParts['distinct']===true ? ' DISTINCT' : '')
1380
-             . $this->getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']);
1379
+                . ($this->dqlParts['distinct']===true ? ' DISTINCT' : '')
1380
+                . $this->getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']);
1381 1381
 
1382 1382
         $fromParts   = $this->getDQLPart('from');
1383 1383
         $joinParts   = $this->getDQLPart('join');
@@ -1401,10 +1401,10 @@  discard block
 block discarded – undo
1401 1401
         }
1402 1402
 
1403 1403
         return $dql . implode(', ', $fromClauses)
1404
-              . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE '])
1405
-              . $this->getReducedDQLQueryPart('groupBy', ['pre' => ' GROUP BY ', 'separator' => ', '])
1406
-              . $this->getReducedDQLQueryPart('having', ['pre' => ' HAVING '])
1407
-              . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']);
1404
+                . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE '])
1405
+                . $this->getReducedDQLQueryPart('groupBy', ['pre' => ' GROUP BY ', 'separator' => ', '])
1406
+                . $this->getReducedDQLQueryPart('having', ['pre' => ' HAVING '])
1407
+                . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']);
1408 1408
     }
1409 1409
 
1410 1410
     /**
@@ -1422,8 +1422,8 @@  discard block
 block discarded – undo
1422 1422
         }
1423 1423
 
1424 1424
         return ($options['pre'] ?? '')
1425
-             . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart)
1426
-             . ($options['post'] ?? '');
1425
+                . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart)
1426
+                . ($options['post'] ?? '');
1427 1427
     }
1428 1428
 
1429 1429
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -306,8 +306,8 @@  discard block
 block discarded – undo
306 306
 
307 307
         // FIXME: Order with composite keys might not be correct
308 308
         $sql = 'SELECT ' . $columnName
309
-             . ' FROM ' . $tableName
310
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
309
+                . ' FROM ' . $tableName
310
+                . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
311 311
 
312 312
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
313 313
         $versionType = $versionProperty->getType();
@@ -520,8 +520,8 @@  discard block
 block discarded – undo
520 520
         }
521 521
 
522 522
         $sql = 'UPDATE ' . $quotedTableName
523
-             . ' SET ' . implode(', ', $set)
524
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
523
+                . ' SET ' . implode(', ', $set)
524
+                . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
525 525
 
526 526
         $result = $this->conn->executeUpdate($sql, $params, $types);
527 527
 
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
         }
931 931
 
932 932
         foreach ($types as $type) {
933
-             [$field, $value] = $type;
933
+                [$field, $value] = $type;
934 934
             $sqlTypes         = array_merge($sqlTypes, $this->getTypes($field, $value, $this->class));
935 935
         }
936 936
 
@@ -1640,9 +1640,9 @@  discard block
 block discarded – undo
1640 1640
         $lock  = $this->getLockTablesSql($lockMode);
1641 1641
         $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1642 1642
         $sql   = 'SELECT 1 '
1643
-             . $lock
1644
-             . $where
1645
-             . $lockSql;
1643
+                . $lock
1644
+                . $where
1645
+                . $lockSql;
1646 1646
 
1647 1647
         [$params, $types] = $this->expandParameters($criteria);
1648 1648
 
@@ -2111,8 +2111,8 @@  discard block
 block discarded – undo
2111 2111
         $alias = $this->getSQLTableAlias($this->class->getTableName());
2112 2112
 
2113 2113
         $sql = 'SELECT 1 '
2114
-             . $this->getLockTablesSql(null)
2115
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2114
+                . $this->getLockTablesSql(null)
2115
+                . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2116 2116
 
2117 2117
         [$params, $types] = $this->expandParameters($criteria);
2118 2118
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
     protected function configure()
52 52
     {
53 53
         $this->setName('orm:mapping:describe')
54
-             ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
55
-             ->setDescription('Display information about mapped objects')
56
-             ->setHelp(<<<'EOT'
54
+                ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
55
+                ->setDescription('Display information about mapped objects')
56
+                ->setHelp(<<<'EOT'
57 57
 The %command.full_name% command describes the metadata for the given full or partial entity class name.
58 58
 
59 59
     <info>%command.full_name%</info> My\Namespace\Entity\MyEntity
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     <info>%command.full_name%</info> MyEntity
64 64
 EOT
65
-             );
65
+                );
66 66
     }
67 67
 
68 68
     /**
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
     private function getMappedEntities(EntityManagerInterface $entityManager)
140 140
     {
141 141
         $entityClassNames = $entityManager->getConfiguration()
142
-                                          ->getMetadataDriverImpl()
143
-                                          ->getAllClassNames();
142
+                                            ->getMetadataDriverImpl()
143
+                                            ->getAllClassNames();
144 144
 
145 145
         if (! $entityClassNames) {
146 146
             throw new InvalidArgumentException(
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -457,7 +457,7 @@
 block discarded – undo
457 457
     private function executeExtraUpdates()
458 458
     {
459 459
         foreach ($this->extraUpdates as $oid => $update) {
460
-             [$entity, $changeset] = $update;
460
+                [$entity, $changeset] = $update;
461 461
 
462 462
             $this->entityChangeSets[$oid] = $changeset;
463 463
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     public function testBulkUpdateIssueDDC368() : void
302 302
     {
303 303
         $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1')
304
-                  ->execute();
304
+                    ->execute();
305 305
 
306 306
         $result = $this->em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1')
307 307
                             ->getResult();
@@ -315,9 +315,9 @@  discard block
 block discarded – undo
315 315
     public function testBulkUpdateNonScalarParameterDDC1341() : void
316 316
     {
317 317
         $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1')
318
-                  ->setParameter(0, new DateTime())
319
-                  ->setParameter(1, 'IT')
320
-                  ->execute();
318
+                    ->setParameter(0, new DateTime())
319
+                    ->setParameter(1, 'IT')
320
+                    ->execute();
321 321
 
322 322
         self::addToAssertionCount(1);
323 323
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3123Test.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
         $uow->scheduleExtraUpdate($user, ['name' => 'changed name']);
34 34
 
35 35
         $listener = $this->getMockBuilder(stdClass::class)
36
-                         ->setMethods([Events::postFlush])
37
-                         ->getMock();
36
+                            ->setMethods([Events::postFlush])
37
+                            ->getMock();
38 38
 
39 39
         $listener
40 40
             ->expects($this->once())
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
     public function assertLoadingOfOwningSide($products)
92 92
     {
93
-         [$firstProduct, $secondProduct] = $products;
93
+            [$firstProduct, $secondProduct] = $products;
94 94
         self::assertCount(2, $firstProduct->getRelated());
95 95
         self::assertCount(2, $secondProduct->getRelated());
96 96
 
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
     public function assertLazyLoadFromInverseSide($products)
156 156
     {
157
-         [$firstProduct, $secondProduct] = $products;
157
+            [$firstProduct, $secondProduct] = $products;
158 158
 
159 159
         $firstProductCategories  = $firstProduct->getCategories();
160 160
         $secondProductCategories = $secondProduct->getCategories();
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
     public function assertLazyLoadFromOwningSide($categories)
191 191
     {
192
-         [$firstCategory, $secondCategory] = $categories;
192
+            [$firstCategory, $secondCategory] = $categories;
193 193
 
194 194
         $firstCategoryProducts  = $firstCategory->getProducts();
195 195
         $secondCategoryProducts = $secondCategory->getProducts();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/TypeTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -167,12 +167,12 @@
 block discarded – undo
167 167
         $this->em->clear();
168 168
 
169 169
         $dateTimeDb = $this->em->createQueryBuilder()
170
-             ->select('d')
171
-             ->from(DateTimeModel::class, 'd')
172
-             ->where('d.datetime = ?1')
173
-             ->setParameter(1, $date, DBALType::DATETIME)
174
-             ->getQuery()
175
-             ->getSingleResult();
170
+                ->select('d')
171
+                ->from(DateTimeModel::class, 'd')
172
+                ->where('d.datetime = ?1')
173
+                ->setParameter(1, $date, DBALType::DATETIME)
174
+                ->getQuery()
175
+                ->getSingleResult();
176 176
 
177 177
         self::assertInstanceOf(DateTime::class, $dateTimeDb->datetime);
178 178
         self::assertSame('2009-10-02 20:10:52', $dateTimeDb->datetime->format('Y-m-d H:i:s'));
Please login to merge, or discard this patch.