| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class Category |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @ORM\Id |
||
| 17 | * @ORM\GeneratedValue |
||
| 18 | * @ORM\Column(type="integer") |
||
| 19 | */ |
||
| 20 | private $id; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @ORM\Column(type="string", length=255) |
||
| 24 | */ |
||
| 25 | private $name; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @ORM\ManyToMany(targetEntity=Product::class, inversedBy="categories") |
||
| 29 | */ |
||
| 30 | private $products; |
||
| 31 | |||
| 32 | public function __construct() |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getId(): ?int |
||
| 38 | { |
||
| 39 | return $this->id; |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getName(): ?string |
||
| 43 | { |
||
| 44 | return $this->name; |
||
| 45 | } |
||
| 46 | |||
| 47 | public function setName(?string $name): void |
||
| 48 | { |
||
| 49 | $this->name = $name; |
||
| 50 | } |
||
| 51 | |||
| 52 | public function getProducts(): Collection |
||
| 55 | } |
||
| 56 | } |
||
| 57 |