Total Complexity | 7 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class Task |
||
15 | { |
||
16 | /** |
||
17 | * @ORM\Id |
||
18 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
19 | * @ORM\Column(type="integer") |
||
20 | * @Ignore() |
||
21 | */ |
||
22 | private int $id; |
||
|
|||
23 | |||
24 | /** |
||
25 | * @ORM\Column(type="string", length=255) |
||
26 | * @Assert\NotBlank(normalizer = "trim") |
||
27 | * @Groups({"request"}) |
||
28 | */ |
||
29 | private string $name; |
||
30 | |||
31 | /** |
||
32 | * @ORM\Column(type="text", nullable=true) |
||
33 | * @Groups({"request"}) |
||
34 | */ |
||
35 | private ?string $description = null; |
||
36 | |||
37 | /** |
||
38 | * @ORM\ManyToOne(targetEntity="ToDo", inversedBy="tasks") |
||
39 | * @ORM\JoinColumn(nullable=false) |
||
40 | * @Ignore() |
||
41 | */ |
||
42 | private ?ToDo $todo; |
||
43 | |||
44 | public function getId(): int |
||
45 | { |
||
46 | return $this->id; |
||
47 | } |
||
48 | |||
49 | public function getName(): string |
||
50 | { |
||
51 | return $this->name; |
||
52 | } |
||
53 | |||
54 | public function setName(string $name): self |
||
55 | { |
||
56 | $this->name = $name; |
||
57 | |||
58 | return $this; |
||
59 | } |
||
60 | |||
61 | public function getDescription(): ?string |
||
62 | { |
||
63 | return $this->description; |
||
64 | } |
||
65 | |||
66 | public function setDescription(?string $description): self |
||
67 | { |
||
68 | $this->description = $description; |
||
69 | |||
70 | return $this; |
||
71 | } |
||
72 | |||
73 | public function getTodo(): ?ToDo |
||
74 | { |
||
75 | return $this->todo; |
||
76 | } |
||
77 | |||
78 | public function setTodo(?ToDo $todo): self |
||
79 | { |
||
80 | $this->todo = $todo; |
||
81 | |||
82 | return $this; |
||
83 | } |
||
85 |