@@ -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\Symfony; |
6 | 6 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | ] |
22 | 22 | ); |
23 | 23 | |
24 | - touch($filename = $this->dir . '/Foo' . $this->getFileExtension()); |
|
24 | + touch($filename = $this->dir.'/Foo'.$this->getFileExtension()); |
|
25 | 25 | self::assertEquals($filename, $driver->getLocator()->findMappingFile('MyNamespace\MySubnamespace\Entity\Foo')); |
26 | 26 | } |
27 | 27 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | ] |
34 | 34 | ); |
35 | 35 | |
36 | - touch($filename = $this->dir . '/Foo.Bar' . $this->getFileExtension()); |
|
36 | + touch($filename = $this->dir.'/Foo.Bar'.$this->getFileExtension()); |
|
37 | 37 | self::assertEquals($filename, $driver->getLocator()->findMappingFile('MyNamespace\MySubnamespace\Entity\Foo\Bar')); |
38 | 38 | } |
39 | 39 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public function testFindMappingNamespaceNotFound() |
55 | 55 | { |
56 | 56 | $this->expectException(MappingException::class); |
57 | - $this->expectExceptionMessage("No mapping file found named 'Foo" . $this->getFileExtension() . "' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'."); |
|
57 | + $this->expectExceptionMessage("No mapping file found named 'Foo".$this->getFileExtension()."' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'."); |
|
58 | 58 | |
59 | 59 | $driver = $this->getDriver( |
60 | 60 | [ |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | protected function setUp() |
69 | 69 | { |
70 | - $this->dir = sys_get_temp_dir() . '/abstract_driver_test'; |
|
70 | + $this->dir = sys_get_temp_dir().'/abstract_driver_test'; |
|
71 | 71 | @mkdir($this->dir, 0777, true); |
72 | 72 | } |
73 | 73 |
@@ -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 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | { |
193 | 193 | // DDC-3551 |
194 | 194 | $conn = $this->createMock(Connection::class); |
195 | - $mockDriver = new MetadataDriverMock(); |
|
195 | + $mockDriver = new MetadataDriverMock(); |
|
196 | 196 | $conn->expects($this->any()) |
197 | 197 | ->method('getEventManager') |
198 | 198 | ->willReturn(new EventManager()); |
@@ -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 | |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | { |
486 | 486 | $this->requestedClasses[] = $className; |
487 | 487 | |
488 | - if (! isset($this->mockMetadata[$className])) { |
|
488 | + if ( ! isset($this->mockMetadata[$className])) { |
|
489 | 489 | throw new \InvalidArgumentException("No mock metadata found for class $className."); |
490 | 490 | } |
491 | 491 |
@@ -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 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | use Doctrine\Tests\OrmTestCase; |
31 | 31 | use DoctrineGlobal_Article; |
32 | 32 | |
33 | -require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
33 | +require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
34 | 34 | |
35 | 35 | class ClassMetadataTest extends OrmTestCase |
36 | 36 | { |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function testMapAssociationInGlobalNamespace() |
177 | 177 | { |
178 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
178 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
179 | 179 | |
180 | 180 | $cm = new ClassMetadata(DoctrineGlobal_Article::class, $this->metadataBuildingContext); |
181 | 181 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_article')); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | */ |
272 | 272 | public function testSetDiscriminatorMapInGlobalNamespace() |
273 | 273 | { |
274 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
274 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
275 | 275 | |
276 | 276 | $cm = new ClassMetadata('DoctrineGlobal_User', $this->metadataBuildingContext); |
277 | 277 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | public function testSetSubClassesInGlobalNamespace() |
289 | 289 | { |
290 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
290 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
291 | 291 | |
292 | 292 | $cm = new ClassMetadata('DoctrineGlobal_User', $this->metadataBuildingContext); |
293 | 293 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | public function testEmptyFieldNameThrowsException() |
802 | 802 | { |
803 | 803 | $this->expectException(MappingException::class); |
804 | - $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'."); |
|
804 | + $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'."); |
|
805 | 805 | |
806 | 806 | $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext); |
807 | 807 | $cm->setTable(new Mapping\TableMetadata('cms_users')); |
@@ -921,12 +921,12 @@ discard block |
||
921 | 921 | $mapping = $cm->getSqlResultSetMapping('find-all'); |
922 | 922 | |
923 | 923 | self::assertEquals('__CLASS__', $mapping['entities'][0]['entityClass']); |
924 | - self::assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][0]['fields'][0]); |
|
925 | - self::assertEquals(['name'=>'name','column'=>'name'], $mapping['entities'][0]['fields'][1]); |
|
924 | + self::assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][0]['fields'][0]); |
|
925 | + self::assertEquals(['name'=>'name', 'column'=>'name'], $mapping['entities'][0]['fields'][1]); |
|
926 | 926 | |
927 | 927 | self::assertEquals(CMS\CmsEmail::class, $mapping['entities'][1]['entityClass']); |
928 | - self::assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][1]['fields'][0]); |
|
929 | - self::assertEquals(['name'=>'email','column'=>'email'], $mapping['entities'][1]['fields'][1]); |
|
928 | + self::assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][1]['fields'][0]); |
|
929 | + self::assertEquals(['name'=>'email', 'column'=>'email'], $mapping['entities'][1]['fields'][1]); |
|
930 | 930 | |
931 | 931 | self::assertEquals('scalarColumn', $mapping['columns'][0]['name']); |
932 | 932 | } |
@@ -1095,7 +1095,7 @@ discard block |
||
1095 | 1095 | $cm->addLifecycleCallback('notfound', 'postLoad'); |
1096 | 1096 | |
1097 | 1097 | $this->expectException(MappingException::class); |
1098 | - $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback."); |
|
1098 | + $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback."); |
|
1099 | 1099 | |
1100 | 1100 | $cm->validateLifecycleCallbacks(new RuntimeReflectionService()); |
1101 | 1101 | } |
@@ -1115,7 +1115,7 @@ discard block |
||
1115 | 1115 | $cm->addProperty($association); |
1116 | 1116 | |
1117 | 1117 | $this->expectException(MappingException::class); |
1118 | - $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'."); |
|
1118 | + $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'."); |
|
1119 | 1119 | |
1120 | 1120 | $cm->validateAssociations(); |
1121 | 1121 | } |
@@ -1384,6 +1384,6 @@ discard block |
||
1384 | 1384 | */ |
1385 | 1385 | public function propertyToColumnName($propertyName, $className = null) |
1386 | 1386 | { |
1387 | - return strtolower($this->classToTableName($className)) . '_' . $propertyName; |
|
1387 | + return strtolower($this->classToTableName($className)).'_'.$propertyName; |
|
1388 | 1388 | } |
1389 | 1389 | } |
@@ -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\Decorator; |
6 | 6 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | /** Special case EntityManager::transactional() */ |
54 | 54 | if ($method->getName() === 'transactional') { |
55 | - return [$method->getName(), [function () {}]]; |
|
55 | + return [$method->getName(), [function() {}]]; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | if ($method->getNumberOfRequiredParameters() === 0) { |
@@ -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\Performance; |
6 | 6 | |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | { |
18 | 18 | $config = new Configuration(); |
19 | 19 | |
20 | - $config->setProxyDir(__DIR__ . '/../Tests/Proxies'); |
|
20 | + $config->setProxyDir(__DIR__.'/../Tests/Proxies'); |
|
21 | 21 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
22 | 22 | $config->setAutoGenerateProxyClasses(StaticProxyFactory::AUTOGENERATE_EVAL); |
23 | 23 | $config->setMetadataDriverImpl( |
24 | 24 | $config->newDefaultAnnotationDriver([ |
25 | - realpath(__DIR__ . '/Models/Cache'), |
|
26 | - realpath(__DIR__ . '/Models/GeoNames'), |
|
25 | + realpath(__DIR__.'/Models/Cache'), |
|
26 | + realpath(__DIR__.'/Models/GeoNames'), |
|
27 | 27 | ]) |
28 | 28 | ); |
29 | 29 |
@@ -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\Performance\Hydration; |
6 | 6 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | 'u__status' => 'developer', |
70 | 70 | 'u__username' => 'jwage', |
71 | 71 | 'u__name' => 'Jonathan', |
72 | - 'sclr0' => 'JWAGE' . $i, |
|
72 | + 'sclr0' => 'JWAGE'.$i, |
|
73 | 73 | 'p__phonenumber' => '91', |
74 | 74 | ]; |
75 | 75 | } |
@@ -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\Performance\Hydration; |
6 | 6 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'u__status' => 'developer', |
55 | 55 | 'u__username' => 'jwage', |
56 | 56 | 'u__name' => 'Jonathan', |
57 | - 'sclr0' => 'JWAGE' . $i, |
|
57 | + 'sclr0' => 'JWAGE'.$i, |
|
58 | 58 | 'p__phonenumber' => '91', |
59 | 59 | 'a__id' => $i, |
60 | 60 | ]; |
@@ -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 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | protected function loadDriver() |
21 | 21 | { |
22 | - return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml'); |
|
22 | + return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml'); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | public function testClassTableInheritanceDiscriminatorMap() |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function testValidateXmlSchema($xmlMappingFile) |
164 | 164 | { |
165 | - $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd'; |
|
165 | + $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd'; |
|
166 | 166 | $dom = new \DOMDocument('UTF-8'); |
167 | 167 | |
168 | 168 | $dom->load($xmlMappingFile); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | |
173 | 173 | public static function dataValidSchema() |
174 | 174 | { |
175 | - $list = glob(__DIR__ . '/xml/*.xml'); |
|
175 | + $list = glob(__DIR__.'/xml/*.xml'); |
|
176 | 176 | $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm']; |
177 | 177 | |
178 | 178 | $list = array_filter($list, function($item) use ($invalid) { |
@@ -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; |
6 | 6 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | |
235 | 235 | self::assertSame(__CLASS__, $this->configuration->getCustomHydrationMode('HydrationModeName')); |
236 | 236 | |
237 | - $this->configuration->setCustomHydrationModes(['AnotherHydrationModeName' => __CLASS__,]); |
|
237 | + $this->configuration->setCustomHydrationModes(['AnotherHydrationModeName' => __CLASS__, ]); |
|
238 | 238 | |
239 | 239 | self::assertNull($this->configuration->getCustomHydrationMode('HydrationModeName')); |
240 | 240 | self::assertSame(__CLASS__, $this->configuration->getCustomHydrationMode('AnotherHydrationModeName')); |