Total Complexity | 5 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | #[ORM\Entity(repositoryClass: ProductRepository::class)] |
||
12 | class Product |
||
13 | { |
||
14 | #[ORM\Id] |
||
15 | #[ORM\GeneratedValue] |
||
16 | #[ORM\Column] |
||
17 | private ?int $id = null; |
||
18 | |||
19 | #[ORM\Column(length: 255)] |
||
20 | private ?string $name = null; |
||
21 | |||
22 | #[ORM\Column] |
||
23 | private ?int $value = null; |
||
24 | |||
25 | /** |
||
26 | * Get the id for the product. |
||
27 | */ |
||
28 | 1 | public function getId(): ?int |
|
29 | { |
||
30 | 1 | return $this->id; |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * Get the name for the product. |
||
35 | */ |
||
36 | 1 | public function getName(): ?string |
|
37 | { |
||
38 | 1 | return $this->name; |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * Set the name for the product. |
||
43 | */ |
||
44 | 1 | public function setName(string $name): static |
|
45 | { |
||
46 | 1 | $this->name = $name; |
|
47 | |||
48 | 1 | return $this; |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * Get the value for the product. |
||
53 | */ |
||
54 | 1 | public function getValue(): ?int |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * Set the value for the product. |
||
61 | */ |
||
62 | 1 | public function setValue(int $value): static |
|
67 | } |
||
68 | } |
||
69 |