| Total Complexity | 6 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | #[Auditable] |
||
| 13 | #[ORM\Entity] |
||
| 14 | class DocumentCategory { |
||
| 15 | |||
| 16 | use IdTrait; |
||
| 17 | use UuidTrait; |
||
| 18 | |||
| 19 | #[Assert\NotBlank] |
||
| 20 | #[Assert\NotNull] |
||
| 21 | #[ORM\Column(type: 'string')] |
||
| 22 | private ?string $name = null; |
||
| 23 | |||
| 24 | #[ORM\Column(type: 'string', nullable: true)] |
||
| 25 | #[Assert\NotBlank(allowNull: true)] |
||
| 26 | private ?string $icon = null; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var ArrayCollection<Document> |
||
| 30 | */ |
||
| 31 | #[ORM\OneToMany(mappedBy: 'category', targetEntity: Document::class)] |
||
| 32 | private $documents; |
||
| 33 | |||
| 34 | public function __construct() { |
||
| 37 | 3 | } |
|
| 38 | 3 | ||
| 39 | /** |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function getName(): ?string { |
||
| 44 | 1 | } |
|
| 45 | |||
| 46 | public function setName(?string $name): DocumentCategory { |
||
| 49 | } |
||
| 50 | |||
| 51 | 2 | /** |
|
| 52 | 2 | * @return string|null |
|
| 53 | 2 | */ |
|
| 54 | public function getIcon(): ?string { |
||
| 55 | return $this->icon; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | 1 | * @param string|null $icon |
|
| 60 | 1 | * @return DocumentCategory |
|
| 61 | */ |
||
| 62 | public function setIcon(?string $icon): DocumentCategory { |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return Collection<Document> |
||
| 69 | */ |
||
| 70 | public function getDocuments(): Collection { |
||
| 72 | } |
||
| 73 | |||
| 74 | } |