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