@@ -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 | |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | $this->em->flush(); |
50 | 50 | $this->em->clear(); |
51 | 51 | |
52 | - $dql = "SELECT a, b, ba FROM " . __NAMESPACE__ . "\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba"; |
|
52 | + $dql = "SELECT a, b, ba FROM ".__NAMESPACE__."\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba"; |
|
53 | 53 | $results = $this->em->createQuery($dql)->setMaxResults(1)->getResult(); |
54 | 54 | |
55 | 55 | self::assertSame($results[0], $results[0]->entitiesB[0]->entityAFrom); |
56 | - self::assertFalse( $results[0]->entitiesB[0]->entityATo instanceof GhostObjectInterface); |
|
56 | + self::assertFalse($results[0]->entitiesB[0]->entityATo instanceof GhostObjectInterface); |
|
57 | 57 | self::assertInstanceOf(Collection::class, $results[0]->entitiesB[0]->entityATo->getEntitiesB()); |
58 | 58 | } |
59 | 59 |
@@ -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\Proxy; |
6 | 6 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | self::isInstanceOf(CompanyEmployee::class) |
216 | 216 | ) |
217 | 217 | ) |
218 | - ->willReturnCallback(function (array $id, CompanyEmployee $companyEmployee) { |
|
218 | + ->willReturnCallback(function(array $id, CompanyEmployee $companyEmployee) { |
|
219 | 219 | $companyEmployee->setSalary(1000); // A property on the CompanyEmployee |
220 | 220 | $companyEmployee->setName('Bob'); // A property on the parent class, CompanyPerson |
221 | 221 |
@@ -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 |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public static function getRealClass($class) |
53 | 53 | { |
54 | - if (! self::$classNameInflector) { |
|
54 | + if ( ! self::$classNameInflector) { |
|
55 | 55 | self::$classNameInflector = (new Configuration())->getClassNameInflector(); |
56 | 56 | } |
57 | 57 | |
58 | 58 | $class = self::$classNameInflector->getUserClassName($class); |
59 | 59 | |
60 | - if (false === $pos = strrpos($class, '\\' . Proxy::MARKER . '\\')) { |
|
60 | + if (false === $pos = strrpos($class, '\\'.Proxy::MARKER.'\\')) { |
|
61 | 61 | return $class; |
62 | 62 | } |
63 | 63 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public static function generateProxyClassName($className, $proxyNamespace) |
124 | 124 | { |
125 | - if (! self::$classNameInflector) { |
|
125 | + if ( ! self::$classNameInflector) { |
|
126 | 126 | self::$classNameInflector = (new Configuration())->getClassNameInflector(); |
127 | 127 | } |
128 | 128 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Proxy\Factory; |
7 | 7 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $proxyInstance = (new LazyLoadingGhostFactory(new Configuration())) |
97 | 97 | ->createProxy( |
98 | 98 | $metadata->getClassName(), |
99 | - function ( |
|
99 | + function( |
|
100 | 100 | GhostObjectInterface $ghostObject, |
101 | 101 | string $method, // we don't care |
102 | 102 | array $parameters, // we don't care |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $identifier = $persister->getIdentifier($ghostObject); |
112 | 112 | |
113 | 113 | // @TODO how do we use `$properties` in the persister? That would be a massive optimisation |
114 | - if (! $persister->loadById($identifier, $ghostObject)) { |
|
114 | + if ( ! $persister->loadById($identifier, $ghostObject)) { |
|
115 | 115 | $initializer = $originalInitializer; |
116 | 116 | |
117 | 117 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $transientFieldsFqns = []; |
146 | 146 | |
147 | 147 | foreach ($metadata->getDeclaredPropertiesIterator() as $name => $property) { |
148 | - if (! $property instanceof TransientMetadata) { |
|
148 | + if ( ! $property instanceof TransientMetadata) { |
|
149 | 149 | continue; |
150 | 150 | } |
151 | 151 | |
@@ -181,11 +181,11 @@ discard block |
||
181 | 181 | private function propertyFqcn(\ReflectionProperty $property) : string |
182 | 182 | { |
183 | 183 | if ($property->isPrivate()) { |
184 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName(); |
|
184 | + return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName(); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | if ($property->isProtected()) { |
188 | - return "\0*\0" . $property->getName(); |
|
188 | + return "\0*\0".$property->getName(); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | return $property->getName(); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | private function getOrCreateProxyDefinition(string $className) : ProxyDefinition |
215 | 215 | { |
216 | - if (! isset($this->definitions[$className])) { |
|
216 | + if ( ! isset($this->definitions[$className])) { |
|
217 | 217 | $classMetadata = $this->entityManager->getClassMetadata($className); |
218 | 218 | |
219 | 219 | $this->definitions[$className] = $this->definitionFactory->build($classMetadata); |