| Total Complexity | 8 |
| Total Lines | 77 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Favorite implements FavoriteInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @Id |
||
| 15 | * @Column(type="integer") |
||
| 16 | * @GeneratedValue |
||
| 17 | */ |
||
| 18 | private int $id; |
||
|
|
|||
| 19 | |||
| 20 | /** |
||
| 21 | * @Column(type="integer") |
||
| 22 | */ |
||
| 23 | private int $user_id; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @Column(type="integer") |
||
| 27 | */ |
||
| 28 | private int $item_id; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @Column(type="string") |
||
| 32 | */ |
||
| 33 | private string $type; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @Column(type="datetime") |
||
| 37 | */ |
||
| 38 | private \DateTimeInterface $date; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @ManyToOne(targetEntity="User") |
||
| 42 | * @JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE") |
||
| 43 | */ |
||
| 44 | private UserInterface $user; |
||
| 45 | |||
| 46 | 1 | public function setUser(UserInterface $user): FavoriteInterface |
|
| 47 | { |
||
| 48 | 1 | $this->user = $user; |
|
| 49 | 1 | return $this; |
|
| 50 | } |
||
| 51 | |||
| 52 | 1 | public function getUser(): UserInterface |
|
| 53 | { |
||
| 54 | 1 | return $this->user; |
|
| 55 | } |
||
| 56 | |||
| 57 | 1 | public function setItemId(int $itemId): FavoriteInterface |
|
| 58 | { |
||
| 59 | 1 | $this->item_id = $itemId; |
|
| 60 | 1 | return $this; |
|
| 61 | } |
||
| 62 | |||
| 63 | 1 | public function getItemId(): int |
|
| 64 | { |
||
| 65 | 1 | return $this->item_id; |
|
| 66 | } |
||
| 67 | |||
| 68 | 1 | public function setType(string $type): FavoriteInterface |
|
| 69 | { |
||
| 70 | 1 | $this->type = $type; |
|
| 71 | 1 | return $this; |
|
| 72 | } |
||
| 73 | |||
| 74 | 1 | public function getType(): string |
|
| 75 | { |
||
| 76 | 1 | return $this->type; |
|
| 77 | } |
||
| 78 | |||
| 79 | 1 | public function setDate(\DateTimeInterface $date): FavoriteInterface |
|
| 83 | } |
||
| 84 | |||
| 85 | 1 | public function getDate(): \DateTimeInterface |
|
| 88 | } |
||
| 89 | } |
||
| 90 |