Lines
0.00%
0 / 5
Functions and Methods
0.00%
0 / 1
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Contact | 0.00% | 0 / 5 | 0.00% | 0 / 1 | 6 | 0.00% | 0 / 1 | |||
| deleteEntity | 0.00% | 0 / 5 | 0.00% | 0 / 1 | 6 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | namespace BO\Zmsdldb\Importer\MySQL\Entity; | |
| 4 | ||
| 5 | class Contact extends Base | |
| 6 | { | |
| 7 | protected array $fieldMapping = [ | |
| 8 | 'object_id' => 'object_id', | |
| 9 | 'locale' => 'locale', | |
| 10 | 'name' => 'name', | |
| 11 | 'contact' => 'contact_json', | |
| 12 | 'address' => 'address_json', | |
| 13 | 'deviating_postal_address' => 'deviating_postal_address_json', | |
| 14 | 'geo' => 'geo_json', | |
| 15 | ]; | |
| 16 | ||
| 17 | #[\Override] | |
| 18 | public function deleteEntity(): void | |
| 19 | { | |
| 20 | try { | |
| 21 | $this->deleteWith( | |
| 22 | array_combine(['object_id', 'locale'], array_values($this->get(['object_id', 'locale']))) | |
| 23 | ); | |
| 24 | } catch (\Exception $e) { | |
| 25 | throw $e; | |
| 26 | } | |
| 27 | } | |
| 28 | } |