Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 9 |
|
0.00% |
0 / 9 |
CRAP | |
0.00% |
0 / 1 |
| Booking | |
0.00% |
0 / 9 |
|
0.00% |
0 / 9 |
110 | |
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 | |||
| getUser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setUser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getFormData | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFormData | |
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\Entity\Users\User; |
| 9 | use Olz\Repository\Anmelden\BookingRepository; |
| 10 | |
| 11 | #[ORM\Table(name: 'anmelden_bookings')] |
| 12 | #[ORM\Entity(repositoryClass: BookingRepository::class)] |
| 13 | class Booking 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\ManyToOne(targetEntity: User::class)] |
| 24 | #[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: true)] |
| 25 | private ?User $user; |
| 26 | |
| 27 | #[ORM\Column(type: 'text', nullable: false)] |
| 28 | private string $form_data; |
| 29 | |
| 30 | public function getId(): ?int { |
| 31 | return isset($this->id) ? intval($this->id) : null; |
| 32 | } |
| 33 | |
| 34 | public function setId(int $new_id): void { |
| 35 | $this->id = $new_id; |
| 36 | } |
| 37 | |
| 38 | public function getRegistration(): Registration { |
| 39 | return $this->registration; |
| 40 | } |
| 41 | |
| 42 | public function setRegistration(Registration $new_registration): void { |
| 43 | $this->registration = $new_registration; |
| 44 | } |
| 45 | |
| 46 | public function getUser(): ?User { |
| 47 | return $this->user; |
| 48 | } |
| 49 | |
| 50 | public function setUser(?User $new_user): void { |
| 51 | $this->user = $new_user; |
| 52 | } |
| 53 | |
| 54 | public function getFormData(): string { |
| 55 | return $this->form_data; |
| 56 | } |
| 57 | |
| 58 | public function setFormData(string $new_form_data): void { |
| 59 | $this->form_data = $new_form_data; |
| 60 | } |
| 61 | |
| 62 | // --- |
| 63 | |
| 64 | public function testOnlyGetField(string $field_name): mixed { |
| 65 | return $this->{$field_name}; |
| 66 | } |
| 67 | } |