Total Complexity | 8 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | #[ORM\Entity(repositoryClass: PermissionRepository::class)] |
||
16 | #[ORM\Table(name: 'permissions')] |
||
17 | class Permission implements Stringable |
||
18 | { |
||
19 | #[ORM\Id] |
||
20 | #[ORM\GeneratedValue(strategy: 'AUTO')] |
||
21 | #[ORM\Column(type: 'integer')] |
||
22 | private ?int $id = null; |
||
23 | |||
24 | #[Assert\NotBlank] |
||
25 | #[ORM\Column(type: 'string', length: 255)] |
||
26 | private string $title; |
||
27 | |||
28 | #[Assert\NotBlank] |
||
29 | #[ORM\Column(type: 'string', length: 255, unique: true)] |
||
30 | private string $slug; |
||
31 | |||
32 | #[ORM\Column(type: 'text', nullable: true)] |
||
33 | private ?string $description = null; |
||
34 | |||
35 | public function getId(): ?int |
||
36 | { |
||
37 | return $this->id; |
||
38 | } |
||
39 | |||
40 | public function getTitle(): string |
||
41 | { |
||
42 | return $this->title; |
||
43 | } |
||
44 | |||
45 | public function setTitle(string $title): self |
||
46 | { |
||
47 | $this->title = $title; |
||
48 | return $this; |
||
49 | } |
||
50 | |||
51 | public function getSlug(): string |
||
52 | { |
||
53 | return $this->slug; |
||
54 | } |
||
55 | |||
56 | public function setSlug(string $slug): self |
||
60 | } |
||
61 | |||
62 | public function getDescription(): ?string |
||
63 | { |
||
64 | return $this->description; |
||
65 | } |
||
66 | |||
67 | public function setDescription(?string $description): self |
||
71 | } |
||
72 | |||
73 | public function __toString(): string |
||
76 | } |
||
77 | } |
||
78 |