Passed
Pull Request — master (#6887)
by Grégoire
12:33
created
tests/Doctrine/Tests/ORM/Functional/QueryTest.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0');
149 149
 
150 150
         $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1')
151
-                  ->getSingleResult();
151
+                    ->getSingleResult();
152 152
     }
153 153
 
154 154
     public function testInvalidInputParameterThrowsException()
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
         $this->expectException(QueryException::class);
157 157
 
158 158
         $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?')
159
-                  ->setParameter(1, 'jwage')
160
-                  ->getSingleResult();
159
+                    ->setParameter(1, 'jwage')
160
+                    ->getSingleResult();
161 161
     }
162 162
 
163 163
     public function testSetParameters()
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
         $parameters->add(new Parameter(2, 'active'));
168 168
 
169 169
         $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
170
-                  ->setParameters($parameters)
171
-                  ->getResult();
170
+                    ->setParameters($parameters)
171
+                    ->getResult();
172 172
 
173 173
         $extractValue = function (Parameter $parameter) {
174 174
             return $parameter->getValue();
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
         $parameters = [1 => 'jwage', 2 => 'active'];
186 186
 
187 187
         $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
188
-                  ->setParameters($parameters)
189
-                  ->getResult();
188
+                    ->setParameters($parameters)
189
+                    ->getResult();
190 190
 
191 191
         self::assertSame(
192 192
             array_values($parameters),
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     public function testGetSingleResultThrowsExceptionOnNoResult()
331 331
     {
332 332
         $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a")
333
-             ->getSingleResult();
333
+                ->getSingleResult();
334 334
     }
335 335
 
336 336
     /**
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
     public function testGetSingleScalarResultThrowsExceptionOnNoResult()
340 340
     {
341 341
         $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a")
342
-             ->getSingleScalarResult();
342
+                ->getSingleScalarResult();
343 343
     }
344 344
 
345 345
     /**
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         $this->_em->clear();
371 371
 
372 372
         $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a")
373
-             ->getSingleScalarResult();
373
+                ->getSingleScalarResult();
374 374
     }
375 375
 
376 376
     public function testModifiedLimitQuery()
@@ -387,27 +387,27 @@  discard block
 block discarded – undo
387 387
         $this->_em->clear();
388 388
 
389 389
         $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
390
-                  ->setFirstResult(1)
391
-                  ->setMaxResults(2)
392
-                  ->getResult();
390
+                    ->setFirstResult(1)
391
+                    ->setMaxResults(2)
392
+                    ->getResult();
393 393
 
394 394
         $this->assertEquals(2, count($data));
395 395
         $this->assertEquals('gblanco1', $data[0]->username);
396 396
         $this->assertEquals('gblanco2', $data[1]->username);
397 397
 
398 398
         $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
399
-                  ->setFirstResult(3)
400
-                  ->setMaxResults(2)
401
-                  ->getResult();
399
+                    ->setFirstResult(3)
400
+                    ->setMaxResults(2)
401
+                    ->getResult();
402 402
 
403 403
         $this->assertEquals(2, count($data));
404 404
         $this->assertEquals('gblanco3', $data[0]->username);
405 405
         $this->assertEquals('gblanco4', $data[1]->username);
406 406
 
407 407
         $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
408
-                  ->setFirstResult(3)
409
-                  ->setMaxResults(2)
410
-                  ->getScalarResult();
408
+                    ->setFirstResult(3)
409
+                    ->setMaxResults(2)
410
+                    ->getScalarResult();
411 411
     }
412 412
 
413 413
     public function testSupportsQueriesWithEntityNamespaces()
@@ -476,8 +476,8 @@  discard block
 block discarded – undo
476 476
         $this->_em->clear();
477 477
 
478 478
         $articles = $this->_em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a')
479
-                         ->setFetchMode(CmsArticle::class, 'user', ClassMetadata::FETCH_EAGER)
480
-                         ->getResult();
479
+                            ->setFetchMode(CmsArticle::class, 'user', ClassMetadata::FETCH_EAGER)
480
+                            ->getResult();
481 481
 
482 482
         $this->assertEquals(10, count($articles));
483 483
         foreach ($articles AS $article) {
@@ -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   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -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
         $this->assertEquals(1, count($users));
100 100
         $this->assertInstanceOf(CmsUser::class, $users[0]);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->_em->flush();
114 114
         $this->_em->clear();
115 115
 
116
-        $q = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.username = ?0');
116
+        $q = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.username = ?0');
117 117
         $q->setParameter(0, 'jwage');
118 118
         $user = $q->getSingleResult();
119 119
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $this->expectException(QueryException::class);
126 126
         $this->expectExceptionMessage('Invalid parameter: token 2 is not defined in the query.');
127 127
 
128
-        $q = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1');
128
+        $q = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1');
129 129
         $q->setParameter(2, 'jwage');
130 130
         $user = $q->getSingleResult();
131 131
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         $this->expectException(QueryException::class);
136 136
         $this->expectExceptionMessage('Too many parameters: the query defines 1 parameters and you bound 2');
137 137
 
138
-        $q = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1');
138
+        $q = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1');
139 139
         $q->setParameter(1, 'jwage');
140 140
         $q->setParameter(2, 'jwage');
141 141
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $this->expectException(QueryException::class);
148 148
         $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0');
149 149
 
150
-        $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1')
150
+        $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1')
151 151
                   ->getSingleResult();
152 152
     }
153 153
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     {
156 156
         $this->expectException(QueryException::class);
157 157
 
158
-        $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?')
158
+        $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?')
159 159
                   ->setParameter(1, 'jwage')
160 160
                   ->getSingleResult();
161 161
     }
@@ -166,11 +166,11 @@  discard block
 block discarded – undo
166 166
         $parameters->add(new Parameter(1, 'jwage'));
167 167
         $parameters->add(new Parameter(2, 'active'));
168 168
 
169
-        $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
169
+        $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2')
170 170
                   ->setParameters($parameters)
171 171
                   ->getResult();
172 172
 
173
-        $extractValue = function (Parameter $parameter) {
173
+        $extractValue = function(Parameter $parameter) {
174 174
             return $parameter->getValue();
175 175
         };
176 176
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         $parameters = [1 => 'jwage', 2 => 'active'];
186 186
 
187
-        $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
187
+        $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2')
188 188
                   ->setParameters($parameters)
189 189
                   ->getResult();
190 190
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         $this->_em->clear();
215 215
         $articleId = $article1->id;
216 216
 
217
-        $query = $this->_em->createQuery('select a from ' . CmsArticle::class . ' a WHERE a.topic = ?1');
217
+        $query = $this->_em->createQuery('select a from '.CmsArticle::class.' a WHERE a.topic = ?1');
218 218
         $articles = $query->iterate(new ArrayCollection([new Parameter(1, 'Doctrine 2')]), Query::HYDRATE_ARRAY);
219 219
 
220 220
         $found = [];
@@ -255,19 +255,19 @@  discard block
 block discarded – undo
255 255
         $this->_em->flush();
256 256
         $this->_em->clear();
257 257
 
258
-        $query = $this->_em->createQuery('select a from ' . CmsArticle::class . ' a');
258
+        $query = $this->_em->createQuery('select a from '.CmsArticle::class.' a');
259 259
         $articles = $query->iterate();
260 260
 
261 261
         $iteratedCount = 0;
262 262
         $topics = [];
263 263
 
264
-        foreach($articles AS $row) {
264
+        foreach ($articles AS $row) {
265 265
             $article = $row[0];
266 266
             $topics[] = $article->topic;
267 267
 
268 268
             $identityMap = $this->_em->getUnitOfWork()->getIdentityMap();
269 269
             $identityMapCount = count($identityMap[CmsArticle::class]);
270
-            $this->assertTrue($identityMapCount>$iteratedCount);
270
+            $this->assertTrue($identityMapCount > $iteratedCount);
271 271
 
272 272
             $iteratedCount++;
273 273
         }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
         $iteratedCount = 0;
302 302
         $topics = [];
303
-        foreach($articles AS $row) {
303
+        foreach ($articles AS $row) {
304 304
             $article  = $row[0];
305 305
             $topics[] = $article->topic;
306 306
 
@@ -377,8 +377,8 @@  discard block
 block discarded – undo
377 377
     {
378 378
         for ($i = 0; $i < 5; $i++) {
379 379
             $user = new CmsUser;
380
-            $user->name = 'Guilherme' . $i;
381
-            $user->username = 'gblanco' . $i;
380
+            $user->name = 'Guilherme'.$i;
381
+            $user->username = 'gblanco'.$i;
382 382
             $user->status = 'developer';
383 383
             $this->_em->persist($user);
384 384
         }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         $this->_em->flush();
387 387
         $this->_em->clear();
388 388
 
389
-        $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
389
+        $data = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u')
390 390
                   ->setFirstResult(1)
391 391
                   ->setMaxResults(2)
392 392
                   ->getResult();
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
         $this->assertEquals('gblanco1', $data[0]->username);
396 396
         $this->assertEquals('gblanco2', $data[1]->username);
397 397
 
398
-        $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
398
+        $data = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u')
399 399
                   ->setFirstResult(3)
400 400
                   ->setMaxResults(2)
401 401
                   ->getResult();
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
         $this->assertEquals('gblanco3', $data[0]->username);
405 405
         $this->assertEquals('gblanco4', $data[1]->username);
406 406
 
407
-        $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
407
+        $data = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u')
408 408
                   ->setFirstResult(3)
409 409
                   ->setMaxResults(2)
410 410
                   ->getScalarResult();
@@ -498,13 +498,13 @@  discard block
 block discarded – undo
498 498
         $this->_em->flush();
499 499
         $this->_em->clear();
500 500
 
501
-        $query = $this->_em->createQuery("select u from " . CmsUser::class . " u where u.username = 'gblanco'");
501
+        $query = $this->_em->createQuery("select u from ".CmsUser::class." u where u.username = 'gblanco'");
502 502
 
503 503
         $fetchedUser = $query->getOneOrNullResult();
504 504
         $this->assertInstanceOf(CmsUser::class, $fetchedUser);
505 505
         $this->assertEquals('gblanco', $fetchedUser->username);
506 506
 
507
-        $query = $this->_em->createQuery("select u.username from " . CmsUser::class . " u where u.username = 'gblanco'");
507
+        $query = $this->_em->createQuery("select u.username from ".CmsUser::class." u where u.username = 'gblanco'");
508 508
         $fetchedUsername = $query->getOneOrNullResult(Query::HYDRATE_SINGLE_SCALAR);
509 509
         $this->assertEquals('gblanco', $fetchedUsername);
510 510
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DefaultValuesTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public $address;
112 112
 
113
-    public function getId() {return $this->id;}
113
+    public function getId() {return $this->id; }
114 114
 }
115 115
 
116 116
 /**
@@ -152,5 +152,5 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public $user;
154 154
 
155
-    public function getUser() {return $this->user;}
155
+    public function getUser() {return $this->user; }
156 156
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTestCase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $driver = new DatabaseDriver($sm);
41 41
 
42 42
         foreach ($driver->getAllClassNames() as $className) {
43
-            if (!in_array(strtolower($className), $classNames)) {
43
+            if ( ! in_array(strtolower($className), $classNames)) {
44 44
                 continue;
45 45
             }
46 46
             $class = new ClassMetadataInfo($className);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         }
50 50
 
51 51
         if (count($metadatas) != count($classNames)) {
52
-            $this->fail("Have not found all classes matching the names '" . implode(", ", $classNames) . "' only tables " . implode(", ", array_keys($metadatas)));
52
+            $this->fail("Have not found all classes matching the names '".implode(", ", $classNames)."' only tables ".implode(", ", array_keys($metadatas)));
53 53
         }
54 54
         return $metadatas;
55 55
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaValidatorTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     private function registerType(string $className)
36 36
     {
37
-        $type = constant($className . '::NAME');
37
+        $type = constant($className.'::NAME');
38 38
 
39 39
         if (DBALType::hasType($type)) {
40 40
             DBALType::overrideType($type, $className);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         foreach ($classes as $class) {
71 71
             $ce = $validator->validateClass($class);
72 72
 
73
-            $this->assertEmpty($ce, "Invalid Modelset: " . $modelSet . " class " . $class->name . ": ". implode("\n", $ce));
73
+            $this->assertEmpty($ce, "Invalid Modelset: ".$modelSet." class ".$class->name.": ".implode("\n", $ce));
74 74
         }
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
         $eventManager->addEventListener([Events::postLoad], $listener);
233 233
 
234 234
         $this->_em->find(CmsUser::class, $this->userId);
235
-        $this->assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class . ' should be handled once!');
236
-        $this->assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class . ' should be handled once!');
235
+        $this->assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class.' should be handled once!');
236
+        $this->assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class.' should be handled once!');
237 237
     }
238 238
 
239 239
     private function loadFixture()
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
     {
310 310
         $object = $event->getObject();
311 311
         $class = ClassUtils::getClass($object);
312
-        if (!isset($this->firedByClasses[$class])) {
312
+        if ( ! isset($this->firedByClasses[$class])) {
313 313
             $this->firedByClasses[$class] = 1;
314 314
         } else {
315 315
             $this->firedByClasses[$class]++;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/HydrationCacheTest.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,37 +34,37 @@
 block discarded – undo
34 34
         $dql = "SELECT u FROM Doctrine\Tests\Models\Cms\CmsUser u";
35 35
 
36 36
         $users = $this->_em->createQuery($dql)
37
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
38
-                      ->getResult();
37
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
38
+                        ->getResult();
39 39
 
40 40
         $c = $this->getCurrentQueryCount();
41 41
         $users = $this->_em->createQuery($dql)
42
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
43
-                      ->getResult();
42
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
43
+                        ->getResult();
44 44
 
45 45
         $this->assertEquals($c, $this->getCurrentQueryCount(), "Should not execute query. Its cached!");
46 46
 
47 47
         $users = $this->_em->createQuery($dql)
48
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
49
-                      ->getArrayResult();
48
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
49
+                        ->getArrayResult();
50 50
 
51 51
         $this->assertEquals($c + 1, $this->getCurrentQueryCount(), "Hydration is part of cache key.");
52 52
 
53 53
         $users = $this->_em->createQuery($dql)
54
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
55
-                      ->getArrayResult();
54
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
55
+                        ->getArrayResult();
56 56
 
57 57
         $this->assertEquals($c + 1, $this->getCurrentQueryCount(), "Hydration now cached");
58 58
 
59 59
         $users = $this->_em->createQuery($dql)
60
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
61
-                      ->getArrayResult();
60
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
61
+                        ->getArrayResult();
62 62
 
63 63
         $this->assertTrue($cache->contains('cachekey'), 'Explicit cache key');
64 64
 
65 65
         $users = $this->_em->createQuery($dql)
66
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
67
-                      ->getArrayResult();
66
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
67
+                        ->getArrayResult();
68 68
         $this->assertEquals($c + 2, $this->getCurrentQueryCount(), "Hydration now cached");
69 69
     }
70 70
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheQueryCacheTest.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         $this->_em->clear();
51 51
 
52
-        $result2  = $this->_em->createQuery($dql)
52
+        $result2 = $this->_em->createQuery($dql)
53 53
             ->setCacheable(true)
54 54
             ->getResult();
55 55
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
         $this->_em->clear();
254 254
 
255
-        $result2  = $this->_em->createQuery($dql)
255
+        $result2 = $this->_em->createQuery($dql)
256 256
             ->setCacheable(true)
257 257
             ->getResult();
258 258
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
         $this->_em->clear();
346 346
 
347
-        $result2  = $this->_em->createQuery($dql)
347
+        $result2 = $this->_em->createQuery($dql)
348 348
             ->setCacheable(true)
349 349
             ->getResult();
350 350
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 
393 393
         $this->_em->clear();
394 394
 
395
-        $result2  = $this->_em->createQuery($dql)->setCacheable(true)
395
+        $result2 = $this->_em->createQuery($dql)->setCacheable(true)
396 396
                 ->setParameter('name', $name)
397 397
                 ->getResult();
398 398
 
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
         $result1    = $this->_em->createQuery($dql)->setCacheable(true)->getResult();
421 421
 
422 422
         $this->assertCount(2, $result1);
423
-        $this->assertEquals($queryCount + 1 , $this->getCurrentQueryCount());
423
+        $this->assertEquals($queryCount + 1, $this->getCurrentQueryCount());
424 424
         $this->assertEquals($this->countries[0]->getId(), $result1[0]->getId());
425 425
         $this->assertEquals($this->countries[1]->getId(), $result1[1]->getId());
426 426
         $this->assertEquals($this->countries[0]->getName(), $result1[0]->getName());
@@ -436,11 +436,11 @@  discard block
 block discarded – undo
436 436
 
437 437
         $this->_em->clear();
438 438
 
439
-        $result2  = $this->_em->createQuery($dql)
439
+        $result2 = $this->_em->createQuery($dql)
440 440
             ->setCacheable(true)
441 441
             ->getResult();
442 442
 
443
-        $this->assertEquals($queryCount + 2 , $this->getCurrentQueryCount());
443
+        $this->assertEquals($queryCount + 2, $this->getCurrentQueryCount());
444 444
         $this->assertCount(2, $result2);
445 445
 
446 446
         $this->assertEquals(5, $this->secondLevelCacheLogger->getPutCount());
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
         $this->assertEquals($result1[0]->getName(), $result2[0]->getName());
458 458
         $this->assertEquals($result1[1]->getName(), $result2[1]->getName());
459 459
 
460
-        $this->assertEquals($queryCount + 2 , $this->getCurrentQueryCount());
460
+        $this->assertEquals($queryCount + 2, $this->getCurrentQueryCount());
461 461
     }
462 462
 
463 463
     public function testBasicQueryFetchJoinsOneToMany()
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 
499 499
         $this->_em->clear();
500 500
 
501
-        $result2  = $this->_em->createQuery($dql)
501
+        $result2 = $this->_em->createQuery($dql)
502 502
                 ->setCacheable(true)
503 503
                 ->getResult();
504 504
 
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
         $this->_em->clear();
565 565
         $this->secondLevelCacheLogger->clearStats();
566 566
 
567
-        $result2  = $this->_em->createQuery($dql)
567
+        $result2 = $this->_em->createQuery($dql)
568 568
                 ->setCacheable(true)
569 569
                 ->getResult();
570 570
 
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 
625 625
         $this->cache->evictEntityRegion(State::class);
626 626
 
627
-        $result2  = $this->_em->createQuery($dql)
627
+        $result2 = $this->_em->createQuery($dql)
628 628
                 ->setCacheable(true)
629 629
                 ->getResult();
630 630
 
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 
668 668
         $this->cache->evictEntityRegion(City::class);
669 669
 
670
-        $result2  = $this->_em->createQuery($dql)
670
+        $result2 = $this->_em->createQuery($dql)
671 671
                 ->setCacheable(true)
672 672
                 ->getResult();
673 673
 
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 
719 719
         $this->_em->clear();
720 720
 
721
-        $result2  = $this->_em->createNativeQuery($sql, $rsm)
721
+        $result2 = $this->_em->createNativeQuery($sql, $rsm)
722 722
             ->setCacheable(true)
723 723
             ->getResult();
724 724
 
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
 
774 774
         $this->_em->clear();
775 775
 
776
-        $result2  = $this->_em->createQuery($dql)
776
+        $result2 = $this->_em->createQuery($dql)
777 777
             ->setCacheable(true)
778 778
             ->setFirstResult(2)
779 779
             ->setMaxResults(1)
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
 
786 786
         $this->_em->clear();
787 787
 
788
-        $result3  = $this->_em->createQuery($dql)
788
+        $result3 = $this->_em->createQuery($dql)
789 789
             ->setCacheable(true)
790 790
             ->getResult();
791 791
 
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
         $this->secondLevelCacheLogger->clearStats();
803 803
         $this->_em->clear();
804 804
 
805
-        $getHash = function(AbstractQuery $query){
805
+        $getHash = function(AbstractQuery $query) {
806 806
             $method = new \ReflectionMethod($query, 'getHash');
807 807
             $method->setAccessible(true);
808 808
 
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
             ->getRegion()
836 836
             ->put($key, $entry);
837 837
 
838
-        $result2  = $this->_em->createQuery($dql)
838
+        $result2 = $this->_em->createQuery($dql)
839 839
             ->setCacheable(true)
840 840
             ->setLifetime(3600)
841 841
             ->getResult();
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -160,9 +160,9 @@
 block discarded – undo
160 160
      */
161 161
     private $other2;
162 162
 
163
-    public function getId() {return $this->id;}
164
-    public function setOther1($other1) {$this->other1 = $other1;}
165
-    public function getOther1() {return $this->other1;}
166
-    public function setOther2($other2) {$this->other2 = $other2;}
167
-    public function getOther2() {return $this->other2;}
163
+    public function getId() {return $this->id; }
164
+    public function setOther1($other1) {$this->other1 = $other1; }
165
+    public function getOther1() {return $this->other1; }
166
+    public function setOther2($other2) {$this->other2 = $other2; }
167
+    public function getOther2() {return $this->other2; }
168 168
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/CustomFunctionsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 use Doctrine\Tests\Models\CMS\CmsUser;
12 12
 use Doctrine\Tests\OrmFunctionalTestCase;
13 13
 
14
-require_once __DIR__ . '/../../TestInit.php';
14
+require_once __DIR__.'/../../TestInit.php';
15 15
 
16 16
 class CustomFunctionsTest extends OrmFunctionalTestCase
17 17
 {
Please login to merge, or discard this patch.