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