Failed Conditions
Pull Request — master (#7046)
by Gabriel
05:33
created
tests/Doctrine/Tests/ORM/Functional/QueryTest.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0');
150 150
 
151 151
         $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1')
152
-                  ->getSingleResult();
152
+                    ->getSingleResult();
153 153
     }
154 154
 
155 155
     public function testInvalidInputParameterThrowsException()
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
         $this->expectException(QueryException::class);
158 158
 
159 159
         $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?')
160
-                  ->setParameter(1, 'jwage')
161
-                  ->getSingleResult();
160
+                    ->setParameter(1, 'jwage')
161
+                    ->getSingleResult();
162 162
     }
163 163
 
164 164
     public function testSetParameters()
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
         $parameters->add(new Parameter(2, 'active'));
169 169
 
170 170
         $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
171
-                  ->setParameters($parameters)
172
-                  ->getResult();
171
+                    ->setParameters($parameters)
172
+                    ->getResult();
173 173
 
174 174
         $extractValue = function (Parameter $parameter) {
175 175
             return $parameter->getValue();
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
         $parameters = [1 => 'jwage', 2 => 'active'];
187 187
 
188 188
         $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
189
-                  ->setParameters($parameters)
190
-                  ->getResult();
189
+                    ->setParameters($parameters)
190
+                    ->getResult();
191 191
 
192 192
         self::assertSame(
193 193
             array_values($parameters),
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     public function testGetSingleResultThrowsExceptionOnNoResult()
332 332
     {
333 333
         $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a')
334
-             ->getSingleResult();
334
+                ->getSingleResult();
335 335
     }
336 336
 
337 337
     /**
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
     public function testGetSingleScalarResultThrowsExceptionOnNoResult()
341 341
     {
342 342
         $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a')
343
-             ->getSingleScalarResult();
343
+                ->getSingleScalarResult();
344 344
     }
345 345
 
346 346
     /**
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         $this->em->clear();
372 372
 
373 373
         $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a')
374
-             ->getSingleScalarResult();
374
+                ->getSingleScalarResult();
375 375
     }
376 376
 
377 377
     public function testModifiedLimitQuery()
@@ -388,27 +388,27 @@  discard block
 block discarded – undo
388 388
         $this->em->clear();
389 389
 
390 390
         $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
391
-                  ->setFirstResult(1)
392
-                  ->setMaxResults(2)
393
-                  ->getResult();
391
+                    ->setFirstResult(1)
392
+                    ->setMaxResults(2)
393
+                    ->getResult();
394 394
 
395 395
         self::assertCount(2, $data);
396 396
         self::assertEquals('gblanco1', $data[0]->username);
397 397
         self::assertEquals('gblanco2', $data[1]->username);
398 398
 
399 399
         $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
400
-                  ->setFirstResult(3)
401
-                  ->setMaxResults(2)
402
-                  ->getResult();
400
+                    ->setFirstResult(3)
401
+                    ->setMaxResults(2)
402
+                    ->getResult();
403 403
 
404 404
         self::assertCount(2, $data);
405 405
         self::assertEquals('gblanco3', $data[0]->username);
406 406
         self::assertEquals('gblanco4', $data[1]->username);
407 407
 
408 408
         $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
409
-                  ->setFirstResult(3)
410
-                  ->setMaxResults(2)
411
-                  ->getScalarResult();
409
+                    ->setFirstResult(3)
410
+                    ->setMaxResults(2)
411
+                    ->getScalarResult();
412 412
     }
413 413
 
414 414
     /**
@@ -619,9 +619,9 @@  discard block
 block discarded – undo
619 619
     {
620 620
         $qb = $this->em->createQueryBuilder();
621 621
         $qb->select('u')
622
-           ->from(CmsUser::class, 'u')
623
-           ->innerJoin('u.articles', 'a')
624
-           ->where('(u.id = 0) OR (u.id IS NULL)');
622
+            ->from(CmsUser::class, 'u')
623
+            ->innerJoin('u.articles', 'a')
624
+            ->where('(u.id = 0) OR (u.id IS NULL)');
625 625
 
626 626
         $query = $qb->getQuery();
627 627
         $users = $query->execute();
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 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\ORM\Functional;
6 6
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $this->em->flush();
95 95
         $this->em->clear();
96 96
 
97
-        $query = $this->em->createQuery('select u, a from ' . CmsUser::class . ' u join u.articles a ORDER BY a.topic');
97
+        $query = $this->em->createQuery('select u, a from '.CmsUser::class.' u join u.articles a ORDER BY a.topic');
98 98
         $users = $query->getResult();
99 99
 
100 100
         self::assertCount(1, $users);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $this->em->flush();
115 115
         $this->em->clear();
116 116
 
117
-        $q = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.username = ?0');
117
+        $q = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.username = ?0');
118 118
         $q->setParameter(0, 'jwage');
119 119
         $user = $q->getSingleResult();
120 120
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $this->expectException(QueryException::class);
127 127
         $this->expectExceptionMessage('Invalid parameter: token 2 is not defined in the query.');
128 128
 
129
-        $q = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1');
129
+        $q = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1');
130 130
         $q->setParameter(2, 'jwage');
131 131
         $user = $q->getSingleResult();
132 132
     }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $this->expectException(QueryException::class);
137 137
         $this->expectExceptionMessage('Too many parameters: the query defines 1 parameters and you bound 2');
138 138
 
139
-        $q = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1');
139
+        $q = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1');
140 140
         $q->setParameter(1, 'jwage');
141 141
         $q->setParameter(2, 'jwage');
142 142
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $this->expectException(QueryException::class);
149 149
         $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0');
150 150
 
151
-        $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1')
151
+        $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1')
152 152
                   ->getSingleResult();
153 153
     }
154 154
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $this->expectException(QueryException::class);
158 158
 
159
-        $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?')
159
+        $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?')
160 160
                   ->setParameter(1, 'jwage')
161 161
                   ->getSingleResult();
162 162
     }
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
         $parameters->add(new Parameter(1, 'jwage'));
168 168
         $parameters->add(new Parameter(2, 'active'));
169 169
 
170
-        $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
170
+        $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2')
171 171
                   ->setParameters($parameters)
172 172
                   ->getResult();
173 173
 
174
-        $extractValue = function (Parameter $parameter) {
174
+        $extractValue = function(Parameter $parameter) {
175 175
             return $parameter->getValue();
176 176
         };
177 177
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     {
186 186
         $parameters = [1 => 'jwage', 2 => 'active'];
187 187
 
188
-        $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
188
+        $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2')
189 189
                   ->setParameters($parameters)
190 190
                   ->getResult();
191 191
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $this->em->clear();
216 216
         $articleId = $article1->id;
217 217
 
218
-        $query    = $this->em->createQuery('select a from ' . CmsArticle::class . ' a WHERE a.topic = ?1');
218
+        $query    = $this->em->createQuery('select a from '.CmsArticle::class.' a WHERE a.topic = ?1');
219 219
         $articles = $query->iterate(new ArrayCollection([new Parameter(1, 'Doctrine 2')]), Query::HYDRATE_ARRAY);
220 220
 
221 221
         $found = [];
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         $this->em->flush();
257 257
         $this->em->clear();
258 258
 
259
-        $query    = $this->em->createQuery('select a from ' . CmsArticle::class . ' a');
259
+        $query    = $this->em->createQuery('select a from '.CmsArticle::class.' a');
260 260
         $articles = $query->iterate();
261 261
 
262 262
         $iteratedCount = 0;
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
     {
379 379
         for ($i = 0; $i < 5; $i++) {
380 380
             $user           = new CmsUser;
381
-            $user->name     = 'Guilherme' . $i;
382
-            $user->username = 'gblanco' . $i;
381
+            $user->name     = 'Guilherme'.$i;
382
+            $user->username = 'gblanco'.$i;
383 383
             $user->status   = 'developer';
384 384
             $this->em->persist($user);
385 385
         }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
         $this->em->flush();
388 388
         $this->em->clear();
389 389
 
390
-        $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
390
+        $data = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u')
391 391
                   ->setFirstResult(1)
392 392
                   ->setMaxResults(2)
393 393
                   ->getResult();
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         self::assertEquals('gblanco1', $data[0]->username);
397 397
         self::assertEquals('gblanco2', $data[1]->username);
398 398
 
399
-        $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
399
+        $data = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u')
400 400
                   ->setFirstResult(3)
401 401
                   ->setMaxResults(2)
402 402
                   ->getResult();
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         self::assertEquals('gblanco3', $data[0]->username);
406 406
         self::assertEquals('gblanco4', $data[1]->username);
407 407
 
408
-        $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
408
+        $data = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u')
409 409
                   ->setFirstResult(3)
410 410
                   ->setMaxResults(2)
411 411
                   ->getScalarResult();
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
             $author = new CmsUser;
462 462
 
463 463
             $author->name     = 'anonymous';
464
-            $author->username = 'anon' . $i;
464
+            $author->username = 'anon'.$i;
465 465
             $author->status   = 'here';
466 466
             $article->user    = $author;
467 467
 
@@ -497,13 +497,13 @@  discard block
 block discarded – undo
497 497
         $this->em->flush();
498 498
         $this->em->clear();
499 499
 
500
-        $query       = $this->em->createQuery('select u from ' . CmsUser::class . " u where u.username = 'gblanco'");
500
+        $query       = $this->em->createQuery('select u from '.CmsUser::class." u where u.username = 'gblanco'");
501 501
         $fetchedUser = $query->getOneOrNullResult();
502 502
 
503 503
         self::assertInstanceOf(CmsUser::class, $fetchedUser);
504 504
         self::assertEquals('gblanco', $fetchedUser->username);
505 505
 
506
-        $query           = $this->em->createQuery('select u.username from ' . CmsUser::class . " u where u.username = 'gblanco'");
506
+        $query           = $this->em->createQuery('select u.username from '.CmsUser::class." u where u.username = 'gblanco'");
507 507
         $fetchedUsername = $query->getOneOrNullResult(Query::HYDRATE_SINGLE_SCALAR);
508 508
 
509 509
         self::assertEquals('gblanco', $fetchedUsername);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1300Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 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\ORM\Functional\Ticket;
6 6
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $this->em->flush();
41 41
 
42 42
         $query  = $this->em->createQuery('SELECT f, fl FROM Doctrine\Tests\ORM\Functional\Ticket\DDC1300Foo f JOIN f.fooLocaleRefFoo fl');
43
-        $result =  $query->getResult();
43
+        $result = $query->getResult();
44 44
 
45 45
         self::assertCount(1, $result);
46 46
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC633Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 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\ORM\Functional\Ticket;
6 6
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $this->em->flush();
66 66
         $this->em->clear();
67 67
 
68
-        $appointments = $this->em->createQuery('SELECT a FROM ' . __NAMESPACE__ . '\DDC633Appointment a')->getResult();
68
+        $appointments = $this->em->createQuery('SELECT a FROM '.__NAMESPACE__.'\DDC633Appointment a')->getResult();
69 69
 
70 70
         foreach ($appointments as $eagerAppointment) {
71 71
             self::assertInstanceOf(GhostObjectInterface::class, $eagerAppointment->patient);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -37,19 +37,19 @@  discard block
 block discarded – undo
37 37
 
38 38
         $dql = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author';
39 39
         $this->em->createQuery($dql)
40
-                  ->setParameter('author', $user)
41
-                  ->getResult();
40
+                    ->setParameter('author', $user)
41
+                    ->getResult();
42 42
 
43 43
         $dql = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author AND a.user = :author';
44 44
         $this->em->createQuery($dql)
45
-                  ->setParameter('author', $user)
46
-                  ->getResult();
45
+                    ->setParameter('author', $user)
46
+                    ->getResult();
47 47
 
48 48
         $dql      = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = :topic AND a.user = :author AND a.user = :author';
49 49
         $farticle = $this->em->createQuery($dql)
50
-                  ->setParameter('author', $user)
51
-                  ->setParameter('topic', 'This is John Galt speaking!')
52
-                  ->getSingleResult();
50
+                    ->setParameter('author', $user)
51
+                    ->setParameter('topic', 'This is John Galt speaking!')
52
+                    ->getSingleResult();
53 53
 
54 54
         self::assertSame($article, $farticle);
55 55
     }
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 
73 73
         $dql      = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = ?1 AND a.user = ?2 AND a.user = ?3';
74 74
         $farticle = $this->em->createQuery($dql)
75
-                  ->setParameter(1, 'This is John Galt speaking!')
76
-                  ->setParameter(2, $user)
77
-                  ->setParameter(3, $user)
78
-                  ->getSingleResult();
75
+                    ->setParameter(1, 'This is John Galt speaking!')
76
+                    ->setParameter(2, $user)
77
+                    ->setParameter(3, $user)
78
+                    ->getSingleResult();
79 79
 
80 80
         self::assertSame($article, $farticle);
81 81
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 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\ORM\Functional\Ticket;
6 6
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $this->em->flush();
35 35
         $this->em->clear();
36 36
 
37
-        $q      = $this->em->createQuery('select u,i from ' . __NAMESPACE__ . '\\DDC512Customer u left join u.item i');
37
+        $q      = $this->em->createQuery('select u,i from '.__NAMESPACE__.'\\DDC512Customer u left join u.item i');
38 38
         $result = $q->getResult();
39 39
 
40 40
         self::assertCount(2, $result);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC618Test.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     public function testIndexByJoin()
75 75
     {
76 76
         $dql    = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' .
77
-               'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
77
+                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
78 78
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
79 79
 
80 80
         self::assertCount(3, $result[0]->books); // Alice, Joe doesn't appear because he has no books.
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
     public function testIndexByToOneJoinSilentlyIgnored()
99 99
     {
100 100
         $dql    = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
101
-               'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
101
+                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
102 102
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
103 103
 
104 104
         self::assertInstanceOf(DDC618Book::class, $result[0]);
105 105
         self::assertInstanceOf(DDC618Author::class, $result[0]->author);
106 106
 
107 107
         $dql    = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
108
-               'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
108
+                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
109 109
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
110 110
 
111 111
         self::assertEquals('Alice', $result[0]['author']['name']);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function testCombineIndexBy()
118 118
     {
119 119
         $dql    = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' .
120
-               'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
120
+                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
121 121
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
122 122
 
123 123
         self::assertArrayHasKey(11, $result); // Alice
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 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\ORM\Functional\Ticket;
6 6
 
@@ -73,23 +73,23 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function testIndexByJoin()
75 75
     {
76
-        $dql    = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' .
76
+        $dql    = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A '.
77 77
                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
78 78
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
79 79
 
80 80
         self::assertCount(3, $result[0]->books); // Alice, Joe doesn't appear because he has no books.
81 81
         self::assertEquals('Alice', $result[0]->name);
82
-        self::assertTrue( isset($result[0]->books['In Wonderland'] ), 'Indexing by title should have books by title.');
83
-        self::assertTrue( isset($result[0]->books['Reloaded'] ), 'Indexing by title should have books by title.');
84
-        self::assertTrue( isset($result[0]->books['Test'] ), 'Indexing by title should have books by title.');
82
+        self::assertTrue(isset($result[0]->books['In Wonderland']), 'Indexing by title should have books by title.');
83
+        self::assertTrue(isset($result[0]->books['Reloaded']), 'Indexing by title should have books by title.');
84
+        self::assertTrue(isset($result[0]->books['Test']), 'Indexing by title should have books by title.');
85 85
 
86 86
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
87 87
 
88 88
         self::assertCount(3, $result[0]['books']); // Alice, Joe doesn't appear because he has no books.
89 89
         self::assertEquals('Alice', $result[0]['name']);
90
-        self::assertTrue( isset($result[0]['books']['In Wonderland'] ), 'Indexing by title should have books by title.');
91
-        self::assertTrue( isset($result[0]['books']['Reloaded'] ), 'Indexing by title should have books by title.');
92
-        self::assertTrue( isset($result[0]['books']['Test'] ), 'Indexing by title should have books by title.');
90
+        self::assertTrue(isset($result[0]['books']['In Wonderland']), 'Indexing by title should have books by title.');
91
+        self::assertTrue(isset($result[0]['books']['Reloaded']), 'Indexing by title should have books by title.');
92
+        self::assertTrue(isset($result[0]['books']['Test']), 'Indexing by title should have books by title.');
93 93
     }
94 94
 
95 95
     /**
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function testIndexByToOneJoinSilentlyIgnored()
99 99
     {
100
-        $dql    = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
100
+        $dql    = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '.
101 101
                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
102 102
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
103 103
 
104 104
         self::assertInstanceOf(DDC618Book::class, $result[0]);
105 105
         self::assertInstanceOf(DDC618Author::class, $result[0]->author);
106 106
 
107
-        $dql    = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
107
+        $dql    = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '.
108 108
                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
109 109
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
110 110
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function testCombineIndexBy()
118 118
     {
119
-        $dql    = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' .
119
+        $dql    = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id '.
120 120
                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
121 121
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
122 122
 
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 
125 125
         self::assertCount(3, $result[11]->books); // Alice, Joe doesn't appear because he has no books.
126 126
         self::assertEquals('Alice', $result[11]->name);
127
-        self::assertTrue( isset($result[11]->books['In Wonderland'] ), 'Indexing by title should have books by title.');
128
-        self::assertTrue( isset($result[11]->books['Reloaded'] ), 'Indexing by title should have books by title.');
129
-        self::assertTrue( isset($result[11]->books['Test'] ), 'Indexing by title should have books by title.');
127
+        self::assertTrue(isset($result[11]->books['In Wonderland']), 'Indexing by title should have books by title.');
128
+        self::assertTrue(isset($result[11]->books['Reloaded']), 'Indexing by title should have books by title.');
129
+        self::assertTrue(isset($result[11]->books['Test']), 'Indexing by title should have books by title.');
130 130
     }
131 131
 }
132 132
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 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\ORM\Functional\Ticket;
6 6
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $this->em->flush();
57 57
         $this->em->clear();
58 58
 
59
-        $dql     = 'SELECT a, b, ba, c FROM ' . __NAMESPACE__ . '\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c ORDER BY a.title';
59
+        $dql     = 'SELECT a, b, ba, c FROM '.__NAMESPACE__.'\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c ORDER BY a.title';
60 60
         $results = $this->em->createQuery($dql)->getResult();
61 61
 
62 62
         self::assertEquals($a1->id, $results[0]->id);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 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\ORM\Functional\Ticket;
6 6
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     {
20 20
         parent::setUp();
21 21
 
22
-        if (! Type::hasType('ddc2984_domain_user_id')) {
22
+        if ( ! Type::hasType('ddc2984_domain_user_id')) {
23 23
             Type::addType(
24 24
                 'ddc2984_domain_user_id',
25 25
                 DDC2984UserIdCustomDbalType::class
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $this->em->persist($user);
46 46
         $this->em->flush();
47 47
 
48
-        $repository = $this->em->getRepository(__NAMESPACE__ . '\DDC2984User');
48
+        $repository = $this->em->getRepository(__NAMESPACE__.'\DDC2984User');
49 49
 
50 50
         $sameUser = $repository->find(new DDC2984DomainUserId('unique_id_within_a_vo'));
51 51
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             return $value;
192 192
         }
193 193
 
194
-        if (! $value instanceof DDC2984DomainUserId) {
194
+        if ( ! $value instanceof DDC2984DomainUserId) {
195 195
             throw ConversionException::conversionFailed($value, $this->getName());
196 196
         }
197 197
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1250Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 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\ORM\Functional\Ticket;
6 6
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $this->em->flush();
39 39
         $this->em->clear();
40 40
 
41
-        $history = $this->em->createQuery('SELECT h FROM ' . __NAMESPACE__ . '\\DDC1250ClientHistory h WHERE h.id = ?1')
41
+        $history = $this->em->createQuery('SELECT h FROM '.__NAMESPACE__.'\\DDC1250ClientHistory h WHERE h.id = ?1')
42 42
                   ->setParameter(1, $c2->id)->getSingleResult();
43 43
 
44 44
         self::assertInstanceOf(DDC1250ClientHistory::class, $history);
Please login to merge, or discard this patch.