Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 11 |
CRAP | |
0.00% |
0 / 1 |
| Registration | |
0.00% |
0 / 11 |
|
0.00% |
0 / 11 |
132 | |
0.00% |
0 / 1 |
| getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setId | |
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 | |||
| getOpensAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setOpensAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getClosesAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setClosesAt | |
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\RegistrationRepository; |
| 9 | |
| 10 | #[ORM\Table(name: 'anmelden_registrations')] |
| 11 | #[ORM\Index(name: 'opens_at_index', columns: ['opens_at'])] |
| 12 | #[ORM\Index(name: 'closes_at_index', columns: ['closes_at'])] |
| 13 | #[ORM\Entity(repositoryClass: RegistrationRepository::class)] |
| 14 | class Registration extends OlzEntity implements TestableInterface { |
| 15 | #[ORM\Id] |
| 16 | #[ORM\Column(type: 'integer', nullable: false)] |
| 17 | #[ORM\GeneratedValue] |
| 18 | private int $id; |
| 19 | |
| 20 | #[ORM\Column(type: 'text', nullable: false)] |
| 21 | private string $title; |
| 22 | |
| 23 | #[ORM\Column(type: 'text', nullable: false)] |
| 24 | private string $description; |
| 25 | |
| 26 | #[ORM\Column(type: 'datetime', nullable: true)] |
| 27 | private ?\DateTime $opens_at; |
| 28 | |
| 29 | #[ORM\Column(type: 'datetime', nullable: true)] |
| 30 | private ?\DateTime $closes_at; |
| 31 | |
| 32 | public function getId(): ?int { |
| 33 | return $this->id ?? null; |
| 34 | } |
| 35 | |
| 36 | public function setId(int $new_id): void { |
| 37 | $this->id = $new_id; |
| 38 | } |
| 39 | |
| 40 | public function getTitle(): string { |
| 41 | return $this->title; |
| 42 | } |
| 43 | |
| 44 | public function setTitle(string $new_title): void { |
| 45 | $this->title = $new_title; |
| 46 | } |
| 47 | |
| 48 | public function getDescription(): string { |
| 49 | return $this->description; |
| 50 | } |
| 51 | |
| 52 | public function setDescription(string $new_description): void { |
| 53 | $this->description = $new_description; |
| 54 | } |
| 55 | |
| 56 | public function getOpensAt(): ?\DateTime { |
| 57 | return $this->opens_at; |
| 58 | } |
| 59 | |
| 60 | public function setOpensAt(?\DateTime $new_opens_at): void { |
| 61 | $this->opens_at = $new_opens_at; |
| 62 | } |
| 63 | |
| 64 | public function getClosesAt(): ?\DateTime { |
| 65 | return $this->closes_at; |
| 66 | } |
| 67 | |
| 68 | public function setClosesAt(?\DateTime $new_closes_at): void { |
| 69 | $this->closes_at = $new_closes_at; |
| 70 | } |
| 71 | |
| 72 | // --- |
| 73 | |
| 74 | public function testOnlyGetField(string $field_name): mixed { |
| 75 | return $this->{$field_name}; |
| 76 | } |
| 77 | } |