Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 26 |
|
0.00% |
0 / 26 |
CRAP | |
0.00% |
0 / 1 |
| Karte | |
0.00% |
0 / 26 |
|
0.00% |
0 / 26 |
702 | |
0.00% |
0 / 1 |
| getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getKartenNr | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setKartenNr | |
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 | |||
| getLatitude | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setLatitude | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getLongitude | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setLongitude | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getYear | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setYear | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getScale | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setScale | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getPlace | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPlace | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getZoom | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setZoom | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getKind | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setKind | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getPreviewImageId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPreviewImageId | |
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 | |||
| getEntityNameForStorage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getEntityIdForStorage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Olz\Entity\Karten; |
| 4 | |
| 5 | use Doctrine\ORM\Mapping as ORM; |
| 6 | use Olz\Entity\Common\DataStorageInterface; |
| 7 | use Olz\Entity\Common\DataStorageTrait; |
| 8 | use Olz\Entity\Common\OlzEntity; |
| 9 | use Olz\Entity\Common\TestableInterface; |
| 10 | use Olz\Repository\Karten\KartenRepository; |
| 11 | |
| 12 | #[ORM\Table(name: 'karten')] |
| 13 | #[ORM\Index(name: 'typ_index', columns: ['on_off', 'typ'])] |
| 14 | #[ORM\Entity(repositoryClass: KartenRepository::class)] |
| 15 | class Karte extends OlzEntity implements DataStorageInterface, TestableInterface { |
| 16 | use DataStorageTrait; |
| 17 | |
| 18 | #[ORM\Id] |
| 19 | #[ORM\Column(type: 'integer', nullable: false)] |
| 20 | #[ORM\GeneratedValue] |
| 21 | private int $id; |
| 22 | |
| 23 | #[ORM\Column(type: 'integer', nullable: true)] |
| 24 | private ?int $kartennr; |
| 25 | |
| 26 | #[ORM\Column(type: 'string', nullable: false)] |
| 27 | private string $name; |
| 28 | |
| 29 | #[ORM\Column(type: 'float', nullable: true)] |
| 30 | private ?float $latitude; |
| 31 | |
| 32 | #[ORM\Column(type: 'float', nullable: true)] |
| 33 | private ?float $longitude; |
| 34 | |
| 35 | #[ORM\Column(type: 'string', nullable: true)] |
| 36 | private ?string $jahr; |
| 37 | |
| 38 | #[ORM\Column(type: 'string', nullable: true)] |
| 39 | private ?string $massstab; |
| 40 | |
| 41 | #[ORM\Column(type: 'string', nullable: true)] |
| 42 | private ?string $ort; |
| 43 | |
| 44 | #[ORM\Column(type: 'integer', nullable: true)] |
| 45 | private ?int $zoom; |
| 46 | |
| 47 | #[ORM\Column(type: 'string', nullable: true)] |
| 48 | private ?string $typ; |
| 49 | |
| 50 | #[ORM\Column(type: 'string', nullable: true)] |
| 51 | private ?string $vorschau; |
| 52 | |
| 53 | public function getId(): ?int { |
| 54 | return $this->id ?? null; |
| 55 | } |
| 56 | |
| 57 | public function setId(int $new_value): void { |
| 58 | $this->id = $new_value; |
| 59 | } |
| 60 | |
| 61 | public function getKartenNr(): ?int { |
| 62 | return $this->kartennr; |
| 63 | } |
| 64 | |
| 65 | public function setKartenNr(?int $new_value): void { |
| 66 | $this->kartennr = $new_value; |
| 67 | } |
| 68 | |
| 69 | public function getName(): string { |
| 70 | return $this->name; |
| 71 | } |
| 72 | |
| 73 | public function setName(string $new_value): void { |
| 74 | $this->name = $new_value; |
| 75 | } |
| 76 | |
| 77 | public function getLatitude(): ?float { |
| 78 | return $this->latitude; |
| 79 | } |
| 80 | |
| 81 | public function setLatitude(?float $new_value): void { |
| 82 | $this->latitude = $new_value; |
| 83 | } |
| 84 | |
| 85 | public function getLongitude(): ?float { |
| 86 | return $this->longitude; |
| 87 | } |
| 88 | |
| 89 | public function setLongitude(?float $new_value): void { |
| 90 | $this->longitude = $new_value; |
| 91 | } |
| 92 | |
| 93 | public function getYear(): ?string { |
| 94 | return $this->jahr; |
| 95 | } |
| 96 | |
| 97 | public function setYear(?string $new_value): void { |
| 98 | $this->jahr = $new_value; |
| 99 | } |
| 100 | |
| 101 | public function getScale(): ?string { |
| 102 | return $this->massstab; |
| 103 | } |
| 104 | |
| 105 | public function setScale(?string $new_value): void { |
| 106 | $this->massstab = $new_value; |
| 107 | } |
| 108 | |
| 109 | public function getPlace(): ?string { |
| 110 | return $this->ort; |
| 111 | } |
| 112 | |
| 113 | public function setPlace(?string $new_value): void { |
| 114 | $this->ort = $new_value; |
| 115 | } |
| 116 | |
| 117 | public function getZoom(): ?int { |
| 118 | return $this->zoom; |
| 119 | } |
| 120 | |
| 121 | public function setZoom(?int $new_value): void { |
| 122 | $this->zoom = $new_value; |
| 123 | } |
| 124 | |
| 125 | public function getKind(): ?string { |
| 126 | return $this->typ; |
| 127 | } |
| 128 | |
| 129 | public function setKind(?string $new_value): void { |
| 130 | $this->typ = $new_value; |
| 131 | } |
| 132 | |
| 133 | public function getPreviewImageId(): ?string { |
| 134 | return $this->vorschau; |
| 135 | } |
| 136 | |
| 137 | public function setPreviewImageId(?string $new_value): void { |
| 138 | $this->vorschau = $new_value; |
| 139 | } |
| 140 | |
| 141 | // --- |
| 142 | |
| 143 | public function __toString(): string { |
| 144 | return "Karte (ID: {$this->getId()})"; |
| 145 | } |
| 146 | |
| 147 | public function testOnlyGetField(string $field_name): mixed { |
| 148 | return $this->{$field_name}; |
| 149 | } |
| 150 | |
| 151 | public static function getEntityNameForStorage(): string { |
| 152 | return 'karten'; |
| 153 | } |
| 154 | |
| 155 | public function getEntityIdForStorage(): string { |
| 156 | return "{$this->getId()}"; |
| 157 | } |
| 158 | } |