Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 20 |
|
0.00% |
0 / 20 |
CRAP | |
0.00% |
0 / 1 |
| RegistrationInfo | |
0.00% |
0 / 20 |
|
0.00% |
0 / 20 |
462 | |
0.00% |
0 / 1 |
| getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
| setId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getRegistration | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRegistration | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getIdent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setIdent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getIndexWithinRegistration | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setIndexWithinRegistration | |
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 | |||
| getDescription | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setDescription | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getType | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setType | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getIsOptional | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setIsOptional | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getOptions | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setOptions | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| __toString | |
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\Anmelden; |
| 4 | |
| 5 | use Doctrine\ORM\Mapping as ORM; |
| 6 | use Olz\Entity\Common\OlzEntity; |
| 7 | use Olz\Entity\Common\TestableInterface; |
| 8 | use Olz\Repository\Anmelden\RegistrationInfoRepository; |
| 9 | |
| 10 | #[ORM\Table(name: 'anmelden_registration_infos')] |
| 11 | #[ORM\Index(name: 'ident_index', columns: ['ident'])] |
| 12 | #[ORM\Entity(repositoryClass: RegistrationInfoRepository::class)] |
| 13 | class RegistrationInfo extends OlzEntity implements TestableInterface { |
| 14 | #[ORM\Id] |
| 15 | #[ORM\Column(type: 'bigint', nullable: false)] |
| 16 | #[ORM\GeneratedValue] |
| 17 | private int|string $id; |
| 18 | |
| 19 | #[ORM\ManyToOne(targetEntity: Registration::class)] |
| 20 | #[ORM\JoinColumn(name: 'registration_id', referencedColumnName: 'id', nullable: false)] |
| 21 | private Registration $registration; |
| 22 | |
| 23 | #[ORM\Column(type: 'integer', nullable: false)] |
| 24 | private int $index_within_registration; |
| 25 | |
| 26 | #[ORM\Column(type: 'string', nullable: false)] |
| 27 | private string $ident; |
| 28 | |
| 29 | #[ORM\Column(type: 'text', nullable: false)] |
| 30 | private string $title; |
| 31 | |
| 32 | #[ORM\Column(type: 'text', nullable: false)] |
| 33 | private string $description; |
| 34 | |
| 35 | #[ORM\Column(type: 'string', nullable: false)] |
| 36 | private string $type; |
| 37 | |
| 38 | #[ORM\Column(type: 'boolean', nullable: false)] |
| 39 | private bool $is_optional; |
| 40 | |
| 41 | #[ORM\Column(type: 'text', nullable: false)] |
| 42 | private string $options; |
| 43 | |
| 44 | public function getId(): ?int { |
| 45 | return isset($this->id) ? intval($this->id) : null; |
| 46 | } |
| 47 | |
| 48 | public function setId(int $new_value): void { |
| 49 | $this->id = $new_value; |
| 50 | } |
| 51 | |
| 52 | public function getRegistration(): Registration { |
| 53 | return $this->registration; |
| 54 | } |
| 55 | |
| 56 | public function setRegistration(Registration $new_value): void { |
| 57 | $this->registration = $new_value; |
| 58 | } |
| 59 | |
| 60 | public function getIdent(): string { |
| 61 | return $this->ident; |
| 62 | } |
| 63 | |
| 64 | public function setIdent(string $new_value): void { |
| 65 | $this->ident = $new_value; |
| 66 | } |
| 67 | |
| 68 | public function getIndexWithinRegistration(): int { |
| 69 | return $this->index_within_registration; |
| 70 | } |
| 71 | |
| 72 | public function setIndexWithinRegistration(int $new_value): void { |
| 73 | $this->index_within_registration = $new_value; |
| 74 | } |
| 75 | |
| 76 | public function getTitle(): string { |
| 77 | return $this->title; |
| 78 | } |
| 79 | |
| 80 | public function setTitle(string $new_value): void { |
| 81 | $this->title = $new_value; |
| 82 | } |
| 83 | |
| 84 | public function getDescription(): string { |
| 85 | return $this->description; |
| 86 | } |
| 87 | |
| 88 | public function setDescription(string $new_value): void { |
| 89 | $this->description = $new_value; |
| 90 | } |
| 91 | |
| 92 | public function getType(): string { |
| 93 | return $this->type; |
| 94 | } |
| 95 | |
| 96 | public function setType(string $new_value): void { |
| 97 | $this->type = $new_value; |
| 98 | } |
| 99 | |
| 100 | public function getIsOptional(): bool { |
| 101 | return $this->is_optional; |
| 102 | } |
| 103 | |
| 104 | public function setIsOptional(bool $new_value): void { |
| 105 | $this->is_optional = $new_value; |
| 106 | } |
| 107 | |
| 108 | public function getOptions(): string { |
| 109 | return $this->options; |
| 110 | } |
| 111 | |
| 112 | public function setOptions(string $new_value): void { |
| 113 | $this->options = $new_value; |
| 114 | } |
| 115 | |
| 116 | // --- |
| 117 | |
| 118 | public function __toString(): string { |
| 119 | return "RegistrationInfo (ID: {$this->getId()})"; |
| 120 | } |
| 121 | |
| 122 | public function testOnlyGetField(string $field_name): mixed { |
| 123 | return $this->{$field_name}; |
| 124 | } |
| 125 | } |