Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 13 |
|
0.00% |
0 / 13 |
CRAP | |
0.00% |
0 / 1 |
| TerminInfo | |
0.00% |
0 / 13 |
|
0.00% |
0 / 13 |
210 | |
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 | |||
| getLanguage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setLanguage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getIndex | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setIndex | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setName | |
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 | |||
| 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\Repository\Termine\TerminInfoRepository; |
| 8 | |
| 9 | #[ORM\Table(name: 'termin_infos')] |
| 10 | #[ORM\Index(name: 'termin_language_index', columns: ['termin_id', 'language', 'index'])] |
| 11 | #[ORM\Entity(repositoryClass: TerminInfoRepository::class)] |
| 12 | class TerminInfo implements TestableInterface { |
| 13 | #[ORM\Id] |
| 14 | #[ORM\Column(type: 'bigint', nullable: false)] |
| 15 | #[ORM\GeneratedValue] |
| 16 | private int|string $id; |
| 17 | |
| 18 | #[ORM\ManyToOne(targetEntity: Termin::class)] |
| 19 | #[ORM\JoinColumn(name: 'termin_id', referencedColumnName: 'id', nullable: false)] |
| 20 | private Termin $termin; |
| 21 | |
| 22 | #[ORM\Column(type: 'string', length: 7, nullable: true)] |
| 23 | private ?string $language; |
| 24 | |
| 25 | #[ORM\Column(type: 'integer', nullable: false)] |
| 26 | private int $index; |
| 27 | |
| 28 | #[ORM\Column(type: 'text', nullable: false)] |
| 29 | private string $name; |
| 30 | |
| 31 | #[ORM\Column(type: 'text', nullable: true)] |
| 32 | private ?string $content; |
| 33 | |
| 34 | public function getId(): ?int { |
| 35 | return isset($this->id) ? intval($this->id) : null; |
| 36 | } |
| 37 | |
| 38 | public function setId(int $new_value): void { |
| 39 | $this->id = $new_value; |
| 40 | } |
| 41 | |
| 42 | public function getTermin(): Termin { |
| 43 | return $this->termin; |
| 44 | } |
| 45 | |
| 46 | public function setTermin(Termin $new_value): void { |
| 47 | $this->termin = $new_value; |
| 48 | } |
| 49 | |
| 50 | public function getLanguage(): ?string { |
| 51 | return $this->language; |
| 52 | } |
| 53 | |
| 54 | public function setLanguage(?string $new_value): void { |
| 55 | $this->language = $new_value; |
| 56 | } |
| 57 | |
| 58 | public function getIndex(): int { |
| 59 | return $this->index; |
| 60 | } |
| 61 | |
| 62 | public function setIndex(int $new_value): void { |
| 63 | $this->index = $new_value; |
| 64 | } |
| 65 | |
| 66 | public function getName(): string { |
| 67 | return $this->name; |
| 68 | } |
| 69 | |
| 70 | public function setName(string $new_value): void { |
| 71 | $this->name = $new_value; |
| 72 | } |
| 73 | |
| 74 | public function getContent(): ?string { |
| 75 | return $this->content; |
| 76 | } |
| 77 | |
| 78 | public function setContent(?string $new_value): void { |
| 79 | $this->content = $new_value; |
| 80 | } |
| 81 | |
| 82 | // --- |
| 83 | |
| 84 | public function testOnlyGetField(string $field_name): mixed { |
| 85 | return $this->{$field_name}; |
| 86 | } |
| 87 | } |