Total Complexity | 5 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | * @ORM\Entity |
||
11 | * @ORM\Table(name="DDC2084_ENTITY1") |
||
12 | */ |
||
13 | class MyEntity1 |
||
14 | { |
||
15 | /** |
||
16 | * @ORM\Id |
||
17 | * @ORM\OneToOne(targetEntity=MyEntity2::class) |
||
18 | * @ORM\JoinColumn(name="entity2_id", referencedColumnName="id", nullable=false) |
||
19 | */ |
||
20 | private $entity2; |
||
21 | |||
22 | public function __construct(MyEntity2 $myEntity2) |
||
23 | { |
||
24 | $this->entity2 = $myEntity2; |
||
25 | } |
||
26 | |||
27 | public function setMyEntity2(MyEntity2 $myEntity2) |
||
28 | { |
||
29 | $this->entity2 = $myEntity2; |
||
30 | } |
||
31 | |||
32 | public function getMyEntity2() |
||
35 | } |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @ORM\Entity |
||
40 | * @ORM\Table(name="DDC2084_ENTITY2") |
||
41 | */ |
||
42 | class MyEntity2 |
||
43 | { |
||
44 | /** |
||
45 | * @ORM\Id |
||
46 | * @ORM\Column(type="integer") |
||
47 | * @ORM\GeneratedValue(strategy="AUTO") |
||
48 | */ |
||
49 | private $id; |
||
50 | |||
51 | /** |
||
52 | * @ORM\Column |
||
53 | */ |
||
54 | private $value; |
||
55 | |||
56 | public function __construct($value) |
||
59 | } |
||
60 | |||
61 | public function getId() |
||
76 |