@@ -103,8 +103,8 @@ |
||
103 | 103 | $this->em = $this->getTestEntityManager(); |
104 | 104 | $this->region = $this->createRegion(); |
105 | 105 | $this->entityPersister = $this->getMockBuilder(EntityPersister::class) |
106 | - ->setMethods($this->entityPersisterMockMethods) |
|
107 | - ->getMock(); |
|
106 | + ->setMethods($this->entityPersisterMockMethods) |
|
107 | + ->getMock(); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -104,8 +104,8 @@ |
||
104 | 104 | $routeId = $this->createPersistedRouteWithLegs(); |
105 | 105 | |
106 | 106 | $route = $this->em->createQuery('SELECT r, l FROM Doctrine\Tests\Models\Routing\RoutingRoute r JOIN r.legs l WHERE r.id = ?1') |
107 | - ->setParameter(1, $routeId) |
|
108 | - ->getSingleResult(); |
|
107 | + ->setParameter(1, $routeId) |
|
108 | + ->getSingleResult(); |
|
109 | 109 | |
110 | 110 | self::assertCount(2, $route->legs); |
111 | 111 | self::assertEquals('Berlin', $route->legs[0]->fromLocation->getName()); |
@@ -361,9 +361,9 @@ discard block |
||
361 | 361 | self::assertCount(2, $user->phonenumbers); |
362 | 362 | $dql = 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1'; |
363 | 363 | $user = $this->em->createQuery($dql) |
364 | - ->setParameter(1, $user->id) |
|
365 | - ->setHint(Query::HINT_REFRESH, true) |
|
366 | - ->getSingleResult(); |
|
364 | + ->setParameter(1, $user->id) |
|
365 | + ->setHint(Query::HINT_REFRESH, true) |
|
366 | + ->getSingleResult(); |
|
367 | 367 | |
368 | 368 | self::assertCount(1, $user->phonenumbers); |
369 | 369 | } |
@@ -398,8 +398,8 @@ discard block |
||
398 | 398 | |
399 | 399 | $dql = 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1'; |
400 | 400 | $user = $this->em->createQuery($dql) |
401 | - ->setParameter(1, $userId) |
|
402 | - ->getSingleResult(); |
|
401 | + ->setParameter(1, $userId) |
|
402 | + ->getSingleResult(); |
|
403 | 403 | |
404 | 404 | self::assertCount(1, $user->phonenumbers); |
405 | 405 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $user->username = 'gblanco'; |
187 | 187 | $user->status = 'developer'; |
188 | 188 | |
189 | - for ($i=0; $i<3; ++$i) { |
|
189 | + for ($i = 0; $i < 3; ++$i) { |
|
190 | 190 | $phone = new CmsPhonenumber(); |
191 | 191 | $phone->phonenumber = 100 + $i; |
192 | 192 | $user->addPhonenumber($phone); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $user->username = 'gblanco'; |
415 | 415 | $user->status = 'developer'; |
416 | 416 | |
417 | - for ($i=0; $i<3; ++$i) { |
|
417 | + for ($i = 0; $i < 3; ++$i) { |
|
418 | 418 | $phone = new CmsPhonenumber(); |
419 | 419 | $phone->phonenumber = 100 + $i; |
420 | 420 | $user->addPhonenumber($phone); |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $user->username = 'gblanco'; |
455 | 455 | $user->status = 'developer'; |
456 | 456 | |
457 | - for ($i=0; $i<3; ++$i) { |
|
457 | + for ($i = 0; $i < 3; ++$i) { |
|
458 | 458 | $phone = new CmsPhonenumber(); |
459 | 459 | $phone->phonenumber = 100 + $i; |
460 | 460 | $user->addPhonenumber($phone); |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | $user->username = 'gblanco'; |
496 | 496 | $user->status = 'developer'; |
497 | 497 | |
498 | - for ($i=0; $i<3; ++$i) { |
|
498 | + for ($i = 0; $i < 3; ++$i) { |
|
499 | 499 | $phone = new CmsPhonenumber(); |
500 | 500 | $phone->phonenumber = 100 + $i; |
501 | 501 | $user->addPhonenumber($phone); |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | |
643 | 643 | $user->setAddress($address); |
644 | 644 | |
645 | - $this->em->transactional(static function ($em) use ($user) { |
|
645 | + $this->em->transactional(static function($em) use ($user) { |
|
646 | 646 | $em->persist($user); |
647 | 647 | }); |
648 | 648 | $this->em->clear(); |
@@ -683,12 +683,12 @@ discard block |
||
683 | 683 | $this->em->persist($user); |
684 | 684 | $this->em->flush(); |
685 | 685 | |
686 | - self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id)); |
|
686 | + self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id)); |
|
687 | 687 | |
688 | 688 | $address->user = null; |
689 | 689 | $this->em->flush(); |
690 | 690 | |
691 | - self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id)); |
|
691 | + self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id)); |
|
692 | 692 | } |
693 | 693 | |
694 | 694 | /** |
@@ -882,7 +882,7 @@ discard block |
||
882 | 882 | |
883 | 883 | self::assertInstanceOf(GhostObjectInterface::class, $fetchedUser, 'It IS a proxy, ...'); |
884 | 884 | self::assertTrue($fetchedUser->isProxyInitialized(), '...but its initialized!'); |
885 | - self::assertEquals($qc+2, $this->getCurrentQueryCount()); |
|
885 | + self::assertEquals($qc + 2, $this->getCurrentQueryCount()); |
|
886 | 886 | } |
887 | 887 | |
888 | 888 | /** |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | |
944 | 944 | $this->expectException(ORMInvalidArgumentException::class); |
945 | 945 | $this->expectExceptionMessage( |
946 | - 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' . |
|
946 | + 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field '. |
|
947 | 947 | '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.' |
948 | 948 | ); |
949 | 949 |
@@ -223,13 +223,13 @@ |
||
223 | 223 | |
224 | 224 | $q = $this->em->createNativeQuery('SELECT id, name, status, phonenumber FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username = ?', $rsm); |
225 | 225 | $q2 = $q->setSQL('foo') |
226 | - ->setResultSetMapping($rsm) |
|
227 | - ->expireResultCache(true) |
|
228 | - ->setHint('foo', 'bar') |
|
229 | - ->setParameter(1, 'foo') |
|
230 | - ->setParameters($parameters) |
|
231 | - ->setResultCacheDriver(null) |
|
232 | - ->setResultCacheLifetime(3500); |
|
226 | + ->setResultSetMapping($rsm) |
|
227 | + ->expireResultCache(true) |
|
228 | + ->setHint('foo', 'bar') |
|
229 | + ->setParameter(1, 'foo') |
|
230 | + ->setParameters($parameters) |
|
231 | + ->setResultCacheDriver(null) |
|
232 | + ->setResultCacheLifetime(3500); |
|
233 | 233 | |
234 | 234 | self::assertSame($q, $q2); |
235 | 235 | } |
@@ -36,37 +36,37 @@ |
||
36 | 36 | $dql = 'SELECT u FROM Doctrine\Tests\Models\Cms\CmsUser u'; |
37 | 37 | |
38 | 38 | $users = $this->em->createQuery($dql) |
39 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
40 | - ->getResult(); |
|
39 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
40 | + ->getResult(); |
|
41 | 41 | |
42 | 42 | $c = $this->getCurrentQueryCount(); |
43 | 43 | $users = $this->em->createQuery($dql) |
44 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
45 | - ->getResult(); |
|
44 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
45 | + ->getResult(); |
|
46 | 46 | |
47 | 47 | self::assertEquals($c, $this->getCurrentQueryCount(), 'Should not execute query. Its cached!'); |
48 | 48 | |
49 | 49 | $users = $this->em->createQuery($dql) |
50 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
51 | - ->getArrayResult(); |
|
50 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
51 | + ->getArrayResult(); |
|
52 | 52 | |
53 | 53 | self::assertEquals($c + 1, $this->getCurrentQueryCount(), 'Hydration is part of cache key.'); |
54 | 54 | |
55 | 55 | $users = $this->em->createQuery($dql) |
56 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
57 | - ->getArrayResult(); |
|
56 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
57 | + ->getArrayResult(); |
|
58 | 58 | |
59 | 59 | self::assertEquals($c + 1, $this->getCurrentQueryCount(), 'Hydration now cached'); |
60 | 60 | |
61 | 61 | $users = $this->em->createQuery($dql) |
62 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
63 | - ->getArrayResult(); |
|
62 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
63 | + ->getArrayResult(); |
|
64 | 64 | |
65 | 65 | self::assertTrue($cache->contains('cachekey'), 'Explicit cache key'); |
66 | 66 | |
67 | 67 | $users = $this->em->createQuery($dql) |
68 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
69 | - ->getArrayResult(); |
|
68 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
69 | + ->getArrayResult(); |
|
70 | 70 | self::assertEquals($c + 2, $this->getCurrentQueryCount(), 'Hydration now cached'); |
71 | 71 | } |
72 | 72 |
@@ -37,19 +37,19 @@ discard block |
||
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 |
||
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 | } |
@@ -150,9 +150,9 @@ discard block |
||
150 | 150 | |
151 | 151 | $dql = 'DELETE Doctrine\Tests\Models\DDC117\DDC117Reference r WHERE r.source = ?1 AND r.target = ?2'; |
152 | 152 | $this->em->createQuery($dql) |
153 | - ->setParameter(1, $this->article1->id()) |
|
154 | - ->setParameter(2, $this->article2->id()) |
|
155 | - ->execute(); |
|
153 | + ->setParameter(1, $this->article1->id()) |
|
154 | + ->setParameter(2, $this->article2->id()) |
|
155 | + ->execute(); |
|
156 | 156 | |
157 | 157 | self::assertNull($this->em->find(DDC117Reference::class, $idCriteria)); |
158 | 158 | } |
@@ -202,9 +202,9 @@ discard block |
||
202 | 202 | |
203 | 203 | $dql = 'SELECT t, a FROM Doctrine\Tests\Models\DDC117\DDC117Translation t JOIN t.article a WHERE t.article = ?1 AND t.language = ?2'; |
204 | 204 | $dqlTrans = $this->em->createQuery($dql) |
205 | - ->setParameter(1, $this->article1->id()) |
|
206 | - ->setParameter(2, 'en') |
|
207 | - ->getSingleResult(); |
|
205 | + ->setParameter(1, $this->article1->id()) |
|
206 | + ->setParameter(2, 'en') |
|
207 | + ->getSingleResult(); |
|
208 | 208 | |
209 | 209 | self::assertInstanceOf(DDC117Translation::class, $this->translation); |
210 | 210 | } |
@@ -369,11 +369,11 @@ discard block |
||
369 | 369 | $this->em->clear(); |
370 | 370 | |
371 | 371 | $dql = 'SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t ' . |
372 | - 'JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2'; |
|
372 | + 'JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2'; |
|
373 | 373 | $trans = $this->em->createQuery($dql) |
374 | - ->setParameter(1, $this->translation->getArticleId()) |
|
375 | - ->setParameter(2, $this->translation->getLanguage()) |
|
376 | - ->getSingleResult(); |
|
374 | + ->setParameter(1, $this->translation->getArticleId()) |
|
375 | + ->setParameter(2, $this->translation->getLanguage()) |
|
376 | + ->getSingleResult(); |
|
377 | 377 | |
378 | 378 | self::assertInstanceOf(DDC117Translation::class, $trans); |
379 | 379 | self::assertContainsOnly(DDC117Editor::class, $trans->reviewedByEditors); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | $this->em->clear(); |
72 | 72 | |
73 | - $dql = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE r.source = ?1'; |
|
73 | + $dql = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE r.source = ?1'; |
|
74 | 74 | $dqlRef = $this->em->createQuery($dql)->setParameter(1, 1)->getSingleResult(); |
75 | 75 | |
76 | 76 | self::assertInstanceOf(DDC117Reference::class, $mapRef); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | $this->em->clear(); |
82 | 82 | |
83 | - $dql = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE s.title = ?1'; |
|
83 | + $dql = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE s.title = ?1'; |
|
84 | 84 | $dqlRef = $this->em->createQuery($dql)->setParameter(1, 'Foo')->getSingleResult(); |
85 | 85 | |
86 | 86 | self::assertInstanceOf(DDC117Reference::class, $dqlRef); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | self::assertInstanceOf(DDC117Article::class, $dqlRef->source()); |
89 | 89 | self::assertSame($dqlRef, $this->em->find(DDC117Reference::class, $idCriteria)); |
90 | 90 | |
91 | - $dql = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE s.title = ?1'; |
|
91 | + $dql = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE s.title = ?1'; |
|
92 | 92 | $dqlRef = $this->em->createQuery($dql)->setParameter(1, 'Foo')->getSingleResult(); |
93 | 93 | |
94 | 94 | $this->em->contains($dqlRef); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | */ |
273 | 273 | public function testOneToOneCascadePersist() : void |
274 | 274 | { |
275 | - if (! $this->em->getConnection()->getDatabasePlatform()->prefersSequences()) { |
|
275 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->prefersSequences()) { |
|
276 | 276 | $this->markTestSkipped('Test only works with databases that prefer sequences as ID strategy.'); |
277 | 277 | } |
278 | 278 | |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | |
373 | 373 | $this->em->clear(); |
374 | 374 | |
375 | - $dql = 'SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t ' . |
|
375 | + $dql = 'SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t '. |
|
376 | 376 | 'JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2'; |
377 | 377 | $trans = $this->em->createQuery($dql) |
378 | 378 | ->setParameter(1, $this->translation->getArticleId()) |
@@ -135,13 +135,13 @@ |
||
135 | 135 | $cmf = new ClassMetadataFactory(); |
136 | 136 | $driver = $this->createMock(MappingDriver::class); |
137 | 137 | $driver->expects($this->at(0)) |
138 | - ->method('isTransient') |
|
139 | - ->with($this->equalTo(CmsUser::class)) |
|
140 | - ->will($this->returnValue(true)); |
|
138 | + ->method('isTransient') |
|
139 | + ->with($this->equalTo(CmsUser::class)) |
|
140 | + ->will($this->returnValue(true)); |
|
141 | 141 | $driver->expects($this->at(1)) |
142 | - ->method('isTransient') |
|
143 | - ->with($this->equalTo(CmsArticle::class)) |
|
144 | - ->will($this->returnValue(false)); |
|
142 | + ->method('isTransient') |
|
143 | + ->with($this->equalTo(CmsArticle::class)) |
|
144 | + ->will($this->returnValue(false)); |
|
145 | 145 | |
146 | 146 | $em = $this->createEntityManager($driver); |
147 | 147 |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | |
117 | 117 | public function testHasGetMetadataNamespaceSeparatorIsNotNormalized() : void |
118 | 118 | { |
119 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
119 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
120 | 120 | |
121 | - $metadataDriver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Global/']); |
|
121 | + $metadataDriver = $this->createAnnotationDriver([__DIR__.'/../../Models/Global/']); |
|
122 | 122 | |
123 | 123 | $entityManager = $this->createEntityManager($metadataDriver); |
124 | 124 | |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | |
127 | 127 | self::assertSame( |
128 | 128 | $mf->getMetadataFor(DoctrineGlobalArticle::class), |
129 | - $mf->getMetadataFor('\\' . DoctrineGlobalArticle::class) |
|
129 | + $mf->getMetadataFor('\\'.DoctrineGlobalArticle::class) |
|
130 | 130 | ); |
131 | 131 | self::assertTrue($mf->hasMetadataFor(DoctrineGlobalArticle::class)); |
132 | - self::assertTrue($mf->hasMetadataFor('\\' . DoctrineGlobalArticle::class)); |
|
132 | + self::assertTrue($mf->hasMetadataFor('\\'.DoctrineGlobalArticle::class)); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | public function testNoDefaultDiscriminatorMapIsAssumed(string $rootClassName, string $targetClassName) : void |
161 | 161 | { |
162 | 162 | $cmf = new ClassMetadataFactory(); |
163 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/JoinedInheritanceType/']); |
|
163 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/JoinedInheritanceType/']); |
|
164 | 164 | $em = $this->createEntityManager($driver); |
165 | 165 | $cmf->setEntityManager($em); |
166 | 166 | |
@@ -210,10 +210,10 @@ discard block |
||
210 | 210 | $driverMock = new DriverMock(); |
211 | 211 | $config = new Configuration(); |
212 | 212 | |
213 | - $config->setProxyDir(__DIR__ . '/../../Proxies'); |
|
213 | + $config->setProxyDir(__DIR__.'/../../Proxies'); |
|
214 | 214 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
215 | 215 | |
216 | - if (! $conn) { |
|
216 | + if ( ! $conn) { |
|
217 | 217 | $conn = new ConnectionMock([], $driverMock, $config, new EventManager()); |
218 | 218 | } |
219 | 219 | $eventManager = $conn->getEventManager(); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | public function testQuoteMetadata() : void |
304 | 304 | { |
305 | 305 | $cmf = new ClassMetadataFactory(); |
306 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Quote/']); |
|
306 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/Quote/']); |
|
307 | 307 | $em = $this->createEntityManager($driver); |
308 | 308 | $cmf->setEntityManager($em); |
309 | 309 | |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | $listener |
386 | 386 | ->expects($this->any()) |
387 | 387 | ->method('onClassMetadataNotFound') |
388 | - ->will($this->returnCallback(static function (OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
388 | + ->will($this->returnCallback(static function(OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
389 | 389 | $test->assertNull($args->getFoundMetadata()); |
390 | 390 | $test->assertSame('Foo', $args->getClassName()); |
391 | 391 | $test->assertSame($em, $args->getObjectManager()); |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | public function testInheritsIdGeneratorMappingFromEmbeddable() : void |
448 | 448 | { |
449 | 449 | $cmf = new ClassMetadataFactory(); |
450 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/DDC4006/']); |
|
450 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/DDC4006/']); |
|
451 | 451 | $em = $this->createEntityManager($driver); |
452 | 452 | $cmf->setEntityManager($em); |
453 | 453 | |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | ) : ClassMetadata { |
471 | 471 | $this->requestedClasses[] = $className; |
472 | 472 | |
473 | - if (! isset($this->mockMetadata[$className])) { |
|
473 | + if ( ! isset($this->mockMetadata[$className])) { |
|
474 | 474 | throw new InvalidArgumentException(sprintf('No mock metadata found for class %s.', $className)); |
475 | 475 | } |
476 | 476 |
@@ -136,24 +136,24 @@ |
||
136 | 136 | ->will($this->returnValue(10)); |
137 | 137 | |
138 | 138 | $parserResultMock = $this->getMockBuilder(ParserResult::class) |
139 | - ->setMethods(['getSqlExecutor']) |
|
140 | - ->getMock(); |
|
139 | + ->setMethods(['getSqlExecutor']) |
|
140 | + ->getMock(); |
|
141 | 141 | $parserResultMock->expects($this->once()) |
142 | - ->method('getSqlExecutor') |
|
143 | - ->will($this->returnValue($sqlExecMock)); |
|
142 | + ->method('getSqlExecutor') |
|
143 | + ->will($this->returnValue($sqlExecMock)); |
|
144 | 144 | |
145 | 145 | $cache = $this->getMockBuilder(CacheProvider::class) |
146 | - ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
147 | - ->getMock(); |
|
146 | + ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
147 | + ->getMock(); |
|
148 | 148 | |
149 | 149 | $cache->expects($this->at(0))->method('doFetch')->will($this->returnValue(1)); |
150 | 150 | $cache->expects($this->at(1)) |
151 | - ->method('doFetch') |
|
152 | - ->with($this->isType('string')) |
|
153 | - ->will($this->returnValue($parserResultMock)); |
|
151 | + ->method('doFetch') |
|
152 | + ->with($this->isType('string')) |
|
153 | + ->will($this->returnValue($parserResultMock)); |
|
154 | 154 | |
155 | 155 | $cache->expects($this->never()) |
156 | - ->method('doSave'); |
|
156 | + ->method('doSave'); |
|
157 | 157 | |
158 | 158 | $query->setQueryCacheDriver($cache); |
159 | 159 |