@@ -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 @@ |
||
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,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 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ->proxyFactory |
85 | 85 | ->createProxy( |
86 | 86 | $className, |
87 | - function () { |
|
87 | + function() { |
|
88 | 88 | // empty closure, serves its purpose, for now |
89 | 89 | }, |
90 | 90 | $this->cachedSkippedProperties[$className] |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | private function makeInitializer(ClassMetadata $metadata, EntityPersister $persister) : \Closure |
134 | 134 | { |
135 | - return function ( |
|
135 | + return function( |
|
136 | 136 | GhostObjectInterface $ghostObject, |
137 | 137 | string $method, // we don't care |
138 | 138 | array $parameters, // we don't care |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $identifier = $persister->getIdentifier($ghostObject); |
146 | 146 | |
147 | 147 | // @TODO how do we use `$properties` in the persister? That would be a massive optimisation |
148 | - if (! $persister->loadById($identifier, $ghostObject)) { |
|
148 | + if ( ! $persister->loadById($identifier, $ghostObject)) { |
|
149 | 149 | $initializer = $originalInitializer; |
150 | 150 | |
151 | 151 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $transientFieldsFqns = []; |
172 | 172 | |
173 | 173 | foreach ($metadata->getDeclaredPropertiesIterator() as $name => $property) { |
174 | - if (! $property instanceof TransientMetadata) { |
|
174 | + if ( ! $property instanceof TransientMetadata) { |
|
175 | 175 | continue; |
176 | 176 | } |
177 | 177 | |
@@ -206,11 +206,11 @@ discard block |
||
206 | 206 | private function propertyFqcn(\ReflectionProperty $property) : string |
207 | 207 | { |
208 | 208 | if ($property->isPrivate()) { |
209 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName(); |
|
209 | + return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName(); |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | if ($property->isProtected()) { |
213 | - return "\0*\0" . $property->getName(); |
|
213 | + return "\0*\0".$property->getName(); |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | return $property->getName(); |
@@ -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 = ClassUtils::getClass($entity); |
247 | 247 |