@@ -86,8 +86,8 @@ |
||
| 86 | 86 | $this->em = $this->getTestEntityManager(); |
| 87 | 87 | $this->region = $this->createRegion(); |
| 88 | 88 | $this->collectionPersister = $this->getMockBuilder(CollectionPersister::class) |
| 89 | - ->setMethods($this->collectionPersisterMockMethods) |
|
| 90 | - ->getMock(); |
|
| 89 | + ->setMethods($this->collectionPersisterMockMethods) |
|
| 90 | + ->getMock(); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -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 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $user->username = 'gblanco'; |
| 186 | 186 | $user->status = 'developer'; |
| 187 | 187 | |
| 188 | - for ($i=0; $i<3; ++$i) { |
|
| 188 | + for ($i = 0; $i < 3; ++$i) { |
|
| 189 | 189 | $phone = new CmsPhonenumber(); |
| 190 | 190 | $phone->phonenumber = 100 + $i; |
| 191 | 191 | $user->addPhonenumber($phone); |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | $user->username = 'gblanco'; |
| 414 | 414 | $user->status = 'developer'; |
| 415 | 415 | |
| 416 | - for ($i=0; $i<3; ++$i) { |
|
| 416 | + for ($i = 0; $i < 3; ++$i) { |
|
| 417 | 417 | $phone = new CmsPhonenumber(); |
| 418 | 418 | $phone->phonenumber = 100 + $i; |
| 419 | 419 | $user->addPhonenumber($phone); |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | $user->username = 'gblanco'; |
| 454 | 454 | $user->status = 'developer'; |
| 455 | 455 | |
| 456 | - for ($i=0; $i<3; ++$i) { |
|
| 456 | + for ($i = 0; $i < 3; ++$i) { |
|
| 457 | 457 | $phone = new CmsPhonenumber(); |
| 458 | 458 | $phone->phonenumber = 100 + $i; |
| 459 | 459 | $user->addPhonenumber($phone); |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | $user->username = 'gblanco'; |
| 495 | 495 | $user->status = 'developer'; |
| 496 | 496 | |
| 497 | - for ($i=0; $i<3; ++$i) { |
|
| 497 | + for ($i = 0; $i < 3; ++$i) { |
|
| 498 | 498 | $phone = new CmsPhonenumber(); |
| 499 | 499 | $phone->phonenumber = 100 + $i; |
| 500 | 500 | $user->addPhonenumber($phone); |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | |
| 642 | 642 | $user->setAddress($address); |
| 643 | 643 | |
| 644 | - $this->em->transactional(function ($em) use ($user) { |
|
| 644 | + $this->em->transactional(function($em) use ($user) { |
|
| 645 | 645 | $em->persist($user); |
| 646 | 646 | }); |
| 647 | 647 | $this->em->clear(); |
@@ -682,12 +682,12 @@ discard block |
||
| 682 | 682 | $this->em->persist($user); |
| 683 | 683 | $this->em->flush(); |
| 684 | 684 | |
| 685 | - self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id)); |
|
| 685 | + self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id)); |
|
| 686 | 686 | |
| 687 | 687 | $address->user = null; |
| 688 | 688 | $this->em->flush(); |
| 689 | 689 | |
| 690 | - self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id)); |
|
| 690 | + self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id)); |
|
| 691 | 691 | } |
| 692 | 692 | |
| 693 | 693 | /** |
@@ -881,7 +881,7 @@ discard block |
||
| 881 | 881 | |
| 882 | 882 | self::assertInstanceOf(GhostObjectInterface::class, $fetchedUser, 'It IS a proxy, ...'); |
| 883 | 883 | self::assertTrue($fetchedUser->isProxyInitialized(), '...but its initialized!'); |
| 884 | - self::assertEquals($qc+2, $this->getCurrentQueryCount()); |
|
| 884 | + self::assertEquals($qc + 2, $this->getCurrentQueryCount()); |
|
| 885 | 885 | } |
| 886 | 886 | |
| 887 | 887 | /** |
@@ -942,7 +942,7 @@ discard block |
||
| 942 | 942 | |
| 943 | 943 | $this->expectException(ORMInvalidArgumentException::class); |
| 944 | 944 | $this->expectExceptionMessage( |
| 945 | - 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' . |
|
| 945 | + 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field '. |
|
| 946 | 946 | '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.' |
| 947 | 947 | ); |
| 948 | 948 | |
@@ -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 | |
@@ -114,9 +114,9 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | public function testHasGetMetadataNamespaceSeparatorIsNotNormalized() : void |
| 116 | 116 | { |
| 117 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 117 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
| 118 | 118 | |
| 119 | - $metadataDriver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Global/']); |
|
| 119 | + $metadataDriver = $this->createAnnotationDriver([__DIR__.'/../../Models/Global/']); |
|
| 120 | 120 | |
| 121 | 121 | $entityManager = $this->createEntityManager($metadataDriver); |
| 122 | 122 | |
@@ -124,10 +124,10 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | self::assertSame( |
| 126 | 126 | $mf->getMetadataFor(DoctrineGlobalArticle::class), |
| 127 | - $mf->getMetadataFor('\\' . DoctrineGlobalArticle::class) |
|
| 127 | + $mf->getMetadataFor('\\'.DoctrineGlobalArticle::class) |
|
| 128 | 128 | ); |
| 129 | 129 | self::assertTrue($mf->hasMetadataFor(DoctrineGlobalArticle::class)); |
| 130 | - self::assertTrue($mf->hasMetadataFor('\\' . DoctrineGlobalArticle::class)); |
|
| 130 | + self::assertTrue($mf->hasMetadataFor('\\'.DoctrineGlobalArticle::class)); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | public function testAddDefaultDiscriminatorMap() : void |
| 156 | 156 | { |
| 157 | 157 | $cmf = new ClassMetadataFactory(); |
| 158 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/JoinedInheritanceType/']); |
|
| 158 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/JoinedInheritanceType/']); |
|
| 159 | 159 | $em = $this->createEntityManager($driver); |
| 160 | 160 | $cmf->setEntityManager($em); |
| 161 | 161 | |
@@ -219,10 +219,10 @@ discard block |
||
| 219 | 219 | $driverMock = new DriverMock(); |
| 220 | 220 | $config = new Configuration(); |
| 221 | 221 | |
| 222 | - $config->setProxyDir(__DIR__ . '/../../Proxies'); |
|
| 222 | + $config->setProxyDir(__DIR__.'/../../Proxies'); |
|
| 223 | 223 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
| 224 | 224 | |
| 225 | - if (! $conn) { |
|
| 225 | + if ( ! $conn) { |
|
| 226 | 226 | $conn = new ConnectionMock([], $driverMock, $config, new EventManager()); |
| 227 | 227 | } |
| 228 | 228 | $eventManager = $conn->getEventManager(); |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | public function testQuoteMetadata() : void |
| 313 | 313 | { |
| 314 | 314 | $cmf = new ClassMetadataFactory(); |
| 315 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Quote/']); |
|
| 315 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/Quote/']); |
|
| 316 | 316 | $em = $this->createEntityManager($driver); |
| 317 | 317 | $cmf->setEntityManager($em); |
| 318 | 318 | |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | $listener |
| 395 | 395 | ->expects($this->any()) |
| 396 | 396 | ->method('onClassMetadataNotFound') |
| 397 | - ->will($this->returnCallback(function (OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
| 397 | + ->will($this->returnCallback(function(OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
| 398 | 398 | $test->assertNull($args->getFoundMetadata()); |
| 399 | 399 | $test->assertSame('Foo', $args->getClassName()); |
| 400 | 400 | $test->assertSame($em, $args->getObjectManager()); |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | public function testInheritsIdGeneratorMappingFromEmbeddable() : void |
| 457 | 457 | { |
| 458 | 458 | $cmf = new ClassMetadataFactory(); |
| 459 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/DDC4006/']); |
|
| 459 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/DDC4006/']); |
|
| 460 | 460 | $em = $this->createEntityManager($driver); |
| 461 | 461 | $cmf->setEntityManager($em); |
| 462 | 462 | |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | ) : ClassMetadata { |
| 480 | 480 | $this->requestedClasses[] = $className; |
| 481 | 481 | |
| 482 | - if (! isset($this->mockMetadata[$className])) { |
|
| 482 | + if ( ! isset($this->mockMetadata[$className])) { |
|
| 483 | 483 | throw new \InvalidArgumentException(sprintf('No mock metadata found for class %s.', $className)); |
| 484 | 484 | } |
| 485 | 485 | |