Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 59 |
|
0.00% |
0 / 24 |
CRAP | |
0.00% |
0 / 1 |
| AbstractAdresseXml | |
0.00% |
0 / 59 |
|
0.00% |
0 / 24 |
600 | |
0.00% |
0 / 1 |
| setAdresse | |
0.00% |
0 / 19 |
|
0.00% |
0 / 1 |
2 | |||
| setNr | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getData | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAnrede | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setTitel | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setVorname | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setName | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setFirma | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setName2 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setName3 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setStrasse | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setLand | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setPlz | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setOrt | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setTelefon1 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setTelefon2 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setTelefon3 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setFax | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setEmail | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setInternet | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| offsetExists | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| offsetGet | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| offsetSet | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| offsetUnset | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Satag\AmicronEntityBundle\Struct\Xml\Import; |
| 4 | |
| 5 | use Satag\AmicronEntityBundle\Entity\Adresse; |
| 6 | |
| 7 | /** |
| 8 | * @implements \ArrayAccess<string, string> |
| 9 | */ |
| 10 | abstract class AbstractAdresseXml implements \ArrayAccess |
| 11 | { |
| 12 | /** |
| 13 | * @var array<string, string> |
| 14 | */ |
| 15 | protected array $data = []; |
| 16 | |
| 17 | public function setAdresse(Adresse $adresse): self |
| 18 | { |
| 19 | $this |
| 20 | ->setNr($adresse->getNr()) |
| 21 | ->setAnrede((string) $adresse->anrede) |
| 22 | ->setTitel((string) $adresse->titel) |
| 23 | ->setVorname((string) $adresse->vorname) |
| 24 | ->setName((string) $adresse->name) |
| 25 | ->setName2((string) $adresse->name2) |
| 26 | ->setName3((string) $adresse->name3) |
| 27 | ->setStrasse((string) $adresse->strasse) |
| 28 | ->setLand((string) $adresse->land) |
| 29 | ->setPlz((string) $adresse->plz) |
| 30 | ->setOrt((string) $adresse->ort) |
| 31 | ->setTelefon1((string) $adresse->telefon1) |
| 32 | ->setTelefon2((string) $adresse->telefon2) |
| 33 | ->setTelefon3((string) $adresse->telefon3) |
| 34 | ->setEmail((string) $adresse->email) |
| 35 | ->setInternet((string) $adresse->internet) |
| 36 | ; |
| 37 | |
| 38 | return $this; |
| 39 | } |
| 40 | |
| 41 | public function setNr(string $kundenr): self |
| 42 | { |
| 43 | $this->data['NR'] = $kundenr; |
| 44 | |
| 45 | return $this; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * @return array<string, string> |
| 50 | */ |
| 51 | public function getData(): array |
| 52 | { |
| 53 | return $this->data; |
| 54 | } |
| 55 | |
| 56 | public function setAnrede(string $anrede): self |
| 57 | { |
| 58 | $this->data['ANREDE'] = $anrede; |
| 59 | |
| 60 | return $this; |
| 61 | } |
| 62 | |
| 63 | public function setTitel(string $titel): self |
| 64 | { |
| 65 | $this->data['TITEL'] = $titel; |
| 66 | |
| 67 | return $this; |
| 68 | } |
| 69 | |
| 70 | public function setVorname(string $string): self |
| 71 | { |
| 72 | $this->data['VORNAME'] = $string; |
| 73 | |
| 74 | return $this; |
| 75 | } |
| 76 | |
| 77 | public function setName(string $string): self |
| 78 | { |
| 79 | $this->data['NAME'] = $string; |
| 80 | |
| 81 | return $this; |
| 82 | } |
| 83 | |
| 84 | public function setFirma(string $string): self |
| 85 | { |
| 86 | return $this->setName2($string); |
| 87 | } |
| 88 | |
| 89 | public function setName2(string $string): self |
| 90 | { |
| 91 | $this->data['NAME2'] = $string; |
| 92 | |
| 93 | return $this; |
| 94 | } |
| 95 | |
| 96 | public function setName3(string $string): self |
| 97 | { |
| 98 | $this->data['NAME3'] = $string; |
| 99 | |
| 100 | return $this; |
| 101 | } |
| 102 | |
| 103 | public function setStrasse(string $string): self |
| 104 | { |
| 105 | $this->data['STRASSE'] = $string; |
| 106 | |
| 107 | return $this; |
| 108 | } |
| 109 | |
| 110 | public function setLand(string $string): self |
| 111 | { |
| 112 | $this->data['LAND'] = $string; |
| 113 | |
| 114 | return $this; |
| 115 | } |
| 116 | |
| 117 | public function setPlz(string $string): self |
| 118 | { |
| 119 | $this->data['PLZ'] = $string; |
| 120 | |
| 121 | return $this; |
| 122 | } |
| 123 | |
| 124 | public function setOrt(string $string): self |
| 125 | { |
| 126 | $this->data['ORT'] = $string; |
| 127 | |
| 128 | return $this; |
| 129 | } |
| 130 | |
| 131 | public function setTelefon1(string $string): self |
| 132 | { |
| 133 | $this->data['TELEFON1'] = $string; |
| 134 | |
| 135 | return $this; |
| 136 | } |
| 137 | |
| 138 | public function setTelefon2(string $string): self |
| 139 | { |
| 140 | $this->data['TELEFON2'] = $string; |
| 141 | |
| 142 | return $this; |
| 143 | } |
| 144 | |
| 145 | public function setTelefon3(string $string): self |
| 146 | { |
| 147 | $this->data['TELEFON3'] = $string; |
| 148 | |
| 149 | return $this; |
| 150 | } |
| 151 | |
| 152 | public function setFax(string $string): self |
| 153 | { |
| 154 | $this->data['FAX'] = $string; |
| 155 | |
| 156 | return $this; |
| 157 | } |
| 158 | |
| 159 | public function setEmail(string $string): self |
| 160 | { |
| 161 | $this->data['EMAIL'] = $string; |
| 162 | |
| 163 | return $this; |
| 164 | } |
| 165 | |
| 166 | public function setInternet(string $string): self |
| 167 | { |
| 168 | $this->data['INTERNET'] = $string; |
| 169 | |
| 170 | return $this; |
| 171 | } |
| 172 | |
| 173 | public function offsetExists(mixed $offset): bool |
| 174 | { |
| 175 | return isset($this->data[(string) $offset]); |
| 176 | } |
| 177 | |
| 178 | public function offsetGet(mixed $offset): string |
| 179 | { |
| 180 | return $this->data[(string) $offset] ?? ''; |
| 181 | } |
| 182 | |
| 183 | public function offsetSet(mixed $offset, mixed $value): void |
| 184 | { |
| 185 | $this->data[(string) $offset] = $value; |
| 186 | } |
| 187 | |
| 188 | public function offsetUnset(mixed $offset): void |
| 189 | { |
| 190 | unset($this->data[(string) $offset]); |
| 191 | } |
| 192 | } |