Completed
Pull Request — master (#7413)
by Michael
10:40
created
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.
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.
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.
tests/Doctrine/Tests/ORM/Functional/QueryTest.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0');
151 151
 
152 152
         $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1')
153
-                  ->getSingleResult();
153
+                    ->getSingleResult();
154 154
     }
155 155
 
156 156
     public function testInvalidInputParameterThrowsException() : void
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
         $this->expectException(QueryException::class);
159 159
 
160 160
         $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?')
161
-                  ->setParameter(1, 'jwage')
162
-                  ->getSingleResult();
161
+                    ->setParameter(1, 'jwage')
162
+                    ->getSingleResult();
163 163
     }
164 164
 
165 165
     public function testSetParameters() : void
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
         $parameters->add(new Parameter(2, 'active'));
170 170
 
171 171
         $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
172
-                  ->setParameters($parameters)
173
-                  ->getResult();
172
+                    ->setParameters($parameters)
173
+                    ->getResult();
174 174
 
175 175
         $extractValue = static function (Parameter $parameter) {
176 176
             return $parameter->getValue();
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
         $parameters = [1 => 'jwage', 2 => 'active'];
188 188
 
189 189
         $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
190
-                  ->setParameters($parameters)
191
-                  ->getResult();
190
+                    ->setParameters($parameters)
191
+                    ->getResult();
192 192
 
193 193
         self::assertSame(
194 194
             array_values($parameters),
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
     public function testGetSingleResultThrowsExceptionOnNoResult() : void
333 333
     {
334 334
         $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a')
335
-             ->getSingleResult();
335
+                ->getSingleResult();
336 336
     }
337 337
 
338 338
     /**
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     public function testGetSingleScalarResultThrowsExceptionOnNoResult() : void
342 342
     {
343 343
         $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a')
344
-             ->getSingleScalarResult();
344
+                ->getSingleScalarResult();
345 345
     }
346 346
 
347 347
     /**
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
         $this->em->clear();
373 373
 
374 374
         $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a')
375
-             ->getSingleScalarResult();
375
+                ->getSingleScalarResult();
376 376
     }
377 377
 
378 378
     public function testModifiedLimitQuery() : void
@@ -389,27 +389,27 @@  discard block
 block discarded – undo
389 389
         $this->em->clear();
390 390
 
391 391
         $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
392
-                  ->setFirstResult(1)
393
-                  ->setMaxResults(2)
394
-                  ->getResult();
392
+                    ->setFirstResult(1)
393
+                    ->setMaxResults(2)
394
+                    ->getResult();
395 395
 
396 396
         self::assertCount(2, $data);
397 397
         self::assertEquals('gblanco1', $data[0]->username);
398 398
         self::assertEquals('gblanco2', $data[1]->username);
399 399
 
400 400
         $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
401
-                  ->setFirstResult(3)
402
-                  ->setMaxResults(2)
403
-                  ->getResult();
401
+                    ->setFirstResult(3)
402
+                    ->setMaxResults(2)
403
+                    ->getResult();
404 404
 
405 405
         self::assertCount(2, $data);
406 406
         self::assertEquals('gblanco3', $data[0]->username);
407 407
         self::assertEquals('gblanco4', $data[1]->username);
408 408
 
409 409
         $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
410
-                  ->setFirstResult(3)
411
-                  ->setMaxResults(2)
412
-                  ->getScalarResult();
410
+                    ->setFirstResult(3)
411
+                    ->setMaxResults(2)
412
+                    ->getScalarResult();
413 413
     }
414 414
 
415 415
     /**
@@ -620,9 +620,9 @@  discard block
 block discarded – undo
620 620
     {
621 621
         $qb = $this->em->createQueryBuilder();
622 622
         $qb->select('u')
623
-           ->from(CmsUser::class, 'u')
624
-           ->innerJoin('u.articles', 'a')
625
-           ->where('(u.id = 0) OR (u.id IS NULL)');
623
+            ->from(CmsUser::class, 'u')
624
+            ->innerJoin('u.articles', 'a')
625
+            ->where('(u.id = 0) OR (u.id IS NULL)');
626 626
 
627 627
         $query = $qb->getQuery();
628 628
         $users = $query->execute();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
         $this->putTripAroundEurope();
114 114
 
115 115
         $dql = 'SELECT t, p, c '
116
-             . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
117
-             . 'INNER JOIN t.pois p '
118
-             . 'INNER JOIN p.country c';
116
+                . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
117
+                . 'INNER JOIN t.pois p '
118
+                . 'INNER JOIN p.country c';
119 119
 
120 120
         $tours = $this->em->createQuery($dql)->getResult();
121 121
 
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
         $this->putTripAroundEurope();
135 135
 
136 136
         $dql = 'SELECT t '
137
-             . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
138
-             . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p '
139
-             . 'WHERE p MEMBER OF t.pois';
137
+                . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
138
+                . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p '
139
+                . 'WHERE p MEMBER OF t.pois';
140 140
 
141 141
         $query = $this->em->createQuery($dql);
142 142
         $tours = $query->getResult();
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 1 patch
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.