Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class ProductComment |
||
12 | { |
||
13 | /** |
||
14 | * @ORM\Id |
||
15 | * @ORM\GeneratedValue |
||
16 | * @ORM\Column(type="integer") |
||
17 | */ |
||
18 | private $id; |
||
19 | |||
20 | /** |
||
21 | * @ORM\Column(type="string", length=255) |
||
22 | */ |
||
23 | private $body; |
||
24 | |||
25 | /** |
||
26 | * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="comments") |
||
27 | * @ORM\JoinColumn(nullable=false, onDelete="CASCADE") |
||
28 | */ |
||
29 | private $product; |
||
30 | |||
31 | public function __construct(Product $product, string $body) |
||
35 | } |
||
36 | |||
37 | public function getId(): ?int |
||
38 | { |
||
39 | return $this->id; |
||
40 | } |
||
41 | |||
42 | public function getProduct(): Product |
||
43 | { |
||
44 | return $this->product; |
||
45 | } |
||
46 | |||
47 | public function getBody(): string |
||
50 | } |
||
51 | } |
||
52 |