@@ -3,7 +3,7 @@ |
||
3 | 3 | use Doctrine\ORM\Mapping\ClassMetadataInfo; |
4 | 4 | |
5 | 5 | $metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_JOINED); |
6 | -$metadata->setTableName( 'company_contracts'); |
|
6 | +$metadata->setTableName('company_contracts'); |
|
7 | 7 | $metadata->setDiscriminatorColumn( |
8 | 8 | [ |
9 | 9 | 'name' => 'discr', |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | $metadata->mapField( |
6 | 6 | [ |
7 | - 'id' => true, |
|
8 | - 'fieldName' => 'id', |
|
9 | - 'type' => 'integer', |
|
10 | - 'columnName' => 'id', |
|
7 | + 'id' => true, |
|
8 | + 'fieldName' => 'id', |
|
9 | + 'type' => 'integer', |
|
10 | + 'columnName' => 'id', |
|
11 | 11 | ] |
12 | 12 | ); |
13 | 13 |
@@ -4,8 +4,8 @@ |
||
4 | 4 | |
5 | 5 | $metadata->mapField( |
6 | 6 | [ |
7 | - 'id' => true, |
|
8 | - 'fieldName' => 'id', |
|
7 | + 'id' => true, |
|
8 | + 'fieldName' => 'id', |
|
9 | 9 | ] |
10 | 10 | ); |
11 | 11 |
@@ -4,9 +4,9 @@ |
||
4 | 4 | |
5 | 5 | $metadata->mapField( |
6 | 6 | [ |
7 | - 'id' => true, |
|
8 | - 'fieldName' => 'id', |
|
9 | - 'columnDefinition' => 'INT unsigned NOT NULL', |
|
7 | + 'id' => true, |
|
8 | + 'fieldName' => 'id', |
|
9 | + 'columnDefinition' => 'INT unsigned NOT NULL', |
|
10 | 10 | ] |
11 | 11 | ); |
12 | 12 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | $metadata->mapField( |
3 | 3 | [ |
4 | - 'fieldName' => 'creditCardNumber', |
|
5 | - 'type' => 'string', |
|
4 | + 'fieldName' => 'creditCardNumber', |
|
5 | + 'type' => 'string', |
|
6 | 6 | ] |
7 | 7 | ); |
@@ -18,32 +18,32 @@ discard block |
||
18 | 18 | |
19 | 19 | $metadata->mapField( |
20 | 20 | [ |
21 | - 'fieldName' => 'id', |
|
22 | - 'type' => 'integer', |
|
23 | - 'id' => true, |
|
21 | + 'fieldName' => 'id', |
|
22 | + 'type' => 'integer', |
|
23 | + 'id' => true, |
|
24 | 24 | ] |
25 | 25 | ); |
26 | 26 | |
27 | 27 | $metadata->mapField( |
28 | 28 | [ |
29 | - 'fieldName' => 'name', |
|
30 | - 'type' => 'string', |
|
29 | + 'fieldName' => 'name', |
|
30 | + 'type' => 'string', |
|
31 | 31 | ] |
32 | 32 | ); |
33 | 33 | |
34 | 34 | |
35 | 35 | $metadata->mapOneToOne( |
36 | 36 | [ |
37 | - 'fieldName' => 'state', |
|
38 | - 'targetEntity' => State::class, |
|
39 | - 'inversedBy' => 'cities', |
|
40 | - 'joinColumns' => |
|
41 | - [ |
|
42 | - [ |
|
37 | + 'fieldName' => 'state', |
|
38 | + 'targetEntity' => State::class, |
|
39 | + 'inversedBy' => 'cities', |
|
40 | + 'joinColumns' => |
|
41 | + [ |
|
42 | + [ |
|
43 | 43 | 'name' => 'state_id', |
44 | 44 | 'referencedColumnName' => 'id', |
45 | - ] |
|
46 | - ] |
|
45 | + ] |
|
46 | + ] |
|
47 | 47 | ] |
48 | 48 | ); |
49 | 49 | $metadata->enableAssociationCache('state', [ |
@@ -53,18 +53,18 @@ discard block |
||
53 | 53 | |
54 | 54 | $metadata->mapManyToMany( |
55 | 55 | [ |
56 | - 'fieldName' => 'travels', |
|
57 | - 'targetEntity' => Travel::class, |
|
58 | - 'mappedBy' => 'visitedCities', |
|
56 | + 'fieldName' => 'travels', |
|
57 | + 'targetEntity' => Travel::class, |
|
58 | + 'mappedBy' => 'visitedCities', |
|
59 | 59 | ] |
60 | 60 | ); |
61 | 61 | |
62 | 62 | $metadata->mapOneToMany( |
63 | 63 | [ |
64 | - 'fieldName' => 'attractions', |
|
65 | - 'targetEntity' => Attraction::class, |
|
66 | - 'mappedBy' => 'city', |
|
67 | - 'orderBy' => ['name' => 'ASC',], |
|
64 | + 'fieldName' => 'attractions', |
|
65 | + 'targetEntity' => Attraction::class, |
|
66 | + 'mappedBy' => 'city', |
|
67 | + 'orderBy' => ['name' => 'ASC',], |
|
68 | 68 | ] |
69 | 69 | ); |
70 | 70 | $metadata->enableAssociationCache('attractions', [ |
@@ -64,7 +64,7 @@ |
||
64 | 64 | 'fieldName' => 'attractions', |
65 | 65 | 'targetEntity' => Attraction::class, |
66 | 66 | 'mappedBy' => 'city', |
67 | - 'orderBy' => ['name' => 'ASC',], |
|
67 | + 'orderBy' => ['name' => 'ASC', ], |
|
68 | 68 | ] |
69 | 69 | ); |
70 | 70 | $metadata->enableAssociationCache('attractions', [ |
@@ -5,16 +5,16 @@ |
||
5 | 5 | |
6 | 6 | $metadata->mapField( |
7 | 7 | [ |
8 | - 'id' => true, |
|
9 | - 'fieldName' => 'id', |
|
10 | - 'type' => 'integer', |
|
11 | - 'columnName' => 'id', |
|
8 | + 'id' => true, |
|
9 | + 'fieldName' => 'id', |
|
10 | + 'type' => 'integer', |
|
11 | + 'columnName' => 'id', |
|
12 | 12 | ] |
13 | 13 | ); |
14 | 14 | $metadata->mapField( |
15 | 15 | [ |
16 | - 'fieldName' => 'value', |
|
17 | - 'type' => 'float', |
|
16 | + 'fieldName' => 'value', |
|
17 | + 'type' => 'float', |
|
18 | 18 | ] |
19 | 19 | ); |
20 | 20 | $metadata->isMappedSuperclass = true; |
@@ -3,10 +3,10 @@ |
||
3 | 3 | use Doctrine\ORM\Mapping\ClassMetadata; |
4 | 4 | |
5 | 5 | $metadata->mapField([ |
6 | - 'id' => true, |
|
7 | - 'fieldName' => 'id', |
|
8 | - 'type' => 'integer', |
|
9 | - 'columnName' => 'id', |
|
6 | + 'id' => true, |
|
7 | + 'fieldName' => 'id', |
|
8 | + 'type' => 'integer', |
|
9 | + 'columnName' => 'id', |
|
10 | 10 | ]); |
11 | 11 | |
12 | 12 | $metadata->mapManyToMany([ |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | $metadata->mapField( |
3 | 3 | [ |
4 | - 'fieldName' => 'serialNumber', |
|
5 | - 'type' => 'string', |
|
4 | + 'fieldName' => 'serialNumber', |
|
5 | + 'type' => 'string', |
|
6 | 6 | ] |
7 | 7 | ); |