Total Complexity | 2 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | trait HasResponsible |
||
10 | { |
||
11 | /** |
||
12 | * @var User |
||
13 | * |
||
14 | * @ORM\ManyToOne(targetEntity="Application\Model\User") |
||
15 | * @ORM\JoinColumns({ |
||
16 | * @ORM\JoinColumn(onDelete="SET NULL") |
||
17 | * }) |
||
18 | */ |
||
19 | private $responsible; |
||
20 | |||
21 | /** |
||
22 | * Set responsible |
||
23 | * |
||
24 | * @param null|User $responsible |
||
25 | */ |
||
26 | public function setResponsible(?User $responsible): void |
||
27 | { |
||
28 | $this->responsible = $responsible; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Get responsible |
||
33 | * |
||
34 | * @return null|User |
||
35 | */ |
||
36 | public function getResponsible(): ?User |
||
39 | } |
||
40 | } |
||
41 |