Lines
0.00%
0 / 8
Functions and Methods
0.00%
0 / 1
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| LocationService | 0.00% | 0 / 8 | 0.00% | 0 / 1 | 6 | 0.00% | 0 / 1 | |||
| deleteEntity | 0.00% | 0 / 8 | 0.00% | 0 / 1 | 6 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | namespace BO\Zmsdldb\Importer\MySQL\Entity; | |
| 4 | ||
| 5 | class LocationService extends Base | |
| 6 | { | |
| 7 | protected array $fieldMapping = [ | |
| 8 | 'location' => 'location_id', | |
| 9 | 'service_id' => 'service_id', | |
| 10 | 'locale' => 'locale', | |
| 11 | 'appointment.slots' => 'appointment_slots', | |
| 12 | 'appointment.link' => 'appointment_link', | |
| 13 | 'appointment.external' => 'appointment_external', | |
| 14 | 'appointment.multiple' => 'appointment_multiple', | |
| 15 | 'appointment.allowed' => 'appointment_bookable', | |
| 16 | 'hint' => 'appointment_note', | |
| 17 | 'contact' => 'contact_json' | |
| 18 | ]; | |
| 19 | ||
| 20 | #[\Override] | |
| 21 | public function deleteEntity(): void | |
| 22 | { | |
| 23 | try { | |
| 24 | $this->deleteWith( | |
| 25 | array_combine( | |
| 26 | ['location_id', 'service_id', 'locale'], | |
| 27 | array_values($this->get(['location', 'service_id', 'locale'])) | |
| 28 | ) | |
| 29 | ); | |
| 30 | } catch (\Exception $e) { | |
| 31 | throw $e; | |
| 32 | } | |
| 33 | } | |
| 34 | } |