Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 21 |
|
0.00% |
0 / 21 |
CRAP | |
0.00% |
0 / 1 |
| TerminNotification | |
0.00% |
0 / 21 |
|
0.00% |
0 / 21 |
506 | |
0.00% |
0 / 1 |
| getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
| setId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getTermin | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setTermin | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getFiresAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFiresAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getTitle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setTitle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getContent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setContent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getRecipientUser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRecipientUser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getRecipientRole | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRecipientRole | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getRecipientTerminOwners | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRecipientTerminOwners | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getRecipientTerminVolunteers | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRecipientTerminVolunteers | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getRecipientTerminParticipants | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRecipientTerminParticipants | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| testOnlyGetField | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Olz\Entity\Termine; |
| 4 | |
| 5 | use Doctrine\ORM\Mapping as ORM; |
| 6 | use Olz\Entity\Common\TestableInterface; |
| 7 | use Olz\Entity\Roles\Role; |
| 8 | use Olz\Entity\Users\User; |
| 9 | use Olz\Repository\Termine\TerminNotificationRepository; |
| 10 | |
| 11 | #[ORM\Table(name: 'termin_notifications')] |
| 12 | #[ORM\Index(name: 'termin_index', columns: ['termin_id'])] |
| 13 | #[ORM\Index(name: 'fires_at_index', columns: ['fires_at'])] |
| 14 | #[ORM\Entity(repositoryClass: TerminNotificationRepository::class)] |
| 15 | class TerminNotification implements TestableInterface { |
| 16 | #[ORM\Id] |
| 17 | #[ORM\Column(type: 'bigint', nullable: false)] |
| 18 | #[ORM\GeneratedValue] |
| 19 | private int|string $id; |
| 20 | |
| 21 | #[ORM\ManyToOne(targetEntity: Termin::class)] |
| 22 | #[ORM\JoinColumn(name: 'termin_id', referencedColumnName: 'id', nullable: false)] |
| 23 | private Termin $termin; |
| 24 | |
| 25 | #[ORM\Column(type: 'datetime', nullable: false)] |
| 26 | private \DateTime $fires_at; |
| 27 | |
| 28 | #[ORM\Column(type: 'text', nullable: false)] |
| 29 | private string $title; |
| 30 | |
| 31 | #[ORM\Column(type: 'text', nullable: true)] |
| 32 | private ?string $content; |
| 33 | |
| 34 | #[ORM\ManyToOne(targetEntity: User::class)] |
| 35 | #[ORM\JoinColumn(name: 'recipient_user_id', referencedColumnName: 'id', nullable: true)] |
| 36 | private ?User $recipient_user; |
| 37 | |
| 38 | #[ORM\ManyToOne(targetEntity: Role::class)] |
| 39 | #[ORM\JoinColumn(name: 'recipient_role_id', referencedColumnName: 'id', nullable: true)] |
| 40 | private ?Role $recipient_role; |
| 41 | |
| 42 | #[ORM\Column(type: 'boolean', nullable: false, options: ['default' => 0])] |
| 43 | private bool $recipient_termin_owners; |
| 44 | |
| 45 | #[ORM\Column(type: 'boolean', nullable: false, options: ['default' => 0])] |
| 46 | private bool $recipient_termin_volunteers; |
| 47 | |
| 48 | #[ORM\Column(type: 'boolean', nullable: false, options: ['default' => 0])] |
| 49 | private bool $recipient_termin_participants; |
| 50 | |
| 51 | public function getId(): ?int { |
| 52 | return isset($this->id) ? intval($this->id) : null; |
| 53 | } |
| 54 | |
| 55 | public function setId(int $new_value): void { |
| 56 | $this->id = $new_value; |
| 57 | } |
| 58 | |
| 59 | public function getTermin(): Termin { |
| 60 | return $this->termin; |
| 61 | } |
| 62 | |
| 63 | public function setTermin(Termin $new_value): void { |
| 64 | $this->termin = $new_value; |
| 65 | } |
| 66 | |
| 67 | public function getFiresAt(): \DateTime { |
| 68 | return $this->fires_at; |
| 69 | } |
| 70 | |
| 71 | public function setFiresAt(\DateTime $new_value): void { |
| 72 | $this->fires_at = $new_value; |
| 73 | } |
| 74 | |
| 75 | public function getTitle(): string { |
| 76 | return $this->title; |
| 77 | } |
| 78 | |
| 79 | public function setTitle(string $new_value): void { |
| 80 | $this->title = $new_value; |
| 81 | } |
| 82 | |
| 83 | public function getContent(): ?string { |
| 84 | return $this->content; |
| 85 | } |
| 86 | |
| 87 | public function setContent(?string $new_value): void { |
| 88 | $this->content = $new_value; |
| 89 | } |
| 90 | |
| 91 | public function getRecipientUser(): ?User { |
| 92 | return $this->recipient_user; |
| 93 | } |
| 94 | |
| 95 | public function setRecipientUser(?User $new_value): void { |
| 96 | $this->recipient_user = $new_value; |
| 97 | } |
| 98 | |
| 99 | public function getRecipientRole(): ?Role { |
| 100 | return $this->recipient_role; |
| 101 | } |
| 102 | |
| 103 | public function setRecipientRole(?Role $new_value): void { |
| 104 | $this->recipient_role = $new_value; |
| 105 | } |
| 106 | |
| 107 | public function getRecipientTerminOwners(): bool { |
| 108 | return $this->recipient_termin_owners; |
| 109 | } |
| 110 | |
| 111 | public function setRecipientTerminOwners(bool $new_value): void { |
| 112 | $this->recipient_termin_owners = $new_value; |
| 113 | } |
| 114 | |
| 115 | public function getRecipientTerminVolunteers(): bool { |
| 116 | return $this->recipient_termin_volunteers; |
| 117 | } |
| 118 | |
| 119 | public function setRecipientTerminVolunteers(bool $new_value): void { |
| 120 | $this->recipient_termin_volunteers = $new_value; |
| 121 | } |
| 122 | |
| 123 | public function getRecipientTerminParticipants(): bool { |
| 124 | return $this->recipient_termin_participants; |
| 125 | } |
| 126 | |
| 127 | public function setRecipientTerminParticipants(bool $new_value): void { |
| 128 | $this->recipient_termin_participants = $new_value; |
| 129 | } |
| 130 | |
| 131 | // --- |
| 132 | |
| 133 | public function testOnlyGetField(string $field_name): mixed { |
| 134 | return $this->{$field_name}; |
| 135 | } |
| 136 | } |