@@ -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 |
@@ -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 | |
@@ -111,9 +111,9 @@ discard block |
||
111 | 111 | |
112 | 112 | public function testHasGetMetadata_NamespaceSeparatorIsNotNormalized() |
113 | 113 | { |
114 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
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 | /** |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | public function testAddDefaultDiscriminatorMap() |
153 | 153 | { |
154 | 154 | $cmf = new ClassMetadataFactory(); |
155 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/JoinedInheritanceType/']); |
|
155 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/JoinedInheritanceType/']); |
|
156 | 156 | $em = $this->createEntityManager($driver); |
157 | 157 | $cmf->setEntityManager($em); |
158 | 158 | |
@@ -216,10 +216,10 @@ discard block |
||
216 | 216 | $driverMock = new DriverMock(); |
217 | 217 | $config = new Configuration(); |
218 | 218 | |
219 | - $config->setProxyDir(__DIR__ . '/../../Proxies'); |
|
219 | + $config->setProxyDir(__DIR__.'/../../Proxies'); |
|
220 | 220 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
221 | 221 | |
222 | - if (! $conn) { |
|
222 | + if ( ! $conn) { |
|
223 | 223 | $conn = new ConnectionMock([], $driverMock, $config, new EventManager()); |
224 | 224 | } |
225 | 225 | $eventManager = $conn->getEventManager(); |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | public function testQuoteMetadata() |
311 | 311 | { |
312 | 312 | $cmf = new ClassMetadataFactory(); |
313 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Quote/']); |
|
313 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/Quote/']); |
|
314 | 314 | $em = $this->createEntityManager($driver); |
315 | 315 | $cmf->setEntityManager($em); |
316 | 316 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | $listener |
400 | 400 | ->expects($this->any()) |
401 | 401 | ->method('onClassMetadataNotFound') |
402 | - ->will($this->returnCallback(function (OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
402 | + ->will($this->returnCallback(function(OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
403 | 403 | $test->assertNull($args->getFoundMetadata()); |
404 | 404 | $test->assertSame('Foo', $args->getClassName()); |
405 | 405 | $test->assertSame($em, $args->getObjectManager()); |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | public function testInheritsIdGeneratorMappingFromEmbeddable() |
462 | 462 | { |
463 | 463 | $cmf = new ClassMetadataFactory(); |
464 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/DDC4006/']); |
|
464 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/DDC4006/']); |
|
465 | 465 | $em = $this->createEntityManager($driver); |
466 | 466 | $cmf->setEntityManager($em); |
467 | 467 |
@@ -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\Performance; |
6 | 6 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $size = 500; |
133 | 133 | $startPersist = microtime(true); |
134 | 134 | |
135 | - echo PHP_EOL . $label; |
|
135 | + echo PHP_EOL.$label; |
|
136 | 136 | |
137 | 137 | for ($i = 0; $i < $size; $i++) { |
138 | 138 | $em->persist(new Country("Country $i")); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $startPersist = microtime(true); |
167 | 167 | $country = new Country('Country'); |
168 | 168 | |
169 | - echo PHP_EOL . $label; |
|
169 | + echo PHP_EOL.$label; |
|
170 | 170 | |
171 | 171 | $em->persist($country); |
172 | 172 | $em->flush(); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $em->flush(); |
197 | 197 | $em->clear(); |
198 | 198 | |
199 | - printf("\n[%s] persist %s states and %s cities", number_format( microtime(true) - $startPersist, 6), count($states), count($cities)); |
|
199 | + printf("\n[%s] persist %s states and %s cities", number_format(microtime(true) - $startPersist, 6), count($states), count($cities)); |
|
200 | 200 | |
201 | 201 | $startFind = microtime(true); |
202 | 202 | |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $countries = []; |
222 | 222 | $startPersist = microtime(true); |
223 | 223 | |
224 | - echo PHP_EOL . $label; |
|
224 | + echo PHP_EOL.$label; |
|
225 | 225 | |
226 | 226 | for ($i = 0; $i < $size; $i++) { |
227 | 227 | $country = new Country("Country $i"); |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $startPersist = microtime(true); |
257 | 257 | $rep = $em->getRepository(Country::class); |
258 | 258 | |
259 | - echo PHP_EOL . $label; |
|
259 | + echo PHP_EOL.$label; |
|
260 | 260 | |
261 | 261 | for ($i = 0; $i < $size; $i++) { |
262 | 262 | $em->persist(new Country("Country $i")); |
@@ -1,6 +1,6 @@ |
||
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 | use Doctrine\Tests\OrmFunctionalTestCase; |
@@ -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 | |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | public function testCanRetrieveRepositoryFromClassNameWithLeadingBackslash() |
612 | 612 | { |
613 | 613 | self::assertSame( |
614 | - $this->em->getRepository('\\' . CmsUser::class), |
|
614 | + $this->em->getRepository('\\'.CmsUser::class), |
|
615 | 615 | $this->em->getRepository(CmsUser::class) |
616 | 616 | ); |
617 | 617 | } |
@@ -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 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | use Doctrine\Tests\OrmTestCase; |
29 | 29 | use DoctrineGlobal_Article; |
30 | 30 | |
31 | -require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
31 | +require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
32 | 32 | |
33 | 33 | class ClassMetadataTest extends OrmTestCase |
34 | 34 | { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | */ |
174 | 174 | public function testMapAssociationInGlobalNamespace() |
175 | 175 | { |
176 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
176 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
177 | 177 | |
178 | 178 | $cm = new ClassMetadata(DoctrineGlobal_Article::class, $this->metadataBuildingContext); |
179 | 179 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_article')); |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | */ |
270 | 270 | public function testSetDiscriminatorMapInGlobalNamespace() |
271 | 271 | { |
272 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
272 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
273 | 273 | |
274 | 274 | $cm = new ClassMetadata('DoctrineGlobal_User', $this->metadataBuildingContext); |
275 | 275 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | */ |
286 | 286 | public function testSetSubClassesInGlobalNamespace() |
287 | 287 | { |
288 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
288 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
289 | 289 | |
290 | 290 | $cm = new ClassMetadata('DoctrineGlobal_User', $this->metadataBuildingContext); |
291 | 291 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -799,7 +799,7 @@ discard block |
||
799 | 799 | public function testEmptyFieldNameThrowsException() |
800 | 800 | { |
801 | 801 | $this->expectException(MappingException::class); |
802 | - $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'."); |
|
802 | + $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'."); |
|
803 | 803 | |
804 | 804 | $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext); |
805 | 805 | $cm->setTable(new Mapping\TableMetadata('cms_users')); |
@@ -1093,7 +1093,7 @@ discard block |
||
1093 | 1093 | $cm->addLifecycleCallback('notfound', 'postLoad'); |
1094 | 1094 | |
1095 | 1095 | $this->expectException(MappingException::class); |
1096 | - $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback."); |
|
1096 | + $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback."); |
|
1097 | 1097 | |
1098 | 1098 | $cm->validateLifecycleCallbacks(new RuntimeReflectionService()); |
1099 | 1099 | } |
@@ -1113,7 +1113,7 @@ discard block |
||
1113 | 1113 | $cm->addProperty($association); |
1114 | 1114 | |
1115 | 1115 | $this->expectException(MappingException::class); |
1116 | - $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'."); |
|
1116 | + $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'."); |
|
1117 | 1117 | |
1118 | 1118 | $cm->validateAssociations(); |
1119 | 1119 | } |
@@ -1382,6 +1382,6 @@ discard block |
||
1382 | 1382 | */ |
1383 | 1383 | public function propertyToColumnName($propertyName, $className = null) |
1384 | 1384 | { |
1385 | - return strtolower($this->classToTableName($className)) . '_' . $propertyName; |
|
1385 | + return strtolower($this->classToTableName($className)).'_'.$propertyName; |
|
1386 | 1386 | } |
1387 | 1387 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\DDC3231; |
6 | 6 | use Doctrine\ORM\EntityRepository; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\Quote; |
6 | 6 |
@@ -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\Locking; |
6 | 6 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | while ($worker->work()) { |
30 | 30 | if ($worker->returnCode() != GEARMAN_SUCCESS) { |
31 | - echo 'return_code: ' . $worker->returnCode() . "\n"; |
|
31 | + echo 'return_code: '.$worker->returnCode()."\n"; |
|
32 | 32 | break; |
33 | 33 | } |
34 | 34 | } |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | |
54 | 54 | public function findWithLock($job) |
55 | 55 | { |
56 | - return $this->process($job, function ($fixture, $em) { |
|
56 | + return $this->process($job, function($fixture, $em) { |
|
57 | 57 | $entity = $em->find($fixture['entityName'], $fixture['entityId'], $fixture['lockMode']); |
58 | 58 | }); |
59 | 59 | } |
60 | 60 | |
61 | 61 | public function dqlWithLock($job) |
62 | 62 | { |
63 | - return $this->process($job, function ($fixture, $em) { |
|
63 | + return $this->process($job, function($fixture, $em) { |
|
64 | 64 | /* @var $query Doctrine\ORM\Query */ |
65 | 65 | $query = $em->createQuery($fixture['dql']); |
66 | 66 | $query->setLockMode($fixture['lockMode']); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public function lock($job) |
73 | 73 | { |
74 | - return $this->process($job, function ($fixture, $em) { |
|
74 | + return $this->process($job, function($fixture, $em) { |
|
75 | 75 | $entity = $em->find($fixture['entityName'], $fixture['entityId']); |
76 | 76 | $em->lock($entity, $fixture['lockMode']); |
77 | 77 | }); |
@@ -79,18 +79,18 @@ discard block |
||
79 | 79 | |
80 | 80 | protected function processWorkload($job) |
81 | 81 | { |
82 | - echo 'Received job: ' . $job->handle() . ' for function ' . $job->functionName() . "\n"; |
|
82 | + echo 'Received job: '.$job->handle().' for function '.$job->functionName()."\n"; |
|
83 | 83 | |
84 | 84 | $workload = $job->workload(); |
85 | 85 | $workload = unserialize($workload); |
86 | 86 | |
87 | - if (! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
87 | + if ( ! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
88 | 88 | throw new \InvalidArgumentException('Missing Database parameters'); |
89 | 89 | } |
90 | 90 | |
91 | 91 | $this->em = $this->createEntityManager($workload['conn']); |
92 | 92 | |
93 | - if (! isset($workload['fixture'])) { |
|
93 | + if ( ! isset($workload['fixture'])) { |
|
94 | 94 | throw new \InvalidArgumentException('Missing Fixture parameters'); |
95 | 95 | } |
96 | 96 | return $workload['fixture']; |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | protected function createEntityManager($conn) |
100 | 100 | { |
101 | 101 | $config = new Configuration(); |
102 | - $config->setProxyDir(__DIR__ . '/../../../Proxies'); |
|
102 | + $config->setProxyDir(__DIR__.'/../../../Proxies'); |
|
103 | 103 | $config->setProxyNamespace('MyProject\Proxies'); |
104 | 104 | $config->setAutoGenerateProxyClasses(true); |
105 | 105 | |
106 | - $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']); |
|
106 | + $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']); |
|
107 | 107 | $config->setMetadataDriverImpl($annotDriver); |
108 | 108 | |
109 | 109 | $cache = new ArrayCache(); |
@@ -40,6 +40,6 @@ |
||
40 | 40 | public function assertCollectionEquals(Collection $first, Collection $second) |
41 | 41 | { |
42 | 42 | return $first->forAll(function ($k, $e) use ($second) { |
43 | - return $second->contains($e); }); |
|
43 | + return $second->contains($e); }); |
|
44 | 44 | } |
45 | 45 | } |
@@ -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 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | public function assertCollectionEquals(Collection $first, Collection $second) |
41 | 41 | { |
42 | - return $first->forAll(function ($k, $e) use ($second) { |
|
42 | + return $first->forAll(function($k, $e) use ($second) { |
|
43 | 43 | return $second->contains($e); }); |
44 | 44 | } |
45 | 45 | } |