Passed
Branch tests-better-coverage (039fc0)
by Michael
09:41
created
tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -224,10 +224,10 @@  discard block
 block discarded – undo
224 224
              //  Named parameters : Very simple with param int and string
225 225
             array(
226 226
                 "SELECT * FROM Foo WHERE foo = :foo AND bar = :bar",
227
-                array('bar'=>'Some String','foo'=>1),
227
+                array('bar'=>'Some String', 'foo'=>1),
228 228
                 array('foo' => ParameterType::INTEGER, 'bar' => ParameterType::STRING),
229 229
                 'SELECT * FROM Foo WHERE foo = ? AND bar = ?',
230
-                array(1,'Some String'),
230
+                array(1, 'Some String'),
231 231
                 array(ParameterType::INTEGER, ParameterType::STRING)
232 232
             ),
233 233
             //  Named parameters : Very simple with one needle
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
             // Named parameters: One non-list before and one after list-needle
261 261
             array(
262 262
                 "SELECT * FROM Foo WHERE foo = :foo AND bar IN (:bar) AND baz = :baz",
263
-                array('bar'=>array(1, 2, 3),'foo'=>1, 'baz'=>4),
263
+                array('bar'=>array(1, 2, 3), 'foo'=>1, 'baz'=>4),
264 264
                 array('bar'=>Connection::PARAM_INT_ARRAY, 'foo'=>ParameterType::INTEGER, 'baz'=>ParameterType::INTEGER),
265 265
                 'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?) AND baz = ?',
266 266
                 array(1, 1, 2, 3, 4),
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             // Named parameters: Two lists
270 270
             array(
271 271
                 "SELECT * FROM Foo WHERE foo IN (:a, :b)",
272
-                array('b'=>array(4, 5),'a'=>array(1, 2, 3)),
272
+                array('b'=>array(4, 5), 'a'=>array(1, 2, 3)),
273 273
                 array('a'=>Connection::PARAM_INT_ARRAY, 'b'=>Connection::PARAM_INT_ARRAY),
274 274
                 'SELECT * FROM Foo WHERE foo IN (?, ?, ?, ?, ?)',
275 275
                 array(1, 2, 3, 4, 5),
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
                 array('arg'=>"Some String"),
282 282
                 array('arg'=>ParameterType::STRING),
283 283
                 'SELECT * FROM Foo WHERE foo <> ? AND bar = ?',
284
-                array("Some String","Some String"),
285
-                array(ParameterType::STRING,ParameterType::STRING,)
284
+                array("Some String", "Some String"),
285
+                array(ParameterType::STRING, ParameterType::STRING,)
286 286
             ),
287 287
              //  Named parameters : With the same name arg
288 288
             array(
@@ -291,14 +291,14 @@  discard block
 block discarded – undo
291 291
                 array('arg'=>Connection::PARAM_INT_ARRAY),
292 292
                 'SELECT * FROM Foo WHERE foo IN (?, ?, ?) AND NOT bar IN (?, ?, ?)',
293 293
                 array(1, 2, 3, 1, 2, 3),
294
-                array(ParameterType::INTEGER,ParameterType::INTEGER, ParameterType::INTEGER,ParameterType::INTEGER,ParameterType::INTEGER, ParameterType::INTEGER)
294
+                array(ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER)
295 295
             ),
296 296
 
297 297
              //  Named parameters : Same name, other name in between DBAL-299
298 298
             array(
299 299
                 "SELECT * FROM Foo WHERE (:foo = 2) AND (:bar = 3) AND (:foo = 2)",
300
-                array('foo'=>2,'bar'=>3),
301
-                array('foo'=>ParameterType::INTEGER,'bar'=>ParameterType::INTEGER),
300
+                array('foo'=>2, 'bar'=>3),
301
+                array('foo'=>ParameterType::INTEGER, 'bar'=>ParameterType::INTEGER),
302 302
                 'SELECT * FROM Foo WHERE (? = 2) AND (? = 3) AND (? = 2)',
303 303
                 array(2, 3, 2),
304 304
                 array(ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER)
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/ConnectionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -831,7 +831,7 @@
 block discarded – undo
831 831
             ->method('getResultCacheDriver')
832 832
             ->will($this->returnValue($resultCacheDriverMock));
833 833
 
834
-        $query  = 'SELECT 1';
834
+        $query = 'SELECT 1';
835 835
 
836 836
         $connectionParams = $this->params;
837 837
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
     public function testEmptySelect()
350 350
     {
351
-        $qb   = new QueryBuilder($this->conn);
351
+        $qb = new QueryBuilder($this->conn);
352 352
         $qb2 = $qb->select();
353 353
 
354 354
         self::assertSame($qb, $qb2);
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 
370 370
     public function testEmptyAddSelect()
371 371
     {
372
-        $qb   = new QueryBuilder($this->conn);
372
+        $qb = new QueryBuilder($this->conn);
373 373
         $qb2 = $qb->addSelect();
374 374
 
375 375
         self::assertSame($qb, $qb2);
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
     public function testUpdate()
393 393
     {
394
-        $qb   = new QueryBuilder($this->conn);
394
+        $qb = new QueryBuilder($this->conn);
395 395
         $qb->update('users', 'u')
396 396
            ->set('u.foo', '?')
397 397
            ->set('u.bar', '?');
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 
403 403
     public function testUpdateWithoutAlias()
404 404
     {
405
-        $qb   = new QueryBuilder($this->conn);
405
+        $qb = new QueryBuilder($this->conn);
406 406
         $qb->update('users')
407 407
            ->set('foo', '?')
408 408
            ->set('bar', '?');
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 
413 413
     public function testUpdateWhere()
414 414
     {
415
-        $qb   = new QueryBuilder($this->conn);
415
+        $qb = new QueryBuilder($this->conn);
416 416
         $qb->update('users', 'u')
417 417
            ->set('u.foo', '?')
418 418
            ->where('u.foo = ?');
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 
423 423
     public function testEmptyUpdate()
424 424
     {
425
-        $qb   = new QueryBuilder($this->conn);
425
+        $qb = new QueryBuilder($this->conn);
426 426
         $qb2 = $qb->update();
427 427
 
428 428
         self::assertEquals(QueryBuilder::UPDATE, $qb->getType());
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 
432 432
     public function testDelete()
433 433
     {
434
-        $qb   = new QueryBuilder($this->conn);
434
+        $qb = new QueryBuilder($this->conn);
435 435
         $qb->delete('users', 'u');
436 436
 
437 437
         self::assertEquals(QueryBuilder::DELETE, $qb->getType());
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 
441 441
     public function testDeleteWithoutAlias()
442 442
     {
443
-        $qb   = new QueryBuilder($this->conn);
443
+        $qb = new QueryBuilder($this->conn);
444 444
         $qb->delete('users');
445 445
 
446 446
         self::assertEquals(QueryBuilder::DELETE, $qb->getType());
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 
450 450
     public function testDeleteWhere()
451 451
     {
452
-        $qb   = new QueryBuilder($this->conn);
452
+        $qb = new QueryBuilder($this->conn);
453 453
         $qb->delete('users', 'u')
454 454
            ->where('u.foo = ?');
455 455
 
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 
459 459
     public function testEmptyDelete()
460 460
     {
461
-        $qb   = new QueryBuilder($this->conn);
461
+        $qb = new QueryBuilder($this->conn);
462 462
         $qb2 = $qb->delete();
463 463
 
464 464
         self::assertEquals(QueryBuilder::DELETE, $qb->getType());
@@ -539,13 +539,13 @@  discard block
 block discarded – undo
539 539
 
540 540
     public function testGetConnection()
541 541
     {
542
-        $qb   = new QueryBuilder($this->conn);
542
+        $qb = new QueryBuilder($this->conn);
543 543
         self::assertSame($this->conn, $qb->getConnection());
544 544
     }
545 545
 
546 546
     public function testGetState()
547 547
     {
548
-        $qb   = new QueryBuilder($this->conn);
548
+        $qb = new QueryBuilder($this->conn);
549 549
 
550 550
         self::assertEquals(QueryBuilder::STATE_CLEAN, $qb->getState());
551 551
 
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 
562 562
     public function testSetMaxResults()
563 563
     {
564
-        $qb   = new QueryBuilder($this->conn);
564
+        $qb = new QueryBuilder($this->conn);
565 565
         $qb->setMaxResults(10);
566 566
 
567 567
         self::assertEquals(QueryBuilder::STATE_DIRTY, $qb->getState());
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 
571 571
     public function testSetFirstResult()
572 572
     {
573
-        $qb   = new QueryBuilder($this->conn);
573
+        $qb = new QueryBuilder($this->conn);
574 574
         $qb->setFirstResult(10);
575 575
 
576 576
         self::assertEquals(QueryBuilder::STATE_DIRTY, $qb->getState());
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
 
580 580
     public function testResetQueryPart()
581 581
     {
582
-        $qb   = new QueryBuilder($this->conn);
582
+        $qb = new QueryBuilder($this->conn);
583 583
 
584 584
         $qb->select('u.*')->from('users', 'u')->where('u.name = ?');
585 585
 
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 
591 591
     public function testResetQueryParts()
592 592
     {
593
-        $qb   = new QueryBuilder($this->conn);
593
+        $qb = new QueryBuilder($this->conn);
594 594
 
595 595
         $qb->select('u.*')->from('users', 'u')->where('u.name = ?')->orderBy('u.name');
596 596
 
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
 
602 602
     public function testCreateNamedParameter()
603 603
     {
604
-        $qb   = new QueryBuilder($this->conn);
604
+        $qb = new QueryBuilder($this->conn);
605 605
 
606 606
         $qb->select('u.*')->from('users', 'u')->where(
607 607
             $qb->expr()->eq('u.name', $qb->createNamedParameter(10, ParameterType::INTEGER))
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
 
615 615
     public function testCreateNamedParameterCustomPlaceholder()
616 616
     {
617
-        $qb   = new QueryBuilder($this->conn);
617
+        $qb = new QueryBuilder($this->conn);
618 618
 
619 619
         $qb->select('u.*')->from('users', 'u')->where(
620 620
             $qb->expr()->eq('u.name', $qb->createNamedParameter(10, ParameterType::INTEGER, ':test'))
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 
628 628
     public function testCreatePositionalParameter()
629 629
     {
630
-        $qb   = new QueryBuilder($this->conn);
630
+        $qb = new QueryBuilder($this->conn);
631 631
 
632 632
         $qb->select('u.*')->from('users', 'u')->where(
633 633
             $qb->expr()->eq('u.name', $qb->createPositionalParameter(10, ParameterType::INTEGER))
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
     public function testIn()
204 204
     {
205
-        self::assertEquals('u.groups IN (1, 3, 4, 7)', $this->expr->in('u.groups', array(1,3,4,7)));
205
+        self::assertEquals('u.groups IN (1, 3, 4, 7)', $this->expr->in('u.groups', array(1, 3, 4, 7)));
206 206
     }
207 207
 
208 208
     public function testInWithPlaceholder()
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
     public function testNotIn()
214 214
     {
215
-        self::assertEquals('u.groups NOT IN (1, 3, 4, 7)', $this->expr->notIn('u.groups', array(1,3,4,7)));
215
+        self::assertEquals('u.groups NOT IN (1, 3, 4, 7)', $this->expr->notIn('u.groups', array(1, 3, 4, 7)));
216 216
     }
217 217
 
218 218
     public function testNotInWithPlaceholder()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\DBAL\Platforms;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Platforms/SQLServer2012PlatformTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -125,17 +125,17 @@
 block discarded – undo
125 125
     public function testModifyLimitQueryWithExtraLongQuery()
126 126
     {
127 127
         $query = 'SELECT table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 ';
128
-        $query.= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) ';
129
-        $query.= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) ';
130
-        $query.= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)';
128
+        $query .= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) ';
129
+        $query .= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) ';
130
+        $query .= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)';
131 131
 
132 132
         $sql = $this->_platform->modifyLimitQuery($query, 10);
133 133
 
134 134
         $expected = 'SELECT table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 ';
135
-        $expected.= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) ';
136
-        $expected.= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) ';
137
-        $expected.= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8) ';
138
-        $expected.= 'ORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY';
135
+        $expected .= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) ';
136
+        $expected .= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) ';
137
+        $expected .= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8) ';
138
+        $expected .= 'ORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY';
139 139
 
140 140
 
141 141
         self::assertEquals($expected, $sql);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -292,14 +292,14 @@
 block discarded – undo
292 292
     public function testModifyLimitQueryWithExtraLongQuery()
293 293
     {
294 294
         $query = 'SELECT table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 ';
295
-        $query.= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) ';
296
-        $query.= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) ';
297
-        $query.= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)';
295
+        $query .= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) ';
296
+        $query .= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) ';
297
+        $query .= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)';
298 298
 
299 299
         $alteredSql = 'SELECT TOP 10 table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 ';
300
-        $alteredSql.= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) ';
301
-        $alteredSql.= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) ';
302
-        $alteredSql.= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)';
300
+        $alteredSql .= 'WHERE (table1.column1 = table2.column2) AND (table1.column1 = table3.column3) AND (table1.column1 = table4.column4) AND (table1.column1 = table5.column5) AND (table1.column1 = table6.column6) AND (table1.column1 = table7.column7) AND (table1.column1 = table8.column8) AND (table2.column2 = table3.column3) AND (table2.column2 = table4.column4) AND (table2.column2 = table5.column5) AND (table2.column2 = table6.column6) ';
301
+        $alteredSql .= 'AND (table2.column2 = table7.column7) AND (table2.column2 = table8.column8) AND (table3.column3 = table4.column4) AND (table3.column3 = table5.column5) AND (table3.column3 = table6.column6) AND (table3.column3 = table7.column7) AND (table3.column3 = table8.column8) AND (table4.column4 = table5.column5) AND (table4.column4 = table6.column6) AND (table4.column4 = table7.column7) AND (table4.column4 = table8.column8) ';
302
+        $alteredSql .= 'AND (table5.column5 = table6.column6) AND (table5.column5 = table7.column7) AND (table5.column5 = table8.column8) AND (table6.column6 = table7.column7) AND (table6.column6 = table8.column8) AND (table7.column7 = table8.column8)';
303 303
 
304 304
         $sql = $this->_platform->modifyLimitQuery($query, 10);
305 305
         $this->expectCteWithMaxRowNum($alteredSql, 10, $sql);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
         }
44 44
 
45 45
         $c = $this->_platform->getIdentifierQuoteCharacter();
46
-        self::assertEquals($c."test".$c, $this->_platform->quoteIdentifier("test"));
47
-        self::assertEquals($c."test".$c.".".$c."test".$c, $this->_platform->quoteIdentifier("test.test"));
46
+        self::assertEquals($c . "test" . $c, $this->_platform->quoteIdentifier("test"));
47
+        self::assertEquals($c . "test" . $c . "." . $c . "test" . $c, $this->_platform->quoteIdentifier("test.test"));
48 48
         self::assertEquals(str_repeat($c, 4), $this->_platform->quoteIdentifier($c));
49 49
     }
50 50
 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
         }
59 59
 
60 60
         $c = $this->_platform->getIdentifierQuoteCharacter();
61
-        self::assertEquals($c."test".$c, $this->_platform->quoteSingleIdentifier("test"));
62
-        self::assertEquals($c."test.test".$c, $this->_platform->quoteSingleIdentifier("test.test"));
61
+        self::assertEquals($c . "test" . $c, $this->_platform->quoteSingleIdentifier("test"));
62
+        self::assertEquals($c . "test.test" . $c, $this->_platform->quoteSingleIdentifier("test.test"));
63 63
         self::assertEquals(str_repeat($c, 4), $this->_platform->quoteSingleIdentifier($c));
64 64
     }
65 65
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function testRegistersCommentedDoctrineMappingTypeImplicitly()
119 119
     {
120
-        if (!Type::hasType('my_commented')) {
120
+        if ( ! Type::hasType('my_commented')) {
121 121
             Type::addType('my_commented', CommentedType::class);
122 122
         }
123 123
 
@@ -222,11 +222,11 @@  discard block
 block discarded – undo
222 222
         $actuals = array();
223 223
 
224 224
         if ($this->supportsInlineIndexDeclaration()) {
225
-            $actuals []= $this->_platform->getIndexDeclarationSQL('name', $indexDef);
225
+            $actuals [] = $this->_platform->getIndexDeclarationSQL('name', $indexDef);
226 226
         }
227 227
 
228
-        $actuals []= $this->_platform->getUniqueConstraintDeclarationSQL('name', $uniqueIndex);
229
-        $actuals []= $this->_platform->getCreateIndexSQL($indexDef, 'table');
228
+        $actuals [] = $this->_platform->getUniqueConstraintDeclarationSQL('name', $uniqueIndex);
229
+        $actuals [] = $this->_platform->getCreateIndexSQL($indexDef, 'table');
230 230
 
231 231
         foreach ($actuals as $actual) {
232 232
             if ($this->_platform->supportsPartialIndexes()) {
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 
559 559
     public function testGetDefaultValueDeclarationSQLForIntegerTypes()
560 560
     {
561
-        foreach(array('bigint', 'integer', 'smallint') as $type) {
561
+        foreach (array('bigint', 'integer', 'smallint') as $type) {
562 562
             $field = array(
563 563
                 'type'    => Type::getType($type),
564 564
                 'default' => 1
@@ -654,24 +654,24 @@  discard block
 block discarded – undo
654 654
 
655 655
         // Foreign table with reserved keyword as name (needs quotation).
656 656
         $foreignTable = new Table('foreign');
657
-        $foreignTable->addColumn('create', 'string');    // Foreign column with reserved keyword as name (needs quotation).
658
-        $foreignTable->addColumn('bar', 'string');       // Foreign column with non-reserved keyword as name (does not need quotation).
657
+        $foreignTable->addColumn('create', 'string'); // Foreign column with reserved keyword as name (needs quotation).
658
+        $foreignTable->addColumn('bar', 'string'); // Foreign column with non-reserved keyword as name (does not need quotation).
659 659
         $foreignTable->addColumn('`foo-bar`', 'string'); // Foreign table with special character in name (needs quotation on some platforms, e.g. Sqlite).
660 660
 
661 661
         $table->addForeignKeyConstraint($foreignTable, array('create', 'foo', '`bar`'), array('create', 'bar', '`foo-bar`'), array(), 'FK_WITH_RESERVED_KEYWORD');
662 662
 
663 663
         // Foreign table with non-reserved keyword as name (does not need quotation).
664 664
         $foreignTable = new Table('foo');
665
-        $foreignTable->addColumn('create', 'string');    // Foreign column with reserved keyword as name (needs quotation).
666
-        $foreignTable->addColumn('bar', 'string');       // Foreign column with non-reserved keyword as name (does not need quotation).
665
+        $foreignTable->addColumn('create', 'string'); // Foreign column with reserved keyword as name (needs quotation).
666
+        $foreignTable->addColumn('bar', 'string'); // Foreign column with non-reserved keyword as name (does not need quotation).
667 667
         $foreignTable->addColumn('`foo-bar`', 'string'); // Foreign table with special character in name (needs quotation on some platforms, e.g. Sqlite).
668 668
 
669 669
         $table->addForeignKeyConstraint($foreignTable, array('create', 'foo', '`bar`'), array('create', 'bar', '`foo-bar`'), array(), 'FK_WITH_NON_RESERVED_KEYWORD');
670 670
 
671 671
         // Foreign table with special character in name (needs quotation on some platforms, e.g. Sqlite).
672 672
         $foreignTable = new Table('`foo-bar`');
673
-        $foreignTable->addColumn('create', 'string');    // Foreign column with reserved keyword as name (needs quotation).
674
-        $foreignTable->addColumn('bar', 'string');       // Foreign column with non-reserved keyword as name (does not need quotation).
673
+        $foreignTable->addColumn('create', 'string'); // Foreign column with reserved keyword as name (needs quotation).
674
+        $foreignTable->addColumn('bar', 'string'); // Foreign column with non-reserved keyword as name (does not need quotation).
675 675
         $foreignTable->addColumn('`foo-bar`', 'string'); // Foreign table with special character in name (needs quotation on some platforms, e.g. Sqlite).
676 676
 
677 677
         $table->addForeignKeyConstraint($foreignTable, array('create', 'foo', '`bar`'), array('create', 'bar', '`foo-bar`'), array(), 'FK_WITH_INTENDED_QUOTATION');
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
     {
722 722
         $index = new Index('select', array('foo'));
723 723
 
724
-        if (! $this->supportsInlineIndexDeclaration()) {
724
+        if ( ! $this->supportsInlineIndexDeclaration()) {
725 725
             $this->expectException('Doctrine\DBAL\DBALException');
726 726
         }
727 727
 
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
      */
1079 1079
     public function testQuotesDropForeignKeySQL()
1080 1080
     {
1081
-        if (! $this->_platform->supportsForeignKeyConstraints()) {
1081
+        if ( ! $this->_platform->supportsForeignKeyConstraints()) {
1082 1082
             $this->markTestSkipped(
1083 1083
                 sprintf('%s does not support foreign key constraints.', get_class($this->_platform))
1084 1084
             );
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
      */
1187 1187
     public function testGeneratesInlineColumnCommentSQL($comment, $expectedSql)
1188 1188
     {
1189
-        if (! $this->_platform->supportsInlineColumnComments()) {
1189
+        if ( ! $this->_platform->supportsInlineColumnComments()) {
1190 1190
             $this->markTestSkipped(sprintf('%s does not support inline column comments.', get_class($this->_platform)));
1191 1191
         }
1192 1192
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -672,7 +672,7 @@
 block discarded – undo
672 672
             array(false, 'false', 0, false),
673 673
             array('f', 'false', 0, false),
674 674
             array('false', 'false', 0, false),
675
-            array( 'n', 'false', 0, false),
675
+            array('n', 'false', 0, false),
676 676
             array('no', 'false', 0, false),
677 677
             array('off', 'false', 0, false),
678 678
             array('0', 'false', 0, false),
Please login to merge, or discard this patch.