@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | |
5 | 5 | $metadata->mapField( |
6 | 6 | [ |
7 | - 'id' => true, |
|
8 | - 'fieldName' => 'id', |
|
9 | - 'type' => 'integer', |
|
10 | - 'columnName' => 'user_id', |
|
11 | - 'length' => 150, |
|
7 | + 'id' => true, |
|
8 | + 'fieldName' => 'id', |
|
9 | + 'type' => 'integer', |
|
10 | + 'columnName' => 'user_id', |
|
11 | + 'length' => 150, |
|
12 | 12 | ] |
13 | 13 | ); |
14 | 14 | $metadata->mapField( |
@@ -24,20 +24,20 @@ discard block |
||
24 | 24 | |
25 | 25 | $metadata->mapManyToOne( |
26 | 26 | [ |
27 | - 'fieldName' => 'address', |
|
28 | - 'targetEntity' => 'DDC964Address', |
|
29 | - 'cascade' => ['persist','merge'], |
|
30 | - 'joinColumn' => ['name'=>'address_id', 'referencedColumnMame'=>'id'], |
|
27 | + 'fieldName' => 'address', |
|
28 | + 'targetEntity' => 'DDC964Address', |
|
29 | + 'cascade' => ['persist','merge'], |
|
30 | + 'joinColumn' => ['name'=>'address_id', 'referencedColumnMame'=>'id'], |
|
31 | 31 | ] |
32 | 32 | ); |
33 | 33 | |
34 | 34 | $metadata->mapManyToMany( |
35 | 35 | [ |
36 | - 'fieldName' => 'groups', |
|
37 | - 'targetEntity' => 'DDC964Group', |
|
38 | - 'inversedBy' => 'users', |
|
39 | - 'cascade' => ['persist','merge','detach'], |
|
40 | - 'joinTable' => [ |
|
36 | + 'fieldName' => 'groups', |
|
37 | + 'targetEntity' => 'DDC964Group', |
|
38 | + 'inversedBy' => 'users', |
|
39 | + 'cascade' => ['persist','merge','detach'], |
|
40 | + 'joinTable' => [ |
|
41 | 41 | 'name' => 'ddc964_users_groups', |
42 | 42 | 'joinColumns' => [ |
43 | 43 | [ |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | 'referencedColumnName'=>'id', |
52 | 52 | ] |
53 | 53 | ] |
54 | - ] |
|
54 | + ] |
|
55 | 55 | ] |
56 | 56 | ); |
57 | 57 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | [ |
27 | 27 | 'fieldName' => 'address', |
28 | 28 | 'targetEntity' => 'DDC964Address', |
29 | - 'cascade' => ['persist','merge'], |
|
29 | + 'cascade' => ['persist', 'merge'], |
|
30 | 30 | 'joinColumn' => ['name'=>'address_id', 'referencedColumnMame'=>'id'], |
31 | 31 | ] |
32 | 32 | ); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'fieldName' => 'groups', |
37 | 37 | 'targetEntity' => 'DDC964Group', |
38 | 38 | 'inversedBy' => 'users', |
39 | - 'cascade' => ['persist','merge','detach'], |
|
39 | + 'cascade' => ['persist', 'merge', 'detach'], |
|
40 | 40 | 'joinTable' => [ |
41 | 41 | 'name' => 'ddc964_users_groups', |
42 | 42 | 'joinColumns' => [ |
@@ -8,30 +8,30 @@ |
||
8 | 8 | $metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_SINGLE_TABLE); |
9 | 9 | $metadata->setDiscriminatorColumn( |
10 | 10 | [ |
11 | - 'name' => 'dtype', |
|
12 | - 'type' => 'string', |
|
13 | - 'length' => 255, |
|
14 | - 'fieldName' => 'dtype', |
|
11 | + 'name' => 'dtype', |
|
12 | + 'type' => 'string', |
|
13 | + 'length' => 255, |
|
14 | + 'fieldName' => 'dtype', |
|
15 | 15 | ] |
16 | 16 | ); |
17 | 17 | $metadata->setDiscriminatorMap( |
18 | 18 | [ |
19 | - 'cat' => Cat::class, |
|
20 | - 'dog' => Dog::class, |
|
19 | + 'cat' => Cat::class, |
|
20 | + 'dog' => Dog::class, |
|
21 | 21 | ] |
22 | 22 | ); |
23 | 23 | $metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT); |
24 | 24 | $metadata->mapField( |
25 | 25 | [ |
26 | - 'fieldName' => 'id', |
|
27 | - 'type' => 'string', |
|
28 | - 'length' => NULL, |
|
29 | - 'precision' => 0, |
|
30 | - 'scale' => 0, |
|
31 | - 'nullable' => false, |
|
32 | - 'unique' => false, |
|
33 | - 'id' => true, |
|
34 | - 'columnName' => 'id', |
|
26 | + 'fieldName' => 'id', |
|
27 | + 'type' => 'string', |
|
28 | + 'length' => NULL, |
|
29 | + 'precision' => 0, |
|
30 | + 'scale' => 0, |
|
31 | + 'nullable' => false, |
|
32 | + 'unique' => false, |
|
33 | + 'id' => true, |
|
34 | + 'columnName' => 'id', |
|
35 | 35 | ] |
36 | 36 | ); |
37 | 37 | $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_CUSTOM); |
@@ -5,9 +5,9 @@ |
||
5 | 5 | $metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_NONE); |
6 | 6 | $metadata->setPrimaryTable( |
7 | 7 | [ |
8 | - 'indexes' => [ |
|
9 | - ['columns' => ['content'], 'flags' => ['fulltext'], 'options'=> ['where' => 'content IS NOT NULL']] |
|
10 | - ] |
|
8 | + 'indexes' => [ |
|
9 | + ['columns' => ['content'], 'flags' => ['fulltext'], 'options'=> ['where' => 'content IS NOT NULL']] |
|
10 | + ] |
|
11 | 11 | ] |
12 | 12 | ); |
13 | 13 |
@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | |
5 | 5 | $metadata->mapField( |
6 | 6 | [ |
7 | - 'id' => true, |
|
8 | - 'fieldName' => 'id', |
|
9 | - 'type' => 'integer', |
|
10 | - 'columnName' => 'user_id', |
|
11 | - 'length' => 150, |
|
7 | + 'id' => true, |
|
8 | + 'fieldName' => 'id', |
|
9 | + 'type' => 'integer', |
|
10 | + 'columnName' => 'user_id', |
|
11 | + 'length' => 150, |
|
12 | 12 | ] |
13 | 13 | ); |
14 | 14 | |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | |
26 | 26 | $metadata->mapManyToMany( |
27 | 27 | [ |
28 | - 'fieldName' => 'groups', |
|
29 | - 'targetEntity' => 'DDC3579Group' |
|
28 | + 'fieldName' => 'groups', |
|
29 | + 'targetEntity' => 'DDC3579Group' |
|
30 | 30 | ] |
31 | 31 | ); |
32 | 32 |
@@ -266,10 +266,10 @@ discard block |
||
266 | 266 | { |
267 | 267 | $this->assertIsFluent( |
268 | 268 | $this->builder->createManyToOne('groups', CmsGroup::class) |
269 | - ->addJoinColumn('group_id', 'id', true, false, 'CASCADE') |
|
270 | - ->cascadeAll() |
|
271 | - ->fetchExtraLazy() |
|
272 | - ->build() |
|
269 | + ->addJoinColumn('group_id', 'id', true, false, 'CASCADE') |
|
270 | + ->cascadeAll() |
|
271 | + ->fetchExtraLazy() |
|
272 | + ->build() |
|
273 | 273 | ); |
274 | 274 | |
275 | 275 | $this->assertEquals( |
@@ -278,23 +278,23 @@ discard block |
||
278 | 278 | 'fieldName' => 'groups', |
279 | 279 | 'targetEntity' => CmsGroup::class, |
280 | 280 | 'cascade' => [ |
281 | - 0 => 'remove', |
|
282 | - 1 => 'persist', |
|
283 | - 2 => 'refresh', |
|
284 | - 3 => 'merge', |
|
285 | - 4 => 'detach', |
|
281 | + 0 => 'remove', |
|
282 | + 1 => 'persist', |
|
283 | + 2 => 'refresh', |
|
284 | + 3 => 'merge', |
|
285 | + 4 => 'detach', |
|
286 | 286 | ], |
287 | 287 | 'fetch' => 4, |
288 | 288 | 'joinColumns' => [ |
289 | - 0 => |
|
290 | - [ |
|
289 | + 0 => |
|
290 | + [ |
|
291 | 291 | 'name' => 'group_id', |
292 | 292 | 'referencedColumnName' => 'id', |
293 | 293 | 'nullable' => true, |
294 | 294 | 'unique' => false, |
295 | 295 | 'onDelete' => 'CASCADE', |
296 | 296 | 'columnDefinition' => NULL, |
297 | - ], |
|
297 | + ], |
|
298 | 298 | ], |
299 | 299 | 'type' => 2, |
300 | 300 | 'mappedBy' => NULL, |
@@ -308,15 +308,15 @@ discard block |
||
308 | 308 | 'isCascadeDetach' => true, |
309 | 309 | 'sourceToTargetKeyColumns' => |
310 | 310 | [ |
311 | - 'group_id' => 'id', |
|
311 | + 'group_id' => 'id', |
|
312 | 312 | ], |
313 | 313 | 'joinColumnFieldNames' => |
314 | 314 | [ |
315 | - 'group_id' => 'group_id', |
|
315 | + 'group_id' => 'group_id', |
|
316 | 316 | ], |
317 | 317 | 'targetToSourceKeyColumns' => |
318 | 318 | [ |
319 | - 'id' => 'group_id', |
|
319 | + 'id' => 'group_id', |
|
320 | 320 | ], |
321 | 321 | 'orphanRemoval' => false, |
322 | 322 | ], |
@@ -394,10 +394,10 @@ discard block |
||
394 | 394 | { |
395 | 395 | $this->assertIsFluent( |
396 | 396 | $this->builder->createOneToOne('groups', CmsGroup::class) |
397 | - ->addJoinColumn('group_id', 'id', true, false, 'CASCADE') |
|
398 | - ->cascadeAll() |
|
399 | - ->fetchExtraLazy() |
|
400 | - ->build() |
|
397 | + ->addJoinColumn('group_id', 'id', true, false, 'CASCADE') |
|
398 | + ->cascadeAll() |
|
399 | + ->fetchExtraLazy() |
|
400 | + ->build() |
|
401 | 401 | ); |
402 | 402 | |
403 | 403 | $this->assertEquals( |
@@ -406,23 +406,23 @@ discard block |
||
406 | 406 | 'fieldName' => 'groups', |
407 | 407 | 'targetEntity' => CmsGroup::class, |
408 | 408 | 'cascade' => [ |
409 | - 0 => 'remove', |
|
410 | - 1 => 'persist', |
|
411 | - 2 => 'refresh', |
|
412 | - 3 => 'merge', |
|
413 | - 4 => 'detach', |
|
409 | + 0 => 'remove', |
|
410 | + 1 => 'persist', |
|
411 | + 2 => 'refresh', |
|
412 | + 3 => 'merge', |
|
413 | + 4 => 'detach', |
|
414 | 414 | ], |
415 | 415 | 'fetch' => 4, |
416 | 416 | 'joinColumns' => [ |
417 | - 0 => |
|
418 | - [ |
|
417 | + 0 => |
|
418 | + [ |
|
419 | 419 | 'name' => 'group_id', |
420 | 420 | 'referencedColumnName' => 'id', |
421 | 421 | 'nullable' => true, |
422 | 422 | 'unique' => true, |
423 | 423 | 'onDelete' => 'CASCADE', |
424 | 424 | 'columnDefinition' => NULL, |
425 | - ], |
|
425 | + ], |
|
426 | 426 | ], |
427 | 427 | 'type' => 1, |
428 | 428 | 'mappedBy' => NULL, |
@@ -436,15 +436,15 @@ discard block |
||
436 | 436 | 'isCascadeDetach' => true, |
437 | 437 | 'sourceToTargetKeyColumns' => |
438 | 438 | [ |
439 | - 'group_id' => 'id', |
|
439 | + 'group_id' => 'id', |
|
440 | 440 | ], |
441 | 441 | 'joinColumnFieldNames' => |
442 | 442 | [ |
443 | - 'group_id' => 'group_id', |
|
443 | + 'group_id' => 'group_id', |
|
444 | 444 | ], |
445 | 445 | 'targetToSourceKeyColumns' => |
446 | 446 | [ |
447 | - 'id' => 'group_id', |
|
447 | + 'id' => 'group_id', |
|
448 | 448 | ], |
449 | 449 | 'orphanRemoval' => false |
450 | 450 | ], |
@@ -535,12 +535,12 @@ discard block |
||
535 | 535 | { |
536 | 536 | $this->assertIsFluent( |
537 | 537 | $this->builder->createManyToMany('groups', CmsGroup::class) |
538 | - ->setJoinTable('groups_users') |
|
539 | - ->addJoinColumn('group_id', 'id', true, false, 'CASCADE') |
|
540 | - ->addInverseJoinColumn('user_id', 'id') |
|
541 | - ->cascadeAll() |
|
542 | - ->fetchExtraLazy() |
|
543 | - ->build() |
|
538 | + ->setJoinTable('groups_users') |
|
539 | + ->addJoinColumn('group_id', 'id', true, false, 'CASCADE') |
|
540 | + ->addInverseJoinColumn('user_id', 'id') |
|
541 | + ->cascadeAll() |
|
542 | + ->fetchExtraLazy() |
|
543 | + ->build() |
|
544 | 544 | ); |
545 | 545 | |
546 | 546 | $this->assertEquals( |
@@ -620,13 +620,13 @@ discard block |
||
620 | 620 | $this->expectException(\Doctrine\ORM\Mapping\MappingException::class); |
621 | 621 | |
622 | 622 | $this->builder->createManyToMany('groups', CmsGroup::class) |
623 | - ->makePrimaryKey() |
|
624 | - ->setJoinTable('groups_users') |
|
625 | - ->addJoinColumn('group_id', 'id', true, false, 'CASCADE') |
|
626 | - ->addInverseJoinColumn('user_id', 'id') |
|
627 | - ->cascadeAll() |
|
628 | - ->fetchExtraLazy() |
|
629 | - ->build(); |
|
623 | + ->makePrimaryKey() |
|
624 | + ->setJoinTable('groups_users') |
|
625 | + ->addJoinColumn('group_id', 'id', true, false, 'CASCADE') |
|
626 | + ->addInverseJoinColumn('user_id', 'id') |
|
627 | + ->cascadeAll() |
|
628 | + ->fetchExtraLazy() |
|
629 | + ->build(); |
|
630 | 630 | } |
631 | 631 | |
632 | 632 | public function testCreateOneToMany() |
@@ -699,15 +699,15 @@ discard block |
||
699 | 699 | 'cascade' => [], |
700 | 700 | 'fetch' => 2, |
701 | 701 | 'joinColumns' => [ |
702 | - 0 => |
|
703 | - [ |
|
702 | + 0 => |
|
703 | + [ |
|
704 | 704 | 'name' => 'group_id', |
705 | 705 | 'referencedColumnName' => 'id', |
706 | 706 | 'nullable' => true, |
707 | 707 | 'unique' => true, |
708 | 708 | 'onDelete' => 'CASCADE', |
709 | 709 | 'columnDefinition' => NULL, |
710 | - ], |
|
710 | + ], |
|
711 | 711 | ], |
712 | 712 | 'type' => 1, |
713 | 713 | 'mappedBy' => NULL, |
@@ -721,15 +721,15 @@ discard block |
||
721 | 721 | 'isCascadeDetach' => false, |
722 | 722 | 'sourceToTargetKeyColumns' => |
723 | 723 | [ |
724 | - 'group_id' => 'id', |
|
724 | + 'group_id' => 'id', |
|
725 | 725 | ], |
726 | 726 | 'joinColumnFieldNames' => |
727 | 727 | [ |
728 | - 'group_id' => 'group_id', |
|
728 | + 'group_id' => 'group_id', |
|
729 | 729 | ], |
730 | 730 | 'targetToSourceKeyColumns' => |
731 | 731 | [ |
732 | - 'id' => 'group_id', |
|
732 | + 'id' => 'group_id', |
|
733 | 733 | ], |
734 | 734 | 'orphanRemoval' => true |
735 | 735 | ], |
@@ -45,15 +45,15 @@ |
||
45 | 45 | ->getProperties(ClassWithMixedProperties::class); |
46 | 46 | |
47 | 47 | $this->assertArrayHasKey( |
48 | - "\0" . ClassWithMixedProperties::class . "\0" . 'privateProperty', |
|
48 | + "\0".ClassWithMixedProperties::class."\0".'privateProperty', |
|
49 | 49 | $properties |
50 | 50 | ); |
51 | 51 | $this->assertArrayHasKey( |
52 | - "\0" . ClassWithMixedProperties::class . "\0" . 'privatePropertyOverride', |
|
52 | + "\0".ClassWithMixedProperties::class."\0".'privatePropertyOverride', |
|
53 | 53 | $properties |
54 | 54 | ); |
55 | 55 | $this->assertArrayHasKey( |
56 | - "\0" . ParentClass::class . "\0" . 'privatePropertyOverride', |
|
56 | + "\0".ParentClass::class."\0".'privatePropertyOverride', |
|
57 | 57 | $properties |
58 | 58 | ); |
59 | 59 | $this->assertArrayHasKey( |
@@ -130,7 +130,7 @@ |
||
130 | 130 | { |
131 | 131 | $this->expectException(MappingException::class); |
132 | 132 | $this->expectExceptionMessage( |
133 | - 'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map' |
|
133 | + 'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map' |
|
134 | 134 | . ' of \'Doctrine\Tests\ORM\Mapping\HierarchyBase\' to be properly mapped in the inheritance hierarchy.' |
135 | 135 | . ' Alternatively you can make \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' an abstract class to' |
136 | 136 | . ' avoid this exception from occurring.' |
@@ -19,7 +19,7 @@ |
||
19 | 19 | protected function setUp() |
20 | 20 | { |
21 | 21 | parent::setUp(); |
22 | - $this->resolver = new DefaultEntityListenerResolver(); |
|
22 | + $this->resolver = new DefaultEntityListenerResolver(); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | public function testResolve() |
@@ -1078,7 +1078,7 @@ |
||
1078 | 1078 | $this->expectExceptionMessage("You have specified invalid cascade options for " . CMS\CmsUser::class . "::\$address: 'invalid'; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'"); |
1079 | 1079 | |
1080 | 1080 | $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'UnknownClass', 'cascade' => ['invalid']]); |
1081 | - } |
|
1081 | + } |
|
1082 | 1082 | |
1083 | 1083 | /** |
1084 | 1084 | * @group DDC-964 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | use Doctrine\Tests\OrmTestCase; |
22 | 22 | use DoctrineGlobal_Article; |
23 | 23 | |
24 | -require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
24 | +require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
25 | 25 | |
26 | 26 | class ClassMetadataTest extends OrmTestCase |
27 | 27 | { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $this->assertEquals('phonenumbers', $oneOneMapping['fieldName']); |
72 | 72 | $this->assertEquals(CMS\CmsAddress::class, $oneOneMapping['targetEntity']); |
73 | 73 | $this->assertTrue($cm->isReadOnly); |
74 | - $this->assertEquals(['dql' => ['name'=>'dql','query'=>'foo','dql'=>'foo']], $cm->namedQueries); |
|
74 | + $this->assertEquals(['dql' => ['name'=>'dql', 'query'=>'foo', 'dql'=>'foo']], $cm->namedQueries); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | public function testFieldIsNullable() |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | { |
205 | 205 | $cm = new ClassMetadata(CMS\CmsUser::class); |
206 | 206 | $cm->initializeReflection(new RuntimeReflectionService()); |
207 | - $cm->isIdentifierComposite = true; |
|
207 | + $cm->isIdentifierComposite = true; |
|
208 | 208 | |
209 | 209 | $this->expectException(\Doctrine\ORM\Mapping\MappingException::class); |
210 | 210 | $cm->getSingleIdentifierFieldName(); |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | |
397 | 397 | $this->assertEquals('CMS_ADDRESS_CMS_USER', $manyToManyMetadata->associationMappings['user']['joinTable']['name']); |
398 | 398 | |
399 | - $this->assertEquals(['CMS_ADDRESS_ID','CMS_USER_ID'], $manyToManyMetadata->associationMappings['user']['joinTableColumns']); |
|
399 | + $this->assertEquals(['CMS_ADDRESS_ID', 'CMS_USER_ID'], $manyToManyMetadata->associationMappings['user']['joinTableColumns']); |
|
400 | 400 | $this->assertEquals(['CMS_ADDRESS_ID'=>'ID'], $manyToManyMetadata->associationMappings['user']['relationToSourceKeyColumns']); |
401 | 401 | $this->assertEquals(['CMS_USER_ID'=>'ID'], $manyToManyMetadata->associationMappings['user']['relationToTargetKeyColumns']); |
402 | 402 | |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | $cm->initializeReflection(new RuntimeReflectionService()); |
437 | 437 | |
438 | 438 | $this->expectException(MappingException::class); |
439 | - $this->expectExceptionMessage("No mapping found for field 'foo' on class '" . CMS\CmsUser::class . "'."); |
|
439 | + $this->expectExceptionMessage("No mapping found for field 'foo' on class '".CMS\CmsUser::class."'."); |
|
440 | 440 | |
441 | 441 | $cm->getFieldMapping('foo'); |
442 | 442 | } |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | public function testEmptyFieldNameThrowsException() |
547 | 547 | { |
548 | 548 | $this->expectException(MappingException::class); |
549 | - $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'."); |
|
549 | + $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'."); |
|
550 | 550 | |
551 | 551 | $cm = new ClassMetadata(CMS\CmsUser::class); |
552 | 552 | $cm->initializeReflection(new RuntimeReflectionService()); |
@@ -701,12 +701,12 @@ discard block |
||
701 | 701 | $mapping = $cm->getSqlResultSetMapping('find-all'); |
702 | 702 | |
703 | 703 | $this->assertEquals(CMS\CmsUser::class, $mapping['entities'][0]['entityClass']); |
704 | - $this->assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][0]['fields'][0]); |
|
705 | - $this->assertEquals(['name'=>'name','column'=>'name'], $mapping['entities'][0]['fields'][1]); |
|
704 | + $this->assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][0]['fields'][0]); |
|
705 | + $this->assertEquals(['name'=>'name', 'column'=>'name'], $mapping['entities'][0]['fields'][1]); |
|
706 | 706 | |
707 | 707 | $this->assertEquals(CMS\CmsEmail::class, $mapping['entities'][1]['entityClass']); |
708 | - $this->assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][1]['fields'][0]); |
|
709 | - $this->assertEquals(['name'=>'email','column'=>'email'], $mapping['entities'][1]['fields'][1]); |
|
708 | + $this->assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][1]['fields'][0]); |
|
709 | + $this->assertEquals(['name'=>'email', 'column'=>'email'], $mapping['entities'][1]['fields'][1]); |
|
710 | 710 | |
711 | 711 | $this->assertEquals('scalarColumn', $mapping['columns'][0]['name']); |
712 | 712 | } |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | $cm->addLifecycleCallback('notfound', 'postLoad'); |
922 | 922 | |
923 | 923 | $this->expectException(MappingException::class); |
924 | - $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback."); |
|
924 | + $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback."); |
|
925 | 925 | |
926 | 926 | $cm->validateLifecycleCallbacks(new RuntimeReflectionService()); |
927 | 927 | } |
@@ -936,7 +936,7 @@ discard block |
||
936 | 936 | $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'UnknownClass']); |
937 | 937 | |
938 | 938 | $this->expectException(MappingException::class); |
939 | - $this->expectExceptionMessage("The target-entity Doctrine\\Tests\\Models\\CMS\\UnknownClass cannot be found in '" . CMS\CmsUser::class . "#address'."); |
|
939 | + $this->expectExceptionMessage("The target-entity Doctrine\\Tests\\Models\\CMS\\UnknownClass cannot be found in '".CMS\CmsUser::class."#address'."); |
|
940 | 940 | |
941 | 941 | $cm->validateAssociations(); |
942 | 942 | } |
@@ -1075,7 +1075,7 @@ discard block |
||
1075 | 1075 | $cm->initializeReflection(new RuntimeReflectionService()); |
1076 | 1076 | |
1077 | 1077 | $this->expectException(MappingException::class); |
1078 | - $this->expectExceptionMessage("You have specified invalid cascade options for " . CMS\CmsUser::class . "::\$address: 'invalid'; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'"); |
|
1078 | + $this->expectExceptionMessage("You have specified invalid cascade options for ".CMS\CmsUser::class."::\$address: 'invalid'; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'"); |
|
1079 | 1079 | |
1080 | 1080 | $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'UnknownClass', 'cascade' => ['invalid']]); |
1081 | 1081 | } |
@@ -1320,7 +1320,7 @@ discard block |
||
1320 | 1320 | */ |
1321 | 1321 | public function propertyToColumnName($propertyName, $className = null) |
1322 | 1322 | { |
1323 | - return strtolower($this->classToTableName($className)) . '_' . $propertyName; |
|
1323 | + return strtolower($this->classToTableName($className)).'_'.$propertyName; |
|
1324 | 1324 | } |
1325 | 1325 | } |
1326 | 1326 |