@@ -1,6 +1,6 @@ discard block |
||
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 |
||
19 | 19 | $this->em->getClassMetadata(DDC633Appointment::class), |
20 | 20 | ] |
21 | 21 | ); |
22 | - } catch(\Exception $e) { |
|
22 | + } catch (\Exception $e) { |
|
23 | 23 | |
24 | 24 | } |
25 | 25 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->em->flush(); |
67 | 67 | $this->em->clear(); |
68 | 68 | |
69 | - $appointments = $this->em->createQuery("SELECT a FROM " . __NAMESPACE__ . "\DDC633Appointment a")->getResult(); |
|
69 | + $appointments = $this->em->createQuery("SELECT a FROM ".__NAMESPACE__."\DDC633Appointment a")->getResult(); |
|
70 | 70 | |
71 | 71 | foreach ($appointments AS $eagerAppointment) { |
72 | 72 | self::assertInstanceOf(GhostObjectInterface::class, $eagerAppointment->patient); |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | // proxy for Y is in identity map |
49 | 49 | |
50 | - $z2 = $this->em->createQuery('select z,y from ' . get_class($z) . ' z join z.y y where z.id = ?1') |
|
50 | + $z2 = $this->em->createQuery('select z,y from '.get_class($z).' z join z.y y where z.id = ?1') |
|
51 | 51 | ->setParameter(1, $z->id) |
52 | 52 | ->getSingleResult(); |
53 | 53 | self::assertInstanceOf(GhostObjectInterface::class, $z2->y); |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -83,14 +83,14 @@ discard block |
||
83 | 83 | $this->em->clear(); |
84 | 84 | |
85 | 85 | // fetch-join that foreign-key/primary-key entity association |
86 | - $dql = "SELECT c, p FROM " . DDC881PhoneCall::class . " c JOIN c.phonenumber p"; |
|
86 | + $dql = "SELECT c, p FROM ".DDC881PhoneCall::class." c JOIN c.phonenumber p"; |
|
87 | 87 | $calls = $this->em->createQuery($dql)->getResult(); |
88 | 88 | |
89 | 89 | self::assertEquals(2, count($calls)); |
90 | 90 | self::assertNotInstanceOf(GhostObjectInterface::class, $calls[0]->getPhoneNumber()); |
91 | 91 | self::assertNotInstanceOf(GhostObjectInterface::class, $calls[1]->getPhoneNumber()); |
92 | 92 | |
93 | - $dql = "SELECT p, c FROM " . DDC881PhoneNumber::class . " p JOIN p.calls c"; |
|
93 | + $dql = "SELECT p, c FROM ".DDC881PhoneNumber::class." p JOIN p.calls c"; |
|
94 | 94 | $numbers = $this->em->createQuery($dql)->getResult(); |
95 | 95 | |
96 | 96 | self::assertEquals(2, count($numbers)); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Mapping; |
6 | 6 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php"; |
115 | 115 | |
116 | - $metadataDriver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Global/']); |
|
116 | + $metadataDriver = $this->createAnnotationDriver([__DIR__.'/../../Models/Global/']); |
|
117 | 117 | |
118 | 118 | $entityManager = $this->createEntityManager($metadataDriver); |
119 | 119 | |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | |
122 | 122 | self::assertSame( |
123 | 123 | $mf->getMetadataFor(DoctrineGlobal_Article::class), |
124 | - $mf->getMetadataFor('\\' . DoctrineGlobal_Article::class) |
|
124 | + $mf->getMetadataFor('\\'.DoctrineGlobal_Article::class) |
|
125 | 125 | ); |
126 | 126 | self::assertTrue($mf->hasMetadataFor(DoctrineGlobal_Article::class)); |
127 | - self::assertTrue($mf->hasMetadataFor('\\' . DoctrineGlobal_Article::class)); |
|
127 | + self::assertTrue($mf->hasMetadataFor('\\'.DoctrineGlobal_Article::class)); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | public function testAddDefaultDiscriminatorMap() |
176 | 176 | { |
177 | 177 | $cmf = new ClassMetadataFactory(); |
178 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/JoinedInheritanceType/']); |
|
178 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/JoinedInheritanceType/']); |
|
179 | 179 | $em = $this->createEntityManager($driver); |
180 | 180 | $cmf->setEntityManager($em); |
181 | 181 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | { |
216 | 216 | // DDC-3551 |
217 | 217 | $conn = $this->createMock(Connection::class); |
218 | - $mockDriver = new MetadataDriverMock(); |
|
218 | + $mockDriver = new MetadataDriverMock(); |
|
219 | 219 | $conn->expects($this->any()) |
220 | 220 | ->method('getEventManager') |
221 | 221 | ->willReturn(new EventManager()); |
@@ -239,10 +239,10 @@ discard block |
||
239 | 239 | $driverMock = new DriverMock(); |
240 | 240 | $config = new Configuration(); |
241 | 241 | |
242 | - $config->setProxyDir(__DIR__ . '/../../Proxies'); |
|
242 | + $config->setProxyDir(__DIR__.'/../../Proxies'); |
|
243 | 243 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
244 | 244 | |
245 | - if (!$conn) { |
|
245 | + if ( ! $conn) { |
|
246 | 246 | $conn = new ConnectionMock([], $driverMock, $config, new EventManager()); |
247 | 247 | } |
248 | 248 | $eventManager = $conn->getEventManager(); |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | public function testQuoteMetadata() |
334 | 334 | { |
335 | 335 | $cmf = new ClassMetadataFactory(); |
336 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Quote/']); |
|
336 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/Quote/']); |
|
337 | 337 | $em = $this->createEntityManager($driver); |
338 | 338 | $cmf->setEntityManager($em); |
339 | 339 | |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | $listener |
423 | 423 | ->expects($this->any()) |
424 | 424 | ->method('onClassMetadataNotFound') |
425 | - ->will($this->returnCallback(function (OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
425 | + ->will($this->returnCallback(function(OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
426 | 426 | $test->assertNull($args->getFoundMetadata()); |
427 | 427 | $test->assertSame('Foo', $args->getClassName()); |
428 | 428 | $test->assertSame($em, $args->getObjectManager()); |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | public function testInheritsIdGeneratorMappingFromEmbeddable() |
485 | 485 | { |
486 | 486 | $cmf = new ClassMetadataFactory(); |
487 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/DDC4006/']); |
|
487 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/DDC4006/']); |
|
488 | 488 | $em = $this->createEntityManager($driver); |
489 | 489 | $cmf->setEntityManager($em); |
490 | 490 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | |
37 | 37 | $configuration = $this->em->getConfiguration(); |
38 | 38 | |
39 | - $configuration->setProxyNamespace(__NAMESPACE__ . '\\ProxyTest'); |
|
40 | - $configuration->setProxyDir(__DIR__ . '/../../Proxies'); |
|
39 | + $configuration->setProxyNamespace(__NAMESPACE__.'\\ProxyTest'); |
|
40 | + $configuration->setProxyDir(__DIR__.'/../../Proxies'); |
|
41 | 41 | $configuration->setAutoGenerateProxyClasses(StaticProxyFactory::AUTOGENERATE_ALWAYS); |
42 | 42 | |
43 | 43 | $this->factory = new StaticProxyFactory($this->em, $configuration->buildGhostObjectFactory()); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | { |
84 | 84 | $id = $this->createProduct(); |
85 | 85 | |
86 | - $entity = $this->em->getReference(ECommerceProduct::class , $id); |
|
86 | + $entity = $this->em->getReference(ECommerceProduct::class, $id); |
|
87 | 87 | $class = $this->em->getClassMetadata(get_class($entity)); |
88 | 88 | |
89 | 89 | self::assertEquals(ECommerceProduct::class, $class->getClassName()); |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | { |
97 | 97 | $id = $this->createProduct(); |
98 | 98 | |
99 | - $entity = $this->em->getReference(ECommerceProduct::class , $id); |
|
100 | - $entity2 = $this->em->find(ECommerceProduct::class , $id); |
|
99 | + $entity = $this->em->getReference(ECommerceProduct::class, $id); |
|
100 | + $entity2 = $this->em->find(ECommerceProduct::class, $id); |
|
101 | 101 | |
102 | 102 | self::assertSame($entity, $entity2); |
103 | 103 | self::assertEquals('Doctrine Cookbook', $entity2->getName()); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $id = $this->createProduct(); |
112 | 112 | |
113 | 113 | /* @var $entity ECommerceProduct */ |
114 | - $entity = $this->em->getReference(ECommerceProduct::class , $id); |
|
114 | + $entity = $this->em->getReference(ECommerceProduct::class, $id); |
|
115 | 115 | |
116 | 116 | /* @var $clone ECommerceProduct */ |
117 | 117 | $clone = clone $entity; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $id = $this->createProduct(); |
139 | 139 | |
140 | 140 | /* @var $entity ECommerceProduct|GhostObjectInterface */ |
141 | - $entity = $this->em->getReference(ECommerceProduct::class , $id); |
|
141 | + $entity = $this->em->getReference(ECommerceProduct::class, $id); |
|
142 | 142 | |
143 | 143 | self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy."); |
144 | 144 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $id = $this->createProduct(); |
156 | 156 | |
157 | 157 | /* @var $entity ECommerceProduct|GhostObjectInterface */ |
158 | - $entity = $this->em->getReference(ECommerceProduct::class , $id); |
|
158 | + $entity = $this->em->getReference(ECommerceProduct::class, $id); |
|
159 | 159 | |
160 | 160 | $entity->setName('Doctrine 2 Cookbook'); |
161 | 161 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $this->em->clear(); |
164 | 164 | |
165 | 165 | /* @var $entity ECommerceProduct|GhostObjectInterface */ |
166 | - $entity = $this->em->getReference(ECommerceProduct::class , $id); |
|
166 | + $entity = $this->em->getReference(ECommerceProduct::class, $id); |
|
167 | 167 | |
168 | 168 | self::assertEquals('Doctrine 2 Cookbook', $entity->getName()); |
169 | 169 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $id = $this->createProduct(); |
174 | 174 | |
175 | 175 | /* @var $entity ECommerceProduct|GhostObjectInterface */ |
176 | - $entity = $this->em->getReference(ECommerceProduct::class , $id); |
|
176 | + $entity = $this->em->getReference(ECommerceProduct::class, $id); |
|
177 | 177 | |
178 | 178 | self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy."); |
179 | 179 | self::assertEquals($id, $entity->getId()); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $id = $this->createAuction(); |
189 | 189 | |
190 | 190 | /* @var $entity CompanyAuction|GhostObjectInterface */ |
191 | - $entity = $this->em->getReference(CompanyAuction::class , $id); |
|
191 | + $entity = $this->em->getReference(CompanyAuction::class, $id); |
|
192 | 192 | |
193 | 193 | self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy."); |
194 | 194 | self::assertEquals($id, $entity->getId()); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $id = $this->createProduct(); |
227 | 227 | |
228 | 228 | /* @var $entity ECommerceProduct|GhostObjectInterface */ |
229 | - $entity = $this->em->getReference(ECommerceProduct::class , $id); |
|
229 | + $entity = $this->em->getReference(ECommerceProduct::class, $id); |
|
230 | 230 | |
231 | 231 | self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy."); |
232 | 232 | self::assertEquals('Doctrine Cookbook', $entity->getName()); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $id = $this->createProduct(); |
242 | 242 | |
243 | 243 | /* @var $entity ECommerceProduct|GhostObjectInterface */ |
244 | - $entity = $this->em->getReference(ECommerceProduct::class , $id); |
|
244 | + $entity = $this->em->getReference(ECommerceProduct::class, $id); |
|
245 | 245 | |
246 | 246 | $className = StaticClassNameConverter::getClass($entity); |
247 | 247 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Doctrine\Tests\ORM\Functional; |
5 | 5 | |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | $eventManager->addEventListener([Events::postLoad], $listener); |
235 | 235 | |
236 | 236 | $this->em->find(CmsUser::class, $this->userId); |
237 | - self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class . ' should be handled once!'); |
|
238 | - self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class . ' should be handled once!'); |
|
237 | + self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class.' should be handled once!'); |
|
238 | + self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class.' should be handled once!'); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | private function loadFixture() |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | { |
312 | 312 | $object = $event->getObject(); |
313 | 313 | $class = StaticClassNameConverter::getClass($object); |
314 | - if (!isset($this->firedByClasses[$class])) { |
|
314 | + if ( ! isset($this->firedByClasses[$class])) { |
|
315 | 315 | $this->firedByClasses[$class] = 1; |
316 | 316 | } else { |
317 | 317 | $this->firedByClasses[$class]++; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Utility; |
6 | 6 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $className = array_pop($namespaceParts); |
43 | 43 | $namespace = implode('\\', $namespaceParts); |
44 | 44 | |
45 | - eval('namespace ' . $namespace . ' { class ' . $className . ' {} }'); |
|
45 | + eval('namespace '.$namespace.' { class '.$className.' {} }'); |
|
46 | 46 | |
47 | 47 | self::assertSame($expectedClassName, StaticClassNameConverter::getClass(new $givenClassName)); |
48 | 48 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Utility; |
7 | 7 |