Total Complexity | 7 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class Brand |
||
14 | { |
||
15 | /** |
||
16 | * @ORM\Id |
||
17 | * @ORM\GeneratedValue |
||
18 | * @ORM\Column(type="integer") |
||
19 | */ |
||
20 | private $id; |
||
21 | |||
22 | /** |
||
23 | * @ORM\Column(type="integer", nullable=true) |
||
24 | */ |
||
25 | private $prePersistedId; |
||
26 | |||
27 | /** |
||
28 | * @ORM\Column(type="string", length=255) |
||
29 | */ |
||
30 | private $name; |
||
31 | |||
32 | /** |
||
33 | * @ORM\OneToMany(targetEntity=Product::class, mappedBy="brand") |
||
34 | */ |
||
35 | private $products; |
||
36 | |||
37 | public function __construct() |
||
38 | { |
||
39 | $this->products = new ArrayCollection(); |
||
40 | } |
||
41 | |||
42 | public function getId(): ?int |
||
45 | } |
||
46 | |||
47 | public function getPrePersistedId(): ?int |
||
50 | } |
||
51 | |||
52 | public function setPrePersistedId(?int $prePersistedId): void |
||
55 | } |
||
56 | |||
57 | public function getName(): ?string |
||
60 | } |
||
61 | |||
62 | public function setName(?string $name): void |
||
63 | { |
||
64 | $this->name = $name; |
||
65 | } |
||
66 | |||
67 | public function getProducts(): Collection |
||
70 | } |
||
71 | } |
||
72 |